IMP logo
IMP Reference Guide  2.16.0
The Integrative Modeling Platform
core/excluded_volume.py

Setup an excluded volume restraint between a bunch of particles with radius.

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
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
21 
22 # get the current score
24 print(sf.evaluate(False))