Get Coordinates I

From PyMOLWiki
Revision as of 20:36, 3 March 2005 by Warren (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
# 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]]

cmd.load_model(model,"tmp")
cmd.update("pept","tmp")
cmd.delete("tmp")