Save: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
Line 1: Line 1:
===DESCRIPTION===
===DESCRIPTION===
'''save''' writes selected atoms to a file.  The file format is
'''save''' writes selected atoms to a file.   
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).


If aligning two structures
* The file format is autodetected if the extension is ".pdb", ".pse", ".mol", ".mmod", or ".pkl".
<source lang="python">
* 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).
* CLUSTALW formatted alignments can be written by PyMOL as well. Once you perform an alignment like the following,
::<source lang="python">
  align proteinA, proteinB, object=A_on_B
  align proteinA, proteinB, object=A_on_B
</source>
</source>
a clustal formatted alignment file can be written
::the alignment can be written using:
<source lang="python">
::<source lang="python">
save A_aligned_with_B.aln, A_on_B
save A_aligned_with_B.aln, A_on_B
</source>
</source>

Revision as of 09:57, 22 October 2009

DESCRIPTION

save writes selected atoms to a file.

  • The file format is autodetected if the extension is ".pdb", ".pse", ".mol", ".mmod", or ".pkl".
  • 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).
  • CLUSTALW formatted alignments can be written by PyMOL as well. Once you perform an alignment like the following,
 align proteinA, proteinB, object=A_on_B
the alignment can be written using:
save A_aligned_with_B.aln, A_on_B

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

  Load, Get Model