IMP  2.4.0
The Integrative Modeling Platform
collision_cross_section.py
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")
Restraints using electron microscopy 2D images (class averages).
void set_log_level(LogLevel l)
Set the current global log level.
Functionality for loading, creating, manipulating and scoring atomic structures.
Hierarchies get_leaves(const Selection &h)
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73