[chimerax-users] A question about model position matrix
Elaine Meng
meng at cgl.ucsf.edu
Thu Mar 31 08:20:24 PDT 2022
Dear Zheng,
I believe it is because the center of rotation from your command is not the same as the center of the model. If the center of rotation is far from the model, it might be translated a large distance in addition to being rotated. You can specify the center of rotation for the "turn" command with the "center" option. I believe that if you use
turn z 90 models #1 center #1
...the translation of the model would then be zero or close to zero.
See help for "turn"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/turn.html>
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Mar 30, 2022, at 8:18 PM, Zheng Ruan via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Dear ChimeraX users,
>
> I'm trying to understand the model position matrix. According to the documentation, "Each matrix is reported as 12 comma-separated numbers, corresponding to a 3x3 rotation matrix and a translation vector in the fourth column. Ordering is row-by-row, such that the translation vector is given as the fourth, eighth, and twelfth numbers."
>
> When I load a model into ChimeraX and use "view matrix" command to check the model position, I got "#1,1,0,0,0,0,1,0,0,0,0,1,0,#1.1,1,0,0,0,0,1,0,0,0,0,1,0". The rotation matrix for #1 is an identity matrix with translation vector to be 0 for all directions.
>
> However, if I rotate the model using the command "turn z 90 models #1" and then check the model position using "view matrix", I got something like "#1,1.1102e-16,-1,0,689.33,1,1.1102e-16,0,-1.9358,0,0,1,0,#1.1,1,0,0,0,0,1,0,0,0,0,1,0". The translation vector for #1 becomes (689.33, -1.9358, 0).
>
> Since I only applied a simple rotation of the model along z-axis, why the translation vector becomes non-zero in this case? I hope to have a better understanding of how ChimeraX handles the model position matrix to describe model positions.
>
> Thank you so much!
> Best,
> Zheng
More information about the ChimeraX-users
mailing list