IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
connectivity.py
1## \example container/connectivity.py
2# Shows how to use and visualize the IMP::container::ConnectingPairContainer.
3
4import IMP.container
5import IMP.rmf
6import RMF
7import sys
8
9IMP.setup_from_argv(sys.argv, "connectivity")
10
11m = IMP.Model()
15m.update()
17w = RMF.create_rmf_file("pairs.rmf")
19IMP.rmf.save_frame(w, "zero")
20print(pg.get_name())
21del w
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
A container which keeps a set of pairs that connect a set of spheres.
Display a segment for each pair in a IMP::PairContainer.
Definition XYZR.h:170
Various classes to hold sets of particles.
XYZRs create_xyzr_particles(Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
Support for the RMF file format for storing hierarchical molecular data and markup.
void add_geometry(RMF::FileHandle file, display::Geometry *r)
Add a single geometry to the file.
RMF::FrameID save_frame(RMF::FileHandle file, std::string name="")
Save the current state of the linked objects as a new RMF frame.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.