[chimera-dev] Accessing rotation matrix of molecule models

Mike Liang mliang at stanford.edu
Thu Jul 18 16:55:12 PDT 2002

Hi Elaine,

Thanks for your response.

I've been playing with the python interface to the chimera modules and I
think I'm having some success.  The HappyDoc generated documentation isn't
very helpful, especially when most function documentation is just
"FunctionName documentation"

In any case, I found that I can get access to the transforms through
model.openState.xform.  However in the documentation there is something
called 'globalXform' and 'localXform' for setting xform, and I don't know
what that means.  Are there two different transforms, or just one?  If there
are two, how do I retrieve them individually and which one should I

Also if I want one structure to have the same xform as another structure,
can I just assign the xform attribute of the openState?  Or will this end up
having the two models share the object and cause problems?

Oh, one more thing.  Is the xform applied by translation first then
rotation?  If that's the case, I was wondering why spinning a molecule
causes the translation vector of the xform to change.  I would expect it to
be the same because it is spinning on the same center (maybe I'm wrong).

Yeah, lots of questions, but thanks for any help you can give!

----- Original Message -----
From: "Elaine Meng" <meng at cgl.ucsf.EDU>
To: <mliang at Stanford.EDU>
Cc: <chimera-dev at cgl.ucsf.EDU>
Sent: Thursday, July 18, 2002 4:34 PM
Subject: Re: [chimera-dev] Accessing rotation matrix of molecule models

> Hello Mike,
> We haven't yet implemented the matrixget/matrixset commands that were
> in the predecessor program Midas.  The write command just got implemented
> but is not in the released version (it will be in the next release).
> In the meanwhile, I can think of a few possibilities:
>   (1) individual distances can be measured manually within Chimera
>    ("distance" command or Controllers...Distances)
>   (2) if you are on unix, the "pdbrun" command can be used to send out
>    the coordinates of everything that is displayed.  Note that the
>    coordinates of both structures would be transformed, but you would
>    be able to use these coordinate sets for the position of one relative
>    to the other.  The command would look something like
>         pdbrun nouser cat > bothstructures.pdb
>    You would have to make sure that all the atoms you want the coordinates
>    of in the file bothstructures.pdb are displayed.
>    All displayed models are in the output file, with END between them;
>    you might need to make separate files out of this output file,
>    on what you want to do next.
>   (3) there is probably some not too complicated way to get and apply
>    the transformation matrices out using the Python interface or a Python
>    script, but I am not skilled in this area - other members of the
>    team could probably give you more details.
> I hope this helps.  Anybody else with current solutions, please chime
> In the next version, I think the simplest way would be to use the "write"
> command to save the coordinates of one model relative to those of the
> Elaine
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Elaine C. Meng, R.Ph., Ph.D.
> Babbitt Lab and Computer Graphics Lab
> meng at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/home/meng/index.html
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

More information about the Chimera-dev mailing list