
Salut, The other trick is to give the VRML model the same model id and submodel id as its associated model. Then the openState is identical, so there would be no need to copy the transformation matrix. Again, this only works for rigid rotations. -- Greg On 10/17/2012 01:25 PM, Tom Goddard wrote:
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@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
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev