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
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
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: <http://www.cgl.ucsf.edu/chimera/alpha-downloads.html> Best, Elaine ----- Elaine C. Meng, Ph.D. meng@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
Hi Huy, To add a bit to what Elaine and Greg said, here is the command to rotate map #0 about its local z axis with the center specified in map coordinates (physical units using volume voxel size and origin, not grid indices): turn z 30 center 0,0,0 coord #0 And if you have other models open but only want to rotate map #0 then you can use turn z 30 center 0,0,0 coord #0 model #0 These extra options to the "turn" command are only available in the Chimera 1.4 daily builds. http://www.cgl.ucsf.edu/chimera/alpha-downloads.html Here's the new documentation for "turn": http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/turn.html Tom Elaine Meng wrote:
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: <http://www.cgl.ucsf.edu/chimera/alpha-downloads.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. meng@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
Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (4)
-
Bui Khanh Huy
-
Elaine Meng
-
Greg Couch
-
Thomas Goddard