User:Wayne Decatur/3kg2 Morph Methods: Difference between revisions

From Proteopedia
Jump to navigationJump to search
Wayne Decatur (talk | contribs)
mNo edit summary
Wayne Decatur (talk | contribs)
mNo edit summary
Line 2: Line 2:
&nbsp;<br>
&nbsp;<br>
for example:<br>
for example:<br>
<source lang="python">
<pre>
alter (chain B),chain='A'
alter (chain B),chain='A'
sort
sort
</source>
</pre>




Line 15: 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>
<source lang="python">
<pre>
split_states 3kg2atob  
split_states 3kg2atob  
delete 3kg2atob  
delete 3kg2atob  
Line 21: Line 21:
rewind  
rewind  
save test.pdb, all  
save test.pdb, all  
</source>
</pre>


'''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>
'''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">
<pre>
# Adds the command save_transformed
# Adds the command save_transformed
# Usage: save_transformed object, file
# Usage: save_transformed object, file
Line 37: Line 37:


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