IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
bipartite_nonbonded_interactions.py
1## \example container/bipartite_nonbonded_interactions.py
2# This example shows how set up excluded volume interactions between two
3# sets of particles.
4
5import IMP
6import IMP.core
7import IMP.container
8import sys
9
10IMP.setup_from_argv(sys.argv, "bipartite nonbonded interactions")
11
12# This example adds a restraint on bipartite nonbonded interactions
13# after excluding a set of bonded interactions.
14
15m = IMP.Model()
16# The set of particles
18 m, IMP.core.create_xyzr_particles(m, 20, 1.0))
20 m, IMP.core.create_xyzr_particles(m, 20, 2.0))
21
22# Set up the nonbonded list
24
25# Set up excluded volume
28
29# Set up optimizer
31o.set_scoring_function([evr])
32
33o.optimize(1000)
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
Return all spatially-proximal pairs of particles (a,b) from the two SingletonContainers A and B,...
Applies a PairScore to each Pair in a list.
Simple conjugate gradients optimizer.
Lower bound harmonic function (non-zero when feature < mean).
A score on the distance between the surfaces of two spheres.
Various classes to hold sets of particles.
Basic functionality that is expected to be used by a wide variety of IMP users.
XYZRs create_xyzr_particles(Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.