imp icon indicating copy to clipboard operation
imp copied to clipboard

SampledDensityMap - Model and map generated from model do not align.

Open ichem001 opened this issue 7 years ago • 1 comments

I think this has been reported before but when generating a map from a model using IMP::em::SampledDensityMap, the model and the map are not align. I attached a code snippet below to recreate the issue. In the test cases I have, the misalignment is up to 1.5Å, in each direction (~2.6Å total).

import sys,os
import IMP.atom
import IMP.core
import random
import resource
import IMP.em

pdbfile=sys.argv[1]
apix=1.2156
res=float(2.0*apix)
size=256


m = IMP.Model()
sel0 = IMP.atom.BackbonePDBSelector()
sel1 = IMP.atom.CBetaPDBSelector()
mh = IMP.atom.read_pdb(pdbfile, m, sel0 or sel1)
ps = IMP.core.get_leaves(mh)

a = 0.0
b = 0.0

b1 = IMP.algebra.Vector3D(0.0,0.0,0.0)
b2 = IMP.algebra.Vector3D(size,size,size)

bbox = IMP.algebra.BoundingBox3D(b1, b2)
dheader = IMP.em.create_density_header(bbox, 1.0)
dheader.set_resolution(res)

dmap = IMP.em.SampledDensityMap(dheader)
dmap.set_particles(ps)
dmap.resample()
IMP.em.write_map(dmap, "map.mrc", IMP.em.MRCReaderWriter())

ichem001 avatar Apr 03 '18 17:04 ichem001

Added a test pdb here with figures to show the shift observed. Left panel show the model and the generated map when opened in Chimera and the right panel shows the the aligned model and generated map after using Fit in Map tool from Chimera.

pdb_vs_map

ATOM      2  CA  ASN A  34     115.138 124.057 135.934  1.00  0.00           C  
ATOM     10  CA  SER A  35     113.093 124.043 139.143  1.00  0.00           C  
ATOM     16  CA  VAL A  36     116.390 122.713 140.875  1.00  0.00           C  
ATOM     23  CA  GLU A  37     117.654 126.453 140.524  1.00  0.00           C  
ATOM     32  CA  ARG A  38     114.654 127.291 142.635  1.00  0.00           C  
ATOM     43  CA  LYS A  39     115.520 124.680 145.361  1.00  0.00           C  

ichem001 avatar Apr 04 '18 02:04 ichem001