IMP
2.4.0
The Integrative Modeling Platform
IMP Mainpage
Modules
Classes
Examples
container/connectivity.py
Shows how to use and visualize the IMP::misc::ConnectingPairContainer.
1
## \example container/connectivity.py
2
# Shows how to use and visualize the IMP::misc::ConnectingPairContainer.
3
4
from
__future__
import
print_function
5
import
IMP.container
6
import
IMP.display
7
8
m =
IMP.kernel.Model
()
9
ds =
IMP.core.create_xyzr_particles
(m, 20, .1)
10
sc =
IMP.container.ListSingletonContainer
(ds)
11
cpc =
IMP.container.ConnectingPairContainer
(sc, .1)
12
m.evaluate(
False
)
13
pg =
IMP.core.EdgePairsGeometry
(cpc)
14
w =
IMP.display.ChimeraWriter
(
"pairs.py"
)
15
w.add_geometry(pg)
16
print(pg.get_name())
17
del w