Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ichem001 opened this issue Apr 3, 2018 · 1 comment
Open
Labels

Comments

@ichem001
Copy link
Contributor

ichem001 commented Apr 3, 2018

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 ichem001 added the bug label Apr 3, 2018
@ichem001
Copy link
Contributor Author

ichem001 commented Apr 4, 2018

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  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant