Translate: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 1: Line 1:
===DESCRIPTION===
===DESCRIPTION===
'''translate''' can be used to translate the atomic coordinates of a molecular object.  Behavior differs depending on whether or not the "object" parameter is specified.
If object is None, then translate translates atomic coordinates according to the vector provided for the selection and in the state provided.  All representation geometries will need to be regenerated to reflect the new atomic coordinates.
   
   
  "translate" can be used to translate the atomic coordinates of a
If object is set to an object name, then selection and state are ignored and instead of translating the atomic coordinates, the object's overall representation display matrix is modified.  This option is for use in animations only.
  molecular object.  Behavior differs depending on whether or not the
  "object" parameter is specified.
  If object is None, then translate translates atomic coordinates
  according to the vector provided for the selection and in the state
  provided.  All representation geometries will need to be
  regenerated to reflect the new atomic coordinates.
  If object is set to an object name, then selection and state are
  ignored and instead of translating the atomic coordinates, the
  object's overall representation display matrix is modified.  This
  option is for use in animations only.
  The "camera" option controls whether the camera or the model's
  axes are used to interpret the translation vector.
   
   
The "camera" option controls whether the camera or the model's axes are used to interpret the translation vector.
===USAGE===
===USAGE===
   
 
  translate vector [,selection [,state [,camera [,object ]]]]
  translate vector [,selection [,state [,camera [,object ]]]]
 
===PYMOL API===
===PYMOL API===
<source lang="python">
<source lang="python">
  cmd.translate(list vector, string selection = "all", int state = 0,
cmd.translate(list vector, string selection = "all", int state = 0,
                int camera = 1, string object = None)
              int camera = 1, string object = None)
</source>
</source>


===EXAMPLES===
===EXAMPLES===
   
  translate [1,0,0], name ca
  translate [1,0,0], name ca
 
===NOTES===
===NOTES===
# if state = 0, then only visible state(s) are affected.
  if state = 0, then only visible state(s) are affected.
# if state = -1, then all states are affected.  
  if state = -1, then all states are affected.  


[[Category:Commands|translate]]
[[Category:Commands|translate]]

Revision as of 12:03, 29 June 2005

DESCRIPTION

translate can be used to translate the atomic coordinates of a molecular object. Behavior differs depending on whether or not the "object" parameter is specified.

If object is None, then translate translates atomic coordinates according to the vector provided for the selection and in the state provided. All representation geometries will need to be regenerated to reflect the new atomic coordinates.

If object is set to an object name, then selection and state are ignored and instead of translating the atomic coordinates, the object's overall representation display matrix is modified. This option is for use in animations only.

The "camera" option controls whether the camera or the model's axes are used to interpret the translation vector.

USAGE

translate vector [,selection [,state [,camera [,object ]]]]

PYMOL API

cmd.translate(list vector, string selection = "all", int state = 0,
              int camera = 1, string object = None)

EXAMPLES

translate [1,0,0], name ca

NOTES

  1. if state = 0, then only visible state(s) are affected.
  2. if state = -1, then all states are affected.