[Chimera-users] saving maps generated with molmap - origin?

Grigore Pintilie pintilie at mit.edu
Tue Aug 19 11:28:15 PDT 2008

I just installed the latest version and right away reproduced the
behaviour I was describing. Here is what I was doing:

when saving the map, I chose the MRC format, but then gave my file the
extension .map
When loading this file, the origin information is not loaded properly.

But... I then tried again generating the map and saving it in the MRC
format, but not entering an extension, hence defaulting to .mrc. Then
when I load this file the origin is loaded correctly! Great!

So it looks like the problem lies when loading a MRC file that has any
extension .map. The map is loaded properly, but the correct origin is

(To test this, I saved a map as MRC using the extension .map, then
changed the extension to .mrc, and surprise, the origin is loaded

Is there an description of the MRC 2000 format anywhere? I still seem
to be able to load a map I saved as .mrc with my program, which uses
the old format:


On Tue, Aug 19, 2008 at 1:52 PM, Tom Goddard <goddard at cgl.ucsf.edu> wrote:
> Hi Greg,
>  I tested writing the molmap output to MRC format with the current Chimera
> production release 1.2540 (newer than the 1.2509 version you are using) and
> it gave the correct non-zero origin.  Could you try with 1.2540?
>  Chimera writes MRC 2000 format which uses floating point xorigin, yorigin,
> zorigin fields instead of ncstart, nrstart, nsstart integer origin header
> values.  I'm not clear how your C++ fix that modifies the header is working,
> but I don't think it worthwhile for me to debug an old version of Chimera.
>  If you can produce the problem in the current Chimera production release
> then I'll look into it.
>   Tom
> Grigore Pintilie wrote:
>> Hi Tom,
>> Thanks for the quick response! Actually, and sorry for not specifying
>> previously, I am writing the file to MRC format... From my
>> understanding of this fromat, it also requires specification of the
>> origin as an integral grid index (in the field nstart).
>> I've now gotten around this problem by writing a little C++ program
>> that reads the mrc file, changes the nstart field, and then writes the
>> mrc file again. I put the correct origin, which i get from chimera
>> right after generating the map, as a floating point number, in the
>> variable o, and then in the C++ program change nstart as follows:
>> nstart[0] = (int) round (  o[0] / step[0] );
>> nstart[1] = (int) round (  o[1] / step[1] );
>> nstart[2] = (int) round (  o[2] / step[2] );
>> (step is the variable that contains the dimensions of the grid cells)
>> this works perfectly, when i load the mrc file again, it has the
>> correct position and origin. It's rather strange that chimera doesn't
>> seem to save the origin properly. It would be nice to not have to call
>> my C++ program, and also it might help others using chimera...
>> although I can understand the dilemma with the origin specified as an
>> integer...
>> Greg
>> On Tue, Aug 19, 2008 at 1:23 PM, Tom Goddard <goddard at cgl.ucsf.edu> wrote:
>>> Hi Greg,
>>>  The trouble is you are writing out the map in BRIX format which I
>>> believe
>>> only allows integer grid index values for the origin of the map.  The
>>> molmap
>>> command creates a map whose origin is not at an integral grid index.
>>>  I could be wrong about the BRIX format, it may allow floating point
>>> origin
>>> values, but the documentation for BRIX does not say and gives example
>>> code
>>> for writing the file which uses integer format.  I guess the next step is
>>> to
>>> try writing a floating point origin in to the text BRIX header and open
>>> it
>>> in O and see what happens (error, misaligned, or correctly aligned).
>>>  To avoid this problem you can write your map out in MRC format.
>>>  Tom
>>> Grigore Pintilie wrote:
>>>> Hello,
>>>> I'm wondering why when I generate a density map from a pdb structure
>>>> (using the molmap command) and then save it, once I reopen it it seems
>>>> to have shifted with respect to the structure. I'm noticing that
>>>> before saving it, the generated map has a certain origin (shown in the
>>>> Coordinates pane in the Volume Viewer), and then when I reopen it the
>>>> origin appears as 0 0 0. If I copy the origin shown initially and then
>>>> paste it into the origin of the opened file, this shifts the map to
>>>> the correct position, but why isn't the right origin saved with the
>>>> file?
>>>> I'm using alpha version 1 build 2509 2008/05/01, platform win32
>>>> Many thanks,
>>>> Greg
>>>> _______________________________________________
>>>> Chimera-users mailing list
>>>> Chimera-users at cgl.ucsf.edu
>>>> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users

More information about the Chimera-users mailing list