IMP  2.2.1
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 (m, c) = IMP.example.create_model_and_particles()
7 
8 uf = IMP.core.Harmonic(0, 1)
10 r = IMP.core.PairRestraint(df, (c.get_particle(0), c.get_particle(1)))
11 m.add_restraint(r)