Center: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
===DESCRIPTION===
 
'''center''' translates the window, the clipping slab, and the origin to a point centered within the atom selection.
  "center" translates the window, the clipping slab, and the
 
  origin to a point centered within the atom selection.
===PYMOL API===
===PYMOL API===
<source lang="python">
<source lang="python">
  cmd.center( string selection, int state = 0, int origin = 1 )
cmd.center( string selection, int state = 0, int origin = 1 )
</source>
</source>
===NOTES===
===NOTES===
* state = 0 (default) use all coordinate states
* state = -1 use only coordinates for the current state
* state > 0  use coordinates for a specific state
   
   
  state = 0 (default) use all coordinate states
* origin = 1 (default) move the origin
  state = -1 use only coordinates for the current state
* origin = 0 leave the origin unchanged
  state > 0 use coordinates for a specific state
 
== User Example ==
  origin = 1 (default) move the origin
* Center around any given point
  origin = 0 leave the origin unchanged
<source lang="python">
# define the point as x=1.0, y=2.0, z=3.0; replace [1.0, 2.0, 3.0] with your coordinate.
origin position=[1.0,2.0,3.0]
# center on it
center origin
</source>
 
===SEE ALSO===
===SEE ALSO===
[[Origin]], [[Orient]], [[Zoom]]  
  [[CmdScript.origin|origin]], [[CmdScript.orient|orient]], [[CmdScript.zoom|zoom]]
  [[Cmd.origin]], [[Cmd.orient]], [[Cmd.zoom]]


[[Category:Cmd|Cmd]]
[[Category:Commands|Center]]
[[Category:States|Center]]

Latest revision as of 13:27, 17 November 2009

center translates the window, the clipping slab, and the origin to a point centered within the atom selection.

PYMOL API

cmd.center( string selection, int state = 0, int origin = 1 )

NOTES

  • state = 0 (default) use all coordinate states
  • state = -1 use only coordinates for the current state
  • state > 0 use coordinates for a specific state
  • origin = 1 (default) move the origin
  • origin = 0 leave the origin unchanged

User Example

  • Center around any given point
# define the point as x=1.0, y=2.0, z=3.0; replace [1.0, 2.0, 3.0] with your coordinate.
origin position=[1.0,2.0,3.0]
# center on it
center origin

SEE ALSO

Origin, Orient, Zoom