IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
kernel/setup.py
Standard setup code.
1
## \example kernel/setup.py
2
## Standard setup code.
3
4
import
IMP.core
5
6
def
create_model_and_particles():
7
m=
IMP.Model
()
8
ps= [
IMP.Particle
(m)
for
i
in
range(0,100)]
9
bb=
IMP.algebra.BoundingBox3D
(
IMP.algebra.Vector3D
(0,0,0),
10
IMP.algebra.Vector3D
(10,10,10))
11
for
p
in
ps:
12
d=
IMP.core.XYZR.setup_particle
(p,
IMP.algebra.Sphere3D
(
IMP.algebra.get_random_vector_in
(bb), 1))
13
d.set_coordinates_are_optimized(
True
)
14
sc=
IMP.container.ListSingletonContainer
(ps)
15
return
(m, sc)