IMP  2.1.1
The Integrative Modeling Platform
simple_connectivity_on_molecules.py
1 ## \example restrainer/simple_connectivity_on_molecules.py
2 # This example shows how to create simple IMP::core::ConnectivityRestraint on molecules.
3 #
4 
5 # -- File: simple_connectivity_on_molecules.py --#
6 
7 import IMP
8 import IMP.core
9 import IMP.restrainer
10 
11 m = IMP.kernel.Model()
12 
14 ps = m.get_particles()
16 
17 for p in ps:
19  mhs.append(mh)
20 
22 
23 r = sc.get_restraint()
24 h = sc.get_harmonic_upper_bound()
25 sdps = sc.get_sphere_distance_pair_score()
26 
27 sc.set_mean(10.0)
28 sc.set_standard_deviation(3.5)
29 sc.set_k(0.1)
30 
31 m.add_restraint(r)
32 r.show()
33 
34 m.evaluate(False)
See IMP.restrainer for more information.
static Hierarchy setup_particle(kernel::Model *m, kernel::ParticleIndex pi, kernel::ParticleIndexesAdaptor children=kernel::ParticleIndexesAdaptor())
XYZRs create_xyzr_particles(kernel::Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
SimpleConnectivity create_simple_connectivity_on_molecules(const atom::Hierarchies &mhs)
See IMP.core for more information.
Class for storing model, its restraints, constraints, and particles.