IMP logo
IMP Reference Guide  2.22.0
The Integrative Modeling Platform
bounding_box_restraint.py
2 
3 K_BB = 10.0 # bounding box force coefficient in kcal/mol/A^2
4 RADIUS = 1.0 # particle radius in A
5 
6 def create_particle(m, bb, radius = RADIUS):
7  p = IMP.Particle(m)
11  d.set_coordinates_are_optimized(True)
12  return p
13 
15  IMP.algebra.Vector3D(10, 10, 10))
16 m = IMP.Model()
17 particles = []
18 for i in range(0,10):
19  particles.append(create_particle(m, bb))
20 hpb = IMP.core.HarmonicUpperBound(0, K_BB)
22 bbr = IMP.container.SingletonsRestraint(bbss, particles)
Applies a SingletonScore to each Singleton in a list.
Various classes to hold sets of particles.
Upper bound harmonic function (non-zero when feature > mean)
static XYZR setup_particle(Model *m, ParticleIndex pi)
Definition: XYZR.h:48
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Basic functionality that is expected to be used by a wide variety of IMP users.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
VectorD< 3 > Vector3D
Definition: VectorD.h:408
Class to handle individual particles of a Model object.
Definition: Particle.h:43