IMP
2.3.0
The Integrative Modeling Platform
IMP Mainpage
Modules
Applications
Related Pages
Groups
Classes
Files
Examples
Indexes
File List
File Members
setup.py
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.kernel.Model
()
9
ps = [
IMP.kernel.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)
IMP::algebra::get_random_vector_in
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
IMP::core::XYZR::setup_particle
static XYZR setup_particle(kernel::Model *m, ParticleIndex pi)
Definition:
XYZR.h:48
IMP::container::ListSingletonContainer
Store a kernel::ParticleIndexes.
Definition:
ListSingletonContainer.h:33
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/Particle.h:37
IMP::algebra::BoundingBoxD< 3 >
IMP::core
Basic functionality that is expected to be used by a wide variety of IMP users.
IMP::algebra::Vector3D
VectorD< 3 > Vector3D
Definition:
VectorD.h:395
IMP::algebra::SphereD< 3 >
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/Model.h:73