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
kernel/setup.py
Standard setup code.
1
## \example kernel/setup.py
2
# Standard setup code.
3
4
import
IMP.core
5
6
7
def
create_model_and_particles():
8
m =
IMP.Model
()
9
ps = [
IMP.Particle
(m)
for
i
in
range(0, 100)]
10
bb =
IMP.algebra.BoundingBox3D
(
IMP.algebra.Vector3D
(0, 0, 0),
11
IMP.algebra.Vector3D
(10, 10, 10))
12
for
p
in
ps:
13
d =
IMP.core.XYZR.setup_particle
(
14
p,
IMP.algebra.Sphere3D
(
IMP.algebra.get_random_vector_in
(bb), 1))
15
d.set_coordinates_are_optimized(
True
)
16
sc =
IMP.container.ListSingletonContainer
(ps)
17
return
(m, sc)