IMP  2.1.1
The Integrative Modeling Platform
simple_diameter.py
1 ## \example restrainer/simple_diameter.py
2 # This example shows how to create simple IMP::core::DiameterRestraint.
3 #
4 
5 # -- File: simple_diameter.py --#
6 
7 import IMP
8 import IMP.core
9 import IMP.restrainer
10 
11 imp_model = IMP.kernel.Model()
12 ps = IMP.core.create_xyzr_particles(imp_model, 50, 1.0)
13 diameter = 10
14 
16 
17 r = sd.get_restraint()
18 h = sd.get_harmonic_upper_bound()
19 
20 sd.set_mean(10.0)
21 sd.set_standard_deviation(3.5)
22 sd.set_k(0.1)
23 
24 imp_model.add_restraint(r)
25 r.show()
26 
27 imp_model.evaluate(False)
SimpleDiameter create_simple_diameter(const kernel::Particles &ps, Float diameter)
See IMP.restrainer for more information.
XYZRs create_xyzr_particles(kernel::Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
See IMP.core for more information.
Class for storing model, its restraints, constraints, and particles.