This is a read-only mirror of

Get Coordinates I

From PyMOL Wiki
Revision as of 16:28, 10 April 2011 by Speleo3 (talk | contribs) (alternatives)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
# This script gets a copy of the coordinates in Python,
# rotates the object about the Z axis, and then
# updates the coordinates in the original object.

from pymol import cmd

model = cmd.get_model("pept")
for a in model.atom:
   a.coord=[ -a.coord[1], a.coord[0], a.coord[2]]


The same result can be achieved also like this:

alter_state 1, pept, (x,y,z) = (-y,x,z)

or like this:

rotate z, 90, pept, camera=0, origin=[0,0,0]