IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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
6import IMP
7import IMP.em2d
8import IMP.atom
9import sys
10
11IMP.setup_from_argv(sys.argv, "collision cross section")
12
13"""
14
15Example of how to compute the collision cross section of a molecule
16
17"""
18
19
20IMP.set_log_level(IMP.TERSE)
21m = IMP.Model()
22
23fn = IMP.em2d.get_example_path("1z5s.pdb")
26
27
28projections = 20
29resolution = 1.0
30pixel_size = 1.5
31img_size = 80
32ccs = IMP.em2d.CollisionCrossSection(projections, resolution, pixel_size,
33 img_size)
34ccs.set_model_particles(IMP.atom.get_leaves(prot))
35print("CCS", ccs.get_ccs(), "A**2")
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
Select all non-alternative ATOM records.
Definition pdb.h:134
Determine the collision cross section for some projections of particles.
Functionality for loading, creating, manipulating and scoring atomic structures.
void add_radii(Hierarchy d, const ForceFieldParameters *ffp=get_all_atom_CHARMM_parameters(), FloatKey radius_key=FloatKey("radius"))
Add vdW radius from given force field.
Hierarchy read_pdb(TextInput input, Model *model, PDBSelector *selector=get_default_pdb_selector(), bool select_first_model=true)
Read all the molecules in the first model of the PDB file.
Hierarchies get_leaves(const Selection &h)
Restraints using electron microscopy 2D images (class averages).
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
void set_log_level(LogLevel l)
Set the current global log level.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.