IMP  2.4.0
The Integrative Modeling Platform
em2d/collision_cross_section.py

Example of how to compute the collision cross section of a molecule.

1 ## \example em2d/collision_cross_section.py
2 # Example of how to compute the collision cross section of a molecule.
3 #
4 
5 
6 from __future__ import print_function
7 import IMP
8 import IMP.em2d as em2d
9 import IMP.atom as atom
10 
11 """
12 
13 Example of how to compute the collision cross section of a molecule
14 
15 """
16 
17 
18 IMP.base.set_log_level(IMP.base.TERSE)
19 m = IMP.kernel.Model()
20 
21 fn = em2d.get_example_path("1z5s.pdb")
22 prot = atom.read_pdb(fn, m, atom.ATOMPDBSelector())
23 atom.add_radii(prot)
24 
25 
26 projections = 20
27 resolution = 1.0
28 pixel_size = 1.5
29 img_size = 80
30 ccs = em2d.CollisionCrossSection(projections, resolution, pixel_size, img_size)
31 ccs.set_model_particles(IMP.atom.get_leaves(prot))
32 print("CCS", ccs.get_ccs(), "A**2")