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

Grigore Pintilie pintilie at mit.edu
Tue Aug 19 10:43:59 PDT 2008

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


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