home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.63b38c487d,2024/12/21
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
version 20241221.develop.63b38c487d
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
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)
13
sc =
IMP.container.ListSingletonContainer
(m, ds)
14
cpc =
IMP.container.ConnectingPairContainer
(sc, .1)
15
m.update()
16
pg =
IMP.core.EdgePairsGeometry
(cpc)
17
w = RMF.create_rmf_file(
"pairs.rmf"
)
18
IMP.rmf.add_geometry
(w, pg)
19
IMP.rmf.save_frame
(w,
"zero"
)
20
print(pg.get_name())
21
del w