[Chimera-users] Interpretation of fitmap translation vector

Tom Goddard goddard at sonic.net
Tue Jul 21 13:56:50 PDT 2020

```A couple more details. Your two maps can have different origins.  If you fit map A into map B the reported rotation/translation takes a point in the A coordinate system (Angstroms) to its position in the B coordinate system (Angstroms).  So both origins are used.

Tom

> On Jul 21, 2020, at 1:46 PM, Tom Goddard <goddard at sonic.net> wrote:
>
> Hi Benjamin,
>
>   The bit you are missing is that the rotation is about an origin that need not be the center of the map, often it is the corner of the map, it is specified in the MRC file header. The rotation and translation output by fitmap applies to coordinates in physical units (Angstroms) using the origin and voxel size (in Angstroms) of each of the maps.  The rotation is applied about the origin and after that the translation is applied.  I don't know what the origin is for your maps it is listed in Chimera Volume Viewer menu Features / Coordinates / Origin Index.  Let's suppose it is says origin index is 0.  That means the rotation is about the corner of the map (grid index 0,0,0) not the center.  So your fit that rotates around the center by say 30 degrees will report a rotation by 30 degrees.  Doing that rotation about the corner throws the center of the map far away, so there is a corresponding big translation to bring it back since your fit did not move the center much.   The MRC file could instead have specified the origin at the center of the map, for instance map size 264 with origin index (131.5, 131.5, 131.5) would define the Angstrom x,y,z origin at the center, and fitmap report a different translation with that origin.
>
> 	Tom
>
>
>> On Jul 21, 2020, at 10:31 AM, Benjamin Basanta <bbasanta at scripps.edu <mailto:bbasanta at scripps.edu>> wrote:
>>
>> Hi,
>>
>> I am trying to implement a python script that takes a rotation matrix and a translation vector from Chimeras' fitmap output, and applies those rotations and translations to particle 2D projections from electron micrographs. I have successfully applied the reverse rotation, getting 3D reconstructions that are almost aligned, except for the translation. I am having problems interpreting the values of the translation vector (4th column from fitmap output matrix). According to information I found online the units of this vector are angstroms, but the length of the translation vector output by fitmap would put my density near the edge of the particle box. My interpretation of the tranlation vector is the following: original_position + trans_vec = new_position.
>>
>> For example, I have two densities (box size 264^3, angpix correctly set to 1.15Å), both near the center of the box, fitmap aligns them with what is clearly a small translation after rotation, yet I get the following fitmap output, with a translation vector of length >180Å:
>>
>> > fitmap #1 #0 search 50
>> Found 34 unique fits from 50 random placements having fraction of points inside contour >= 0.100 (50 of 50).
>> Correlations and times found:
>> 0.9847 (1), 0.9722 (5), 0.9523 (3), 0.9044 (2), 0.8574 (2), 0.8567 (2), 0.8534 (1), 0.8503 (2), 0.849 (2), 0.832 (2), 0.8317 (2), 0.8274 (1), 0.8225 (3), 0.8205 (1), 0.8184 (1), 0.8062 (1), 0.8058 (1), 0.8043 (2), 0.8017 (1), 0.8007 (1), 0.7977 (1), 0.7809 (1), 0.78 (1), 0.7761 (1), 0.7566 (1), 0.7557 (1), 0.7555 (1), 0.7467 (1), 0.7431 (1), 0.7145 (1), 0.7062 (1), 0.6922 (1), 0.6049 (1), 0.6015 (1)
>> Best fit found:
>> Fit map run_it025_class003.mrc in map run_it025_class002.mrc using 70798 points
>>   correlation = 0.9847, correlation about mean = 0.6976, overlap = 38.71
>>   steps = 448, shift = 52.7, angle = 48.4 degrees
>> Position of run_it025_class003.mrc (#1) relative to run_it025_class002.mrc (#0) coordinates:
>>   Matrix rotation and translation
>>      0.98449497  -0.14831781   0.09365615  14.82575334
>>      0.15479139   0.48339849  -0.86160636 179.12850738
>>      0.08251833   0.86274430   0.49886170 -54.91381047
>>   Axis   0.98487954   0.00636148   0.17312375
>>   Axis point   0.00000000 137.68459847 125.30174028
>>   Rotation angle (degrees)  61.09376942
>>   Shift along axis   6.23421857
>>
>> Disallowing fitmap shift outputs an even larger translation, which I find odd:
>>
>> > fitmap #1 #0 search 50 shift false
>> Found 35 unique fits from 50 random placements having fraction of points inside contour >= 0.100 (35 of 50).
>> Correlations and times found:
>> 0.8342 (1), 0.8038 (1), 0.7294 (1), 0.699 (1), 0.6862 (1), 0.685 (1), 0.6602 (1), 0.6548 (1), 0.6403 (1), 0.6318 (1), 0.629 (1), 0.6281 (1), 0.6145 (1), 0.6072 (1), 0.601 (1), 0.582 (1), 0.5695 (1), 0.5682 (1), 0.5529 (1), 0.544 (1), 0.5386 (1), 0.5317 (1), 0.5225 (1), 0.5152 (1), 0.5049 (1), 0.4984 (1), 0.4933 (1), 0.4718 (1), 0.4715 (1), 0.4698 (1), 0.4515 (1), 0.44 (1), 0.4243 (1), 0.4102 (1), 0.3598 (1)
>> Best fit found:
>> Fit map run_it025_class003.mrc in map run_it025_class002.mrc using 70798 points
>>   correlation = 0.8342, correlation about mean = 0.1402, overlap = 24.51
>>   steps = 224, shift = 3.75e-13, angle = 59.1 degrees
>> Position of run_it025_class003.mrc (#1) relative to run_it025_class002.mrc (#0) coordinates:
>>   Matrix rotation and translation
>>     -0.99670235  -0.06634245  -0.04672373 320.71861709
>>     -0.08010133   0.71238040   0.69720724 -47.18870041
>>     -0.01296937   0.69865073  -0.71534534 162.45334925
>>   Axis   0.03956990  -0.92529900  -0.37716838
>>   Axis point 158.55880471   0.00000000  92.42576286
>>   Rotation angle (degrees) 178.95488392
>>   Shift along axis  -4.91780500
>>
>> I am clearly missing something, how should I interpret the translation vector output by fitmap?
>>
>> Thank you for your help,
>> Benjamin
>>
>>
>>
>> _______________________________________________
>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
>> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200721/c3caec30/attachment-0001.html>
```