IMP logo
IMP Reference Guide  2.17.0
The Integrative Modeling Platform
core/pair_restraint.py

Restrain the distance between a pair of particles.

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))