[Chimera-users] When structures and density maps don't align

Thomas Goddard goddard at cgl.ucsf.edu
Mon Sep 10 15:56:26 PDT 2007


Hi Walter,

   With the help of your example CCP4 map I found that the problem was a 
heuristic used by the Chimera CCP4/MRC file reader to determine whether 
the (ncstart,nrstart,nsstart) header values are valid or appear to be 
uninitialized.  If it found any n*start value to have absolute value 
larger than the original data size (mx,my,mz header parameters) then it 
considered the n*start position values out-of-range and probably 
uninitialized and used n*start values of (0,0,0).  That messed up the 
position of the map you sent.  I've changed this heuristic so that the 
n*start values only need to be less than 10 times the maximum data 
dimension to be considered valid.  It would be nice to drop this 
heuristic altogether.  Unfortunately some map files have uninitialized 
values that cause the map to be placed in deep space.

   The fixed Chimera code will be in the next snapshot (should be on the 
web on Friday from our automatic builds).  If you wish to change your 
current Chimera code you can edit

	chimera/share/VolumeData/mrc/mrc_format.py

replacing lines starting at line 87:

       if (nxs >= -mx and nxs < mx and
           nys >= -my and nys < my and
           nzs >= -mz and nzs < mz):
         from VolumeData.griddata import scale_and_skew
         self.data_origin = scale_and_skew((nxs,nys,nzs), self.data_step,
                                           self.cell_angles)
       else:
         self.data_origin = (0., 0., 0.)

with

       limit = 10*max(max(mx,my,mz), max(self.data_size))
       if [s for s in (nxs,nys,nzs) if abs(s) > limit]:
         self.data_origin = (0., 0., 0.)
       else:
         from VolumeData.griddata import scale_and_skew
         self.data_origin = scale_and_skew((nxs,nys,nzs), self.data_step,
                                           self.cell_angles)

Make sure to keep the indentation as shown since that is important in 
Python.  The above change is for Chimera 1.2422.

   Thanks for reporting the problem.

	Tom



More information about the Chimera-users mailing list