We apologize for Proteopedia being slow to respond. For the past two years, a new implementation of Proteopedia has been being built. Soon, it will replace this 18-year old system. All existing content will be moved to the new system at a date that will be announced here.

User:Wayne Decatur/3kg2 Morph Methods

From Proteopedia

(Difference between revisions)
Jump to: navigation, search
m
m
Line 2: Line 2:
&nbsp;<br>
&nbsp;<br>
for example:<br>
for example:<br>
-
alter (chain B),chain='A' <br>
+
<source lang="python">
-
sort<br>
+
alter (chain B),chain='A'
 +
sort
 +
</source>
Line 13: Line 15:
found this series of commands (ENTERED ONE LINE AT A TIME) helped make a file with all models from PyMOL:<br>
found this series of commands (ENTERED ONE LINE AT A TIME) helped make a file with all models from PyMOL:<br>
&nbsp;<br>
&nbsp;<br>
-
split_states 3kg2atob<br>
+
<source lang="python">
-
delete 3kg2atob<br>
+
split_states 3kg2atob
-
alter all, segi = model[-4:]<br>
+
delete 3kg2atob
-
rewind<br>
+
alter all, segi = model[-4:]
-
save test.pdb, all<br>
+
rewind
 +
save test.pdb, all
 +
</source>
-
'''However, this didn't save the orientation I had moved it to at the start.'''
+
'''However, this didn't save the orientation I had moved it to at the start.''' Seems I could use [http://pymolwiki.org/index.php/Get_View get_view] and [http://pymolwiki.org/index.php/Set_View set_view] commands to get back to what I wanted after reload but I need it to open in Jmol the way I wanted so that doesn't help. A little more searching turned up on the [http://pymolwiki.org/index.php/Modeling_and_Editing_Structures Modeling and Editing Structures page of the PyMol Wiki] that I could save with transformed coordinates using a simple Python script:<br>
 +
<source lang="python">
 +
# Adds the command save_transformed
 +
# Usage: save_transformed object, file
 +
def save_transformed(object,file):
 +
m = cmd.get_view(0)
 +
ttt = [m[0], m[1], m[2], 0.0,
 +
m[3], m[4], m[5], 0.0,
 +
m[6], m[7], m[8], 0.0,
 +
0.0, 0.0, 0.0, 1.0]
 +
cmd.transform_object(object,ttt)
 +
cmd.save(file,object)
 +
 
 +
cmd.extend('save_transformed',save_transformed)
 +
</source>

Revision as of 16:52, 10 July 2010

First split all chains A, B, C, and D into single files and then used PyMol to change all chains to A for chains:
 
for example:
<source lang="python"> alter (chain B),chain='A' sort </source>


Used Beta server - mainly because it allows turning off fitting so I can show relationship of identical conformations, left fitting on for showing difference between chain A and chain B.


Next I was trying to get the subunit A to B morph to load already close to the familiar arrangement, so I tried in PyMol to orient it like I wanted it and then save all states (just fyi...found I could show all states at same time on screen with 'set all_states,1' from - PyMol reference card). From http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg02004.html found this series of commands (ENTERED ONE LINE AT A TIME) helped make a file with all models from PyMOL:
 
<source lang="python"> split_states 3kg2atob delete 3kg2atob alter all, segi = model[-4:] rewind save test.pdb, all </source>

However, this didn't save the orientation I had moved it to at the start. Seems I could use get_view and set_view commands to get back to what I wanted after reload but I need it to open in Jmol the way I wanted so that doesn't help. A little more searching turned up on the Modeling and Editing Structures page of the PyMol Wiki that I could save with transformed coordinates using a simple Python script:
<source lang="python">

  1. Adds the command save_transformed
  2. Usage: save_transformed object, file

def save_transformed(object,file):

   m = cmd.get_view(0)
   ttt = [m[0], m[1], m[2], 0.0,
          m[3], m[4], m[5], 0.0,
          m[6], m[7], m[8], 0.0,
          0.0,   0.0,  0.0, 1.0]
   cmd.transform_object(object,ttt)
   cmd.save(file,object)

cmd.extend('save_transformed',save_transformed) </source>

Proteopedia Page Contributors and Editors (what is this?)

Wayne Decatur

Personal tools