IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
container/bipartite_nonbonded_interactions.py

This example shows how set up excluded volume interactions between two sets of particles.

1 ## \example container/bipartite_nonbonded_interactions.py
2 # This example shows how set up excluded volume interactions between two
3 # sets of particles.
4 
5 import IMP
6 import IMP.core
7 import IMP.container
8 import sys
9 
10 IMP.setup_from_argv(sys.argv, "bipartite nonbonded interactions")
11 
12 # This example addes a restraint on bipartite nonbonded interactions
13 # after excluding a set of bonded interactions.
14 
15 m = IMP.Model()
16 # The set of particles
21 
22 # Set up the nonbonded list
24 
25 # Set up excluded volume
27 evr = IMP.container.PairsRestraint(ps, nbl)
28 
29 # Set up optimizer
31 o.set_scoring_function([evr])
32 
33 o.optimize(1000)