IMP  2.0.1
The Integrative Modeling Platform
restrainer/simple_connectivity_on_rigid_bodies.py

This example shows how to create simple IMP::core::ConnectivityRestraint on rigid bodies.

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.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 
19 mhs = IMP.atom.Hierarchies()
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)