IMP
2.1.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
excluded_volume.py
1
## \example core/excluded_volume.py
2
# Setup an excluded volume restraint between a bunch of particles with radius.
3
#
4
5
import
IMP.example
6
7
(m, c) = IMP.example.create_model_and_particles()
8
9
# this container lists all pairs that are close at the time of evaluation
10
nbl =
IMP.container.ClosePairContainer
(c, 0, 2)
11
h =
IMP.core.HarmonicLowerBound
(0, 1)
12
sd =
IMP.core.SphereDistancePairScore
(h)
13
# use the lower bound on the inter-sphere distance to push the spheres apart
14
nbr =
IMP.container.PairsRestraint
(sd, nbl)
15
m.add_restraint(nbr)
16
17
# alternatively, one could just do
18
r =
IMP.core.ExcludedVolumeRestraint
(c)
19
m.add_restraint(r)
20
21
# get the current score
22
print
m.evaluate(
False
)
IMP::core::HarmonicLowerBound
Lower bound harmonic function (non-zero when feature < mean)
Definition:
core/HarmonicLowerBound.h:20
IMP::core::SphereDistancePairScore
A score on the distance between the surfaces of two spheres.
Definition:
SphereDistancePairScore.h:38
IMP::container::ClosePairContainer
Return all close unordered pairs of particles taken from the SingletonContainer.
Definition:
ClosePairContainer.h:66
IMP::example
See IMP.example for more information.
Definition:
complex_assembly.h:16
IMP::core::ExcludedVolumeRestraint
Prevent a set of particles and rigid bodies from inter-penetrating.
Definition:
ExcludedVolumeRestraint.h:41
IMP::container::PairsRestraint
Applies a PairScore to each Pair in a list.
Definition:
PairsRestraint.h:35