IMP  2.1.1
The Integrative Modeling Platform
simple_connectivity_on_rigid_bodies.py
1 ## \example restrainer/simple_connectivity_on_rigid_bodies.py
2 # This example shows how to create simple IMP::core::ConnectivityRestraint on rigid bodies.
3 #
4 
5 # -- File: simple_connectivity_on_rigid_bodies --#
6 
7 import IMP
8 import IMP.atom
9 import IMP.restrainer
10 
11 m = IMP.kernel.Model()
13 
14 mh1 = IMP.atom.read_pdb(IMP.restrainer.get_example_path("input.pdb"), m, sel)
15 mh2 = IMP.atom.read_pdb(IMP.restrainer.get_example_path("input.pdb"), m, sel)
18 
20 mhs.append(mh1)
21 mhs.append(mh2)
22 
24 
26 
27 r = sc.get_restraint()
28 h = sc.get_harmonic_upper_bound()
29 ps = sc.get_sphere_distance_pair_score()
30 
31 sc.set_mean(10.0)
32 sc.set_standard_deviation(3.5)
33 sc.set_k(0.1)
34 
35 m.add_restraint(r)
36 r.show()
37 
38 m.evaluate(False)
See IMP.restrainer for more information.
void add_radii(Hierarchy d, const ForceFieldParameters *ffp=get_all_atom_CHARMM_parameters(), FloatKey radius_key=FloatKey("radius"))
SimpleConnectivity create_simple_connectivity_on_rigid_bodies(const core::RigidBodies &rbs, Refiner *ref=IMP::core::internal::get_rigid_members_refiner())
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
core::RigidBodies set_rigid_bodies(atom::Hierarchies const &mhs)
Select all CA ATOM records.
Definition: pdb.h:76
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.