This is a read-only mirror of pymolwiki.org

Difference between revisions of "Save"

From PyMOL Wiki
Jump to navigation Jump to search
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===DESCRIPTION===
 
===DESCRIPTION===
 +
'''save''' writes selected atoms to a file.  The file format is
 +
autodetected if the extesion is ".pdb", ".pse", ".mol", ".mmod", or
 +
".pkl"
 
   
 
   
  "save" writes selected atoms to a file.  The file format is
+
Note that if the file extension ends in ".pse" (PyMOL Session), the
  autodetected if the extesion is ".pdb", ".pse", ".mol", ".mmod", or
+
complete PyMOL state is always saved to the file (the selection and
  ".pkl"
+
state parameters are thus ignored).
 
  Note that if the file extension ends in ".pse" (PyMOL Session), the
 
  complete PyMOL state is always saved to the file (the selection and
 
  state parameters are thus ignored).
 
 
   
 
   
 
===USAGE===
 
===USAGE===
<pre>
+
<source lang="python">
  save file [,(selection) [,state [,format]] ]
+
save file [,(selection) [,state [,format]] ]
</pre>
+
</source>
 
===PYMOL API===
 
===PYMOL API===
<source lang="python">
+
<source lang="python">
  cmd.save(file, selection, state, format)
+
cmd.save(file, selection, state, format)
</source>
+
</source>
+
 
 
===NOTES===
 
===NOTES===
+
* When saving a session file, then "state" has no effect.
  When saving a session file, then "state" has no effect.
+
* When state = 0 (default), only the current state is written.
  When state = 0 (default), only the current state is written.
+
* When state = -1, then a multi-state output file is written (PDB only).
  When state = -1, then a multi-state output file is written (PDB only).
+
 
 
+
* In versions 1.XX, a multi-state output file is written when state = 0 (which is not default)
 
===SEE ALSO===
 
===SEE ALSO===
 
 
   [[Cmd load]], [[Cmd get_model]]
 
   [[Cmd load]], [[Cmd get_model]]
  
 
[[Category:Commands|save]]
 
[[Category:Commands|save]]

Revision as of 12:14, 22 May 2008

DESCRIPTION

save writes selected atoms to a file. The file format is autodetected if the extesion is ".pdb", ".pse", ".mol", ".mmod", or ".pkl"

Note that if the file extension ends in ".pse" (PyMOL Session), the complete PyMOL state is always saved to the file (the selection and state parameters are thus ignored).

USAGE

save file [,(selection) [,state [,format]] ]

PYMOL API

cmd.save(file, selection, state, format)

NOTES

  • When saving a session file, then "state" has no effect.
  • When state = 0 (default), only the current state is written.
  • When state = -1, then a multi-state output file is written (PDB only).
  • In versions 1.XX, a multi-state output file is written when state = 0 (which is not default)

SEE ALSO

  Cmd load, Cmd get_model