home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.10.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
version 2.10.0
container/connectivity.py
Shows how to use and visualize the
IMP::container::ConnectingPairContainer
.
1
## \example container/connectivity.py
2
# Shows how to use and visualize the IMP::container::ConnectingPairContainer.
3
4
from
__future__
import
print_function
5
import
IMP.container
6
import
IMP.rmf
7
import
RMF
8
import
sys
9
10
IMP.setup_from_argv
(sys.argv,
"connectivity"
)
11
12
m =
IMP.Model
()
13
ds =
IMP.core.create_xyzr_particles
(m, 20, .1)
14
sc =
IMP.container.ListSingletonContainer
(m, ds)
15
cpc =
IMP.container.ConnectingPairContainer
(sc, .1)
16
m.update()
17
pg =
IMP.core.EdgePairsGeometry
(cpc)
18
w = RMF.create_rmf_file(
"pairs.rmf"
)
19
IMP.rmf.add_geometry
(w, pg)
20
IMP.rmf.save_frame
(w,
"zero"
)
21
print(pg.get_name())
22
del w