IMP  2.2.1
The Integrative Modeling Platform
rigid_bodies.py
1 ## \example core/rigid_bodies.py
2 # This example shows how to set up rigid bodies, one per residue in a protein. A score
3 # state is then used to ensure that the bodies remain rigid during the optimization process.
4 #
5 
6 import IMP
7 import IMP.core
8 import IMP.atom
9 import IMP.container
10 
11 m = IMP.kernel.Model()
12 # create a new IMP.atom.Hierarchy for the pdb file
13 mp1 = IMP.atom.read_pdb(IMP.core.get_example_path('example_protein.pdb'), m)
14 chains = IMP.atom.get_by_type(mp1, IMP.atom.CHAIN_TYPE)
15 rd = IMP.atom.Hierarchy(chains[0])
16 # Create a rigid body from the first chain
17 # note that rbs != chains[0] as the bounding volume for rbs needs to include all of the
18 # chain, but chains[0] might have a smaller sphere associated with it.
19 rbs = IMP.atom.create_rigid_body(chains[0])
20 print "all done"
See IMP.container for more information.
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
The standard decorator for manipulating molecular structures.
Hierarchies get_by_type(Hierarchy mhd, GetByType t)
See IMP.core for more information.
IMP::core::RigidBody create_rigid_body(Hierarchy h)
See IMP.atom for more information.
void read_pdb(base::TextInput input, int model, Hierarchy h)
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:72