<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Oleksiy,<div class=""><br class=""></div><div class=""> I’m sure there is a simple explanation of what is going on, but you need to give me a full description of the problem — exactly how you get the matrix that doesn’t work, and how you try to use that matrix which produces the wrong position, including the writing of temp files, .... I can’t figure it out knowing just fragments of your procedure.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On May 10, 2017, at 3:10 AM, Oleksiy Kovtun <<a href="mailto:okovtun@mrc-lmb.cam.ac.uk" class="">okovtun@mrc-lmb.cam.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p class="">Hi Tom, </p><p class="">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.
</p><p class="">Still puzzled with why I first reported translation is not
equal to the second. </p><p class="">Cheers, </p><p class="">Oleksiy</p><p class="">> Hi
Oleksiy,<br class="">
><br class="">
> I’m not sure the cause of your MATLAB positioning
problem, but here is<br class="">
> an explanation of the Chimera matrices that may be helpful.<br class="">
><br class="">
> First the Chimera command matrixget gives the position in the
Chimera<br class="">
> scene including any mouse rotation and translation you did to view
the<br class="">
> models. So you would have to consider positioning matrices for
both<br class="">
> maps. Even when you first open the maps and don’t
move them, then fit<br class="">
> one in the other, both maps probably have non-zero translations
since<br class="">
> the initial centering of the view on the first map does a
translation.<br class="">
> So using matrixget is not a good way to get the position of one
map<br class="">
> relative to another, unless you are going to invert one of the
matrices<br class="">
> and multiply times the other. Instead use the
“measure rotationâ€<br class="">
> command (e.g. measure rotation #0 #1) which reports a matrix in
the<br class="">
> reply log giving the motion of map #1 relative to the coordinates of
map<br class="">
> #2.<br class="">
><br class="">
> Another thing to be aware of is that these 3x4 matrices contain a<br class="">
> rotation (the first 3 columns) and a translation (4th column) and
the<br class="">
> rotation is applied first, followed by the translation. The rotation
is<br class="">
> about center x,y,z = (0,0,0) but that is not necessarily grid
point<br class="">
> i=j=k=0 because the MRC file can have an origin offset. If you look
in<br class="">
> the Chimera volume viewer dialog coordinates panel (volume viewer
menu<br class="">
> Features / Coordinates) the origin grid index is given as
“Origin<br class="">
> indexâ€. That is the grid point the rotation is centered
on.<br class="">
><br class="">
> Tom<br class="">
><br class="">
><br class="">
>> On Apr 24, 2017, at 9:30 AM, Oleksiy Kovtun
<<a href="mailto:okovtun@mrc-lmb.cam.ac.uk" class="">okovtun@mrc-lmb.cam.ac.uk</a>><br class="">
>> wrote:<br class="">
>><br class="">
>><br class="">
>><br class="">
>><br class="">
>><br class="">
>> Dear all,<br class="">
>> I need to merge two maps in MATLAB using<br class="">
>> alignment data from chimera. Inputs: two maps of the same box
size,<br class="">
>> origin. I use matrixget - to report translation and rotation<br class="">
>> matrices for the aligned map . Translation operation works well
when<br class="">
>> transferred into MATLAB (briefly, translation matrix gets
converted in<br class="">
>> eulers and pased on to tom_rotate command in MATLAB, TOM
package).<br class="">
>> However the x y z translation coordinates (the fourth column top
to<br class="">
>> bottom in matrixget - output) are way off the real translation
when<br class="">
>> using tom_shift command in MATLAB, TOM.<br class="">
>> I found out that if I open the rotated map<br class="">
>> and fit it again, it gives close to correct translation<br class="">
>> matrix.<br class="">
>><br class="">
>> What's going wrong here? Does anyone have a<br class="">
>> solution how to overlay 3D arrays in MATLAB using
chimera-reported<br class="">
>> transformation matrices?<br class="">
>><br class="">
>> Many<br class="">
>> thanks,<br class="">
>> Oleksiy<br class="">
>><br class="">
>><br class="">
>><br class="">
>> Dr Oleksiy Kovtun<br class="">
>><br class="">
>> Research Fellow<br class="">
>><br class="">
>> Briggs group<br class="">
>><br class="">
>> MRC Laboratory of Molecular Biology<br class="">
>><br class="">
>> Francis Crick Avenue<br class="">
>><br class="">
>> Cambridge<br class="">
>><br class="">
>> CB2 0QH<br class="">
>><br class="">
>> UK<br class="">
>><br class="">
>><br class="">
>><br class="">
>> Tel: + 44 1223 267551<br class="">
>><br class="">
>> Email: <a href="mailto:okovtun@mrc-lmb.cam.ac.uk" class="">okovtun@mrc-lmb.cam.ac.uk</a><br class="">
>><br class="">
>><br class="">
>><br class="">
>> Dr Oleksiy Kovtun<br class="">
>> Research Fellow<br class="">
>> Briggs group<br class="">
>> MRC Laboratory of Molecular Biology<br class="">
>> Francis Crick Avenue<br class="">
>> Cambridge<br class="">
>> CB2 0QH<br class="">
>> UK<br class="">
>><br class="">
>> Tel: + 44 1223 267551<br class="">
>> Email: <a href="mailto:okovtun@mrc-lmb.cam.ac.uk" class="">okovtun@mrc-lmb.cam.ac.uk</a><br class="">
>><br class="">
>>
<untitled-[2].html>_______________________________________________<br class="">
>> Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">
>> Manage subscription:<br class="">
>> <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class="">
><br class="">
><br class="">
<br class="">
<br class="">
Dr Oleksiy Kovtun<br class="">
Research Fellow<br class="">
Briggs group<br class="">
MRC Laboratory of Molecular Biology<br class="">
Francis Crick Avenue<br class="">
Cambridge<br class="">
CB2 0QH<br class="">
UK<br class="">
<br class="">
Tel: + 44 1223 267551<br class="">
Email: <a href="mailto:okovtun@mrc-lmb.cam.ac.uk" class="">okovtun@mrc-lmb.cam.ac.uk</a></p></div></blockquote></div><br class=""></div></body></html>