[Chimera-users] chimera/coot coordinates way off

Tom Goddard goddard at sonic.net
Wed Apr 29 15:49:45 PDT 2020


Hi Jesse,

Greg is probably right, the problem is there are two origins specified in the file and Coot is using one and Chimera is using the other.  You are using MRC format right?  Why would the MRC file format have two origins?  Because it was derived from the CCP4 format which has just one origin, an integer values for 3 axes which was perfectly good for X-ray, which Coot was designed for.   But cryoEM allows the origin to not be at a grid point.  For instance, you might have a box size 100 x 100 x 100 grid points and the origin might be at the exact center of the box which is half way between grid points.  At any rate the MRC format is the CCP4 format but has another floating point origin in the header.  Chimera was designed for cryoEM and uses the floating point origin for MRC maps.

You can see the header values with chimera command

	volume #0 dumpHeader true

then look in Reply Log (menu Favorites / Reply Log).  The CCP4 origin is ncstart, nrstart, nsstart, and the MRC origin is xorigin, yorigin, zorigin.

Here is an idea to solve this.  Coot I believe considers your map a CCP4 format file and ignores the float origin.  Chimera will also treat the file as a CCP4 file and not use the float origin if the file has suffix ".map" or ".ccp4" the standard suffixes for CCP4.  Do your files currently have suffix ".mrc"? So if you use a file suffix on your map that says it is CCP4 then Chimera should give you the same alignment as Coot.  I also thought you could do it without changing the suffix by using a Chimera command saying the file is CCP4 format, for example, "open ccp4:myfile.mrc".  Surprisingly that still used the MRC float origin and I think that is a Chimera bug.  But renaming the file to myfile.map and "open myfile.map" did use the CCP4 origin in Chimera 1.14.  In ChimeraX just telling it to read as CCP4 did work correctly and used the CCP4 origin.

Also be aware that Chimera only writes MRC, not CCP4, meaning it always uses the float origin, and it sets the integer origin to 0,0,0 in any MRC it writes.  You might think it should try to set the integer origin to the same as the float origin.  But that may give a slightly wrong origin.  Slightly wrong is very bad since it might not be noticed.  So Chimera always writes integer origin 0,0,0.

A second way to solve the problem is to make sure both the integer origin and the float origin are 0,0,0 so it doesn't matter which is used.  As I said Chimera always writes 0,0,0 integer origin.  If you set the Chimera map origin index to 0,0,0 in Volume Viewer menu Features / Coordinates and save the map then the float origin will also be 0,0,0 and Coot and Chimera should agree.

One more bit of info.  The Center button on Volume Viewer only adjusts the Chimera camera position to put the map in the middle of the graphics window.  It will have no effect on the origin of a written out map file.

And one more point.  When you save your fit PDB you need to save it relative to the map (option "Save relative to model ..." in the Save dialog). You must be doing that, otherwise the the saved PDB would not even align in Chimera.

	Tom


> On Apr 29, 2020, at 9:10 AM, Greg Pintilie <gregdp at gmail.com> wrote:
> 
> 
> Hi Jesse,
> 
> In my experience this discrepancy has to do with Coot not using the same ‘origin’ of the map the same way that Chimera does. 
> 
> In Chimera, Volume Viewer, if you open the ‘Coordinates’ panel from the Features, take a look at the ‘Origin index’. If this is not 0, then it’s likely that when you open the same map and model in Coot, they won’t align the way they do in Chimera. 
> 
> One way to make the alignment the same is to set the origin to 0 in Chimera. Then fit the model again to this map, save it, and open the new model and map in Coot; they should now align.
> 
> If you are working with multiple maps and sub-maps, the above may not always be convenient. In this case, what I usually do is to subtract the origin of the map from each atom coordinate in the model, and save this as a new model. Then open the map and newly saved model in Coot, they should again align. 
> 
> I have a script to do this quickly which is a bit cumbersome to run but does the job - maybe the Chimera team may have advice here, I get the feeling this could be a quick command on the command line; otherwise I’m happy to send it out. The problem is then if you open the model after saving it in coot, it won’t align to the map in Chimera (unless you’ve saved this map with 0 origin and are now using this map). To make them align I usually use Matchmaker to do it quickly, i.e. match the new Coot model to the model with the original coordinates.
> 
> While the above is a bit ad-hoc, I would myself love to know exactly which origin Coot uses, if at all, and which one Chimera uses in different cases. The MRC file format allows for two ways to specify an ‘origin’:
> https://www.ccpem.ac.uk/mrc_format/mrc2014.php <https://www.ccpem.ac.uk/mrc_format/mrc2014.php>
> 
> There are NX/Y/ZSTART and ORIGIN fields. Perhaps it may be possible to convert between one and the other so that we can still use some type of origin that translates between the two, though given that one is integer and one is float I’m not sure if that would be possible.
> 
> Greg
> 
> 
> 
>> On Apr 28, 2020, at 8:04 PM, Jesse M. Hansen <jhansen6 at uw.edu <mailto:jhansen6 at uw.edu>> wrote:
>> 
>> Hi all
>> 
>> I am building a model in coot after aligning that model to my map in chimera.  However when I open the PDB and map in coot I notice the two are not at all aligned. 
>> 
>> I have tried:
>> Open the map and pdb in chimera.  Fit the pdb into map. Save PDB.      
>> Open map/pdb in chimera (pdb fits map on load).  Center map in box ("center" button in vol viewer").  Save map w/ new name.  Fit PDB into map.  Save PDB.  Re-open and confirm that pdb fits map on load and that map is centered in box.
>> Opening PDB first in coot then MRC.   Then vice versa.
>> Opening a "good" similar map and pdb in chimera that DO open together correctly in coot.   Open my "bad" map which does not align.  Fit the "bad" map into the "good" map and do vop resample.   Save the map.  Open it to confirm pdb fits map on load.  
>> Open map/pdb in chimera (pdb fits map on load).  Use "vop cover ..." and save the output (reduced) map.  
>> I really feel like I've tried a lot and am baffled as to why I can't get the pdb and mrc to load on the same coordinate system, despite having tens of other similar maps and PDBs that work just fine.
>> 
>> Thanks in advance
>> 
>> Jesse
>> _______________________________________________
>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
>> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://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/20200429/062b5b54/attachment-0001.html>


More information about the Chimera-users mailing list