This is a read-only mirror of pymolwiki.org

Difference between revisions of "Alter State"

From PyMOL Wiki
Jump to navigation Jump to search
 
m
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===DESCRIPTION===
 
===DESCRIPTION===
+
'''alter_state''' changes the atomic coordinates of a particular state using the python evaluator with a separate name space for each atom.  The symbols defined in the name space are:
  "alter_state" changes the atomic coordinates of a particular state
+
* x
  using the python evaluator with a separate name space for each
+
* y
  atom.  The symbols defined in the name space are:
+
* z
+
 
      x,y,z
 
 
 
===USAGE===
 
===USAGE===
+
<source lang="python">
  alter_state state,(selection),expression
+
alter_state state,(selection),expression
+
</source>
 +
 
 
===EXAMPLES===
 
===EXAMPLES===
+
<source lang="python">
  alter_state 1,(all),x=x+5
+
# Alter the X coordinate for all
+
alter_state 1,(all),x=x+5
 +
 
 +
#Shift the coordinates of the entire PDB file
 +
alter_state 1,selection,(x,y,z)=(newx,newy,newz)
 +
</source>
 +
 
 
===SEE ALSO===
 
===SEE ALSO===
+
[[Iterate_State]], [[alter]], [[iterate]]
  [[Cmd iterate_state]], [[Cmd alter]], [[Cmd iterate]]
 
  
[[Category:Commands|alter_state]]
+
[[Category:Commands|Alter State]]
 +
[[Category:States|Alter State]]

Revision as of 13:38, 20 June 2009

DESCRIPTION

alter_state changes the atomic coordinates of a particular state using the python evaluator with a separate name space for each atom. The symbols defined in the name space are:

  • x
  • y
  • z

USAGE

alter_state state,(selection),expression

EXAMPLES

# Alter the X coordinate for all
alter_state 1,(all),x=x+5

#Shift the coordinates of the entire PDB file
alter_state 1,selection,(x,y,z)=(newx,newy,newz)

SEE ALSO

Iterate_State, alter, iterate