[Chimera-users] translation and rotation in MATLAB using transformation matrices from chimera

Oleksiy Kovtun okovtun at mrc-lmb.cam.ac.uk
Wed May 10 03:10:59 PDT 2017




Hi Tom, 
Thank you for the explanations. I did not touch the
maps after opening and ensured that the matrices reported by matrixget,
measure rotation and fitmap commands were identical. There was no origin
offset either.   And yet if I apply these reported rotation and
translation, the translation is constantly off by what seems to be varying
value. I however found the way to achieve correct translation. The trick
is to apply  rotation only first. Then fit this rotated map to the
reference again. The reported translation is correct this time.
 
Still puzzled with why I first reported translation is not
equal to the second. 
Cheers, 
Oleksiy
> Hi
Oleksiy,

>

> I’m not sure the cause of your MATLAB positioning
problem, but here is

> an explanation of the Chimera matrices that may be helpful.

>

> First the Chimera command matrixget gives the position in the
Chimera

> scene including any mouse rotation and translation you did to view
the

> models. So you would have to consider positioning matrices for
both

> maps. Even when you first open the maps and don’t
move them, then fit

> one in the other, both maps probably have non-zero translations
since

> the initial centering of the view on the first map does a
translation.

> So using matrixget is not a good way to get the position of one
map

> relative to another, unless you are going to invert one of the
matrices

> and multiply times the other. Instead use the
“measure rotation”

> command (e.g. measure rotation #0 #1) which reports a matrix in
the

> reply log giving the motion of map #1 relative to the coordinates of
map

> #2.

>

> Another thing to be aware of is that these 3x4 matrices contain a

> rotation (the first 3 columns) and a translation (4th column) and
the

> rotation is applied first, followed by the translation. The rotation
is

> about center x,y,z = (0,0,0) but that is not necessarily grid
point

> i=j=k=0 because the MRC file can have an origin offset. If you look
in

> the Chimera volume viewer dialog coordinates panel (volume viewer
menu

> Features / Coordinates) the origin grid index is given as
“Origin

> index”. That is the grid point the rotation is centered
on.

>

> Tom

>

>

>> On Apr 24, 2017, at 9:30 AM, Oleksiy Kovtun
<okovtun at mrc-lmb.cam.ac.uk>

>> wrote:

>>

>>

>>

>>

>>

>> Dear all,

>> I need to merge two maps in MATLAB using

>> alignment data from chimera. Inputs: two maps of the same box
size,

>> origin. I use matrixget - to report translation and rotation

>> matrices for the aligned map . Translation operation works well
when

>> transferred into MATLAB (briefly, translation matrix gets
converted in

>> eulers and pased on to tom_rotate command in MATLAB, TOM
package).

>> However the x y z translation coordinates (the fourth column top
to

>> bottom in matrixget - output) are way off the real translation
when

>> using tom_shift command in MATLAB, TOM.

>> I found out that if I open the rotated map

>> and fit it again, it gives close to correct translation

>> matrix.

>>

>> What's going wrong here? Does anyone have a

>> solution how to overlay 3D arrays in MATLAB using
chimera-reported

>> transformation matrices?

>>

>> Many

>> thanks,

>> Oleksiy

>>

>>

>>

>> Dr Oleksiy Kovtun

>>

>> Research Fellow

>>

>> Briggs group

>>

>> MRC Laboratory of Molecular Biology

>>

>> Francis Crick Avenue

>>

>> Cambridge

>>

>> CB2 0QH

>>

>> UK

>>

>>

>>

>> Tel: + 44 1223 267551

>>

>> Email: okovtun at mrc-lmb.cam.ac.uk

>>

>>

>>

>> Dr Oleksiy Kovtun

>> Research Fellow

>> Briggs group

>> MRC Laboratory of Molecular Biology

>> Francis Crick Avenue

>> Cambridge

>> CB2 0QH

>> UK

>>

>> Tel: + 44 1223 267551

>> Email: okovtun at mrc-lmb.cam.ac.uk

>>

>>
<untitled-[2].html>_______________________________________________

>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu

>> Manage subscription:

>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

>

>





Dr Oleksiy Kovtun

Research Fellow

Briggs group

MRC Laboratory of Molecular Biology

Francis Crick Avenue

Cambridge

CB2 0QH

UK



Tel: + 44 1223 267551

Email: okovtun at mrc-lmb.cam.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20170510/7a15b10b/attachment.html>


More information about the Chimera-users mailing list