IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
connectivity.py
1 ## \example container/connectivity.py
2 # Shows how to use and visualize the IMP::container::ConnectingPairContainer.
3 
4 import IMP.container
5 import IMP.rmf
6 import RMF
7 import sys
8 
9 IMP.setup_from_argv(sys.argv, "connectivity")
10 
11 m = IMP.Model()
12 ds = IMP.core.create_xyzr_particles(m, 20, .1)
15 m.update()
17 w = RMF.create_rmf_file("pairs.rmf")
19 IMP.rmf.save_frame(w, "zero")
20 print(pg.get_name())
21 del w
RMF::FrameID save_frame(RMF::FileHandle file, std::string name="")
Save the current state of the linked objects as a new RMF frame.
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
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.
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Store a list of ParticleIndexes.
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
void add_geometry(RMF::FileHandle file, display::Geometry *r)
Add a single geometry to the file.
Support for the RMF file format for storing hierarchical molecular data and markup.