# [Chimera-users] Chimera rotational matrix

Elaine Meng meng at cgl.ucsf.edu
Mon Dec 1 09:57:33 PST 2008

```Hi Huy,
Just to add to what Greg said:
In recent builds of Chimera, the movement commands (roll etc.) have
been improved so that you can specify the center of rotation to use in
that movement, without changing the Chimera interactive center of
rotation.

For example,

roll z -30 1 center 0,0,0

will use 0,0,0 in the "laboratory" frame of reference as the rotation
center for the roll.  You can also specify a center in the coordinate
system (frame of reference) of any of the models instead of the
laboratory frame of reference.
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/roll.html>

The transformation matrix can be shown in the Reply Log with the
command:

matrixget -

<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/matrixset.html>
If you didn't do any other movements and then used the roll command
above, the translation vector in the fourth column of the matrix would
contain zeros.

The improved movement commands are available in recent daily builds:

Best,
Elaine
-----
Elaine C. Meng, Ph.D.                          meng at cgl.ucsf.edu
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco
http://www.cgl.ucsf.edu/home/meng/index.html

On Nov 30, 2008, at 9:45 PM, Greg Couch wrote:

> On Thu, 27 Nov 2008, Bui  Khanh Huy wrote:
>
>> Hi,
>> I notice that Chimera has slightly different in calculation of
>> transform
>> when I tried to rotate my EM density (200x200x200 mrc file) using
>> Chimera. The origin of the density reported by Volume Viewer is 0,0,0
>>
>> First, I print out the homologous transform matrix using:
>>
>>>>> om = chimera.openModels
>>>>> mlist = om.list()
>>>>> m = mlist[0]
>>>>> print m.openState.xform
>>
>> The transformation is:
>>
>> 1 0 0 0
>> 0 1 0 0
>> 0 0 1 0
>>
>> If I rotate the model using command:
>>
>> roll z -30 1
>>
>> Then print out the transform matrix again:
>>
>> 0.866025 0.5 0 -36.8852
>> -0.5 0.866025 0 61.2937
>> 0 0  0 1
>>
>> That would be weird because I didn't do any translation.
>> So what is really happening in Chimera when I rotate the model?
>> Best,
>> Huy
>
> The model is rotated about its center.  So unless your model is
> centered at the origin there will be a translation component.  If the
> rotation is R, and T is the translation to the center, then the actual
> rotation is:
>
> 	R' = T R (-T)
>
> Chimera has many different ways to choose the center.  See
> <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/sideview.html#rotation
> >
> for details.
>
> 	Greg Couch
> 	UCSF Computer Graphics Lab

```