home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.7.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
doc
examples
core
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
import
sys
7
8
IMP.setup_from_argv
(sys.argv,
"excluded volume"
)
9
10
(m, c) = IMP.example.create_model_and_particles()
11
12
# this container lists all pairs that are close at the time of evaluation
13
nbl =
IMP.container.ClosePairContainer
(c, 0, 2)
14
h =
IMP.core.HarmonicLowerBound
(0, 1)
15
sd =
IMP.core.SphereDistancePairScore
(h)
16
# use the lower bound on the inter-sphere distance to push the spheres apart
17
nbr =
IMP.container.PairsRestraint
(sd, nbl)
18
19
# alternatively, one could just do
20
r =
IMP.core.ExcludedVolumeRestraint
(c)
21
22
# get the current score
23
sf =
IMP.core.RestraintsScoringFunction
([nbr, r])
24
print(sf.evaluate(
False
))
IMP::core::HarmonicLowerBound
Lower bound harmonic function (non-zero when feature < mean)
Definition:
core/HarmonicLowerBound.h:20
IMP::setup_from_argv
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
IMP::core::RestraintsScoringFunction
Definition:
RestraintsScoringFunction.h:22
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:63
IMP::example
Example module.
IMP::core::ExcludedVolumeRestraint
Prevent a set of particles and rigid bodies from inter-penetrating.
Definition:
ExcludedVolumeRestraint.h:40
IMP::container::PairsRestraint
Applies a PairScore to each Pair in a list.
Definition:
PairsRestraint.h:34