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