[Chimera-users] Flipping the handedness of a molecule
pett at cgl.ucsf.edu
Thu Sep 2 15:55:15 PDT 2010
On Sep 2, 2010, at 12:16 PM, Michael Day wrote:
> How do you flip the handedness of a molecule?
> I need to overlap two molecules that are numbered the same but have
> different handedness.
I don't think there's a way to do this without resorting to Python
code. Nonetheless, it can be done with pretty simple Python code.
The code below will invert the handedness of currently selected models
by inverting the X coordinate. Put the code in a .py file and open it
with File...Open or with the "open" command, or type the code into the
IDLE interpreter (under Tools...General Controls).
for m in chimera.selection.currentMolecules():
for a in m.atoms:
crd = a.coord()
crd.x = -crd.x
UCSF Computer Graphics Lab
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users