IMP
2.2.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
IMP
All IMP Modules
All IMP Modules and Applications
Argument Index
Class Examples
Design example
Developer Guide
Factory Index
Function Examples
Installation
Introduction
ChangeLog
Tools
Dependencies
EMageFit protocol
EMageFit scripts and tools
Integrative docking utility programs
Deprecated List
Modules
Namespaces
Classes
Files
File List
File Members
Examples
Indexes
Class Usage
Class Examples
Class Factories
Function Examples
XYZR_Decorator.py
1
## \example core/XYZR_Decorator.py
2
# This is a simple example using the XYZRDecorator to set the coordinates
3
# and radius of a particle and compute distances between the resulting
4
# spheres.
5
6
import
IMP
7
import
IMP.core
8
import
IMP.algebra
9
10
m =
IMP.kernel.Model
()
11
p0 =
IMP.kernel.Particle
(m)
12
d0 =
IMP.core.XYZR.setup_particle
(
13
p0,
IMP.algebra.Sphere3D
(
IMP.algebra.Vector3D
(0, 1, 2),
14
1.0))
15
p1 =
IMP.kernel.Particle
(m)
16
d1 =
IMP.core.XYZR.setup_particle
(p1)
17
d1.set_coordinates(
IMP.algebra.Vector3D
(3, 4, 5))
18
d1.set_radius(2.0)
19
20
print
IMP.core.get_distance
(d0, d1)
21
22
# use them as XYZ particles
23
xd0 =
IMP.core.XYZ.decorate_particle
(p0)
24
xd1 =
IMP.core.XYZ.decorate_particle
(p1)
25
26
# distance without radii
27
print
IMP.core.get_distance
(xd0, xd1)
IMP::core::get_distance
double get_distance(XYZR a, XYZR b)
Compute the sphere distance between a and b.
Definition:
XYZR.h:88
IMP::core::XYZR::setup_particle
static XYZR setup_particle(kernel::Model *m, ParticleIndex pi)
Definition:
XYZR.h:48
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/Particle.h:34
IMP::core
See IMP.core for more information.
Definition:
AngleRestraint.h:19
IMP::algebra
See IMP.algebra for more information.
Definition:
algebra_config.h:113
IMP::algebra::Vector3D
VectorD< 3 > Vector3D
Definition:
VectorD.h:395
IMP::core::XYZ::decorate_particle
static XYZ decorate_particle(::IMP::kernel::Particle *p)
Definition:
XYZ.h:49
IMP::algebra::SphereD< 3 >
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/Model.h:72