IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
pair_restraint.py
1 ## \example core/pair_restraint.py
2 # Restrain the distance between a pair of particles.
3 #
4 
5 import IMP.example
6 import sys
7 
8 IMP.setup_from_argv(sys.argv, "pair restraint")
9 
10 (m, c) = IMP.example.create_model_and_particles()
11 
12 uf = IMP.core.Harmonic(0, 1)
14 inds = c.get_indexes()
15 r = IMP.core.PairRestraint(m, df, (inds[0], inds[1]))
16 print(r.evaluate(False))
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Example module.
Applies a PairScore to a Pair.
Definition: PairRestraint.h:29
Harmonic function (symmetric about the mean)
Definition: core/Harmonic.h:24