[chimera-dev] Problem using: "openModels.add"

Eric Pettersen pett at cgl.ucsf.edu
Sun Dec 7 10:13:40 PST 2003


On Saturday, December 6, 2003, at 12:59  PM, Lars Kunert wrote:

> Hi!
>
> How do I set the transformation matrix by hand? (and how do I get it? )

Hi Lars,
	This seems like a good opportunity to plug the Programmer's FAQ 
(http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/faq.html), which 
is relatively new but still has been around for a few months now.  In 
particular question #9 ("Explanation of openState attribute"; not 
really a question, I know) covers this topic.  In short, to set one 
model's transformation to be the same as another model's:

	# set model1's transform to be the same as model2's
	model1.openState.xform = model2.openState.xform

I should point out the the transform is being _copied_ -- therefore the 
models can still be moved independently afterward.  The FAQ also covers 
how to make them use the same instance of a transform and therefore 
move in synchrony.  Question #4 ("How to rotate/translate individual 
models") is probably also of interest here.

--Eric



More information about the Chimera-dev mailing list