[chimera-dev] Moving a residue and an VRML object

Tom Goddard goddard at sonic.net
Wed Oct 17 13:25:18 PDT 2012


The arrow you drew has no idea that the atoms have moved, so of course 
it doesn't move with them.  If you just want to rigidly rotate the whole 
molecule in Python you can change the matrix that places it in space

     mol.openState.xform = xf

instead of changing the coordinates of atoms.  Then you could rigidly 
move the VRML model in the same way so that the arrow stays in the same 
position relative to the molecule.

     vrml.openState.xform = xf

If you are not moving the molecule rigidly then you really do need to 
move individual atoms and then you will have to delete the old arrow and 
make a new arrow if it is intended to have its ends follow certain atoms.

     Tom


-------- Original Message --------
Subject: [chimera-dev] Moving a residue and an VRML object
From: ladam
To: chimera-dev at cgl.ucsf.edu
Date: 10/17/12 4:45 AM
> Hi all,
> I have a problem associating a vrml object an a molecule :
> Let's say I have an arrow created using the bild format to which I gave
> 0.0 0.0 0.0 coordinates.
> This arrow and the molecule translate/rotate together using the mouse.
> Now if I translate / rotate my molecule using the setcoord command on
> the atoms in a python script, the arrow won't follow up the molecule.
> I tried the addAssociatedModel command to link the arrow and the
> molecule but still the same result.
> How can I handle this?
> Thanks for your attention
>




More information about the Chimera-dev mailing list