IMP logo

IMP::core::XYZ Class Reference


Detailed Description

A a decorator for a particle with x,y,z coordinates.

import IMP
import IMP.core
import IMP.algebra

m= IMP.Model()
p0= IMP.Particle(m)
d0= IMP.core.XYZ.setup_particle(p0, IMP.algebra.Vector3D(0,1,2))
p1= IMP.Particle(m)
d1= IMP.core.XYZ.setup_particle(p1)
d1.set_coordinates(IMP.algebra.Vector3D(3,4,5))

print IMP.core.get_distance(d0, d1)
See also:
XYZR
Inheritance diagram for IMP::core::XYZ:

Inheritance graph
[legend]

Public Member Functions

void add_to_derivative (int i, Float v, DerivativeAccumulator &d)
 Add something to the derivative of the ith coordinate.
void add_to_derivatives (const algebra::VectorD< 3 > &v, DerivativeAccumulator &d)
 Add something to the derivative of the coordinates.
Float get_coordinate (int i) const
 Get the ith coordinate.
algebra::VectorD< 3 > get_coordinates () const
 Convert it to a vector.
bool get_coordinates_are_optimized () const
 Get whether the coordinates are optimized.
Float get_derivative (int i) const
 Get the ith coordinate derivative.
algebra::VectorD< 3 > get_derivatives () const
 Get the vector of derivatives.
algebra::VectorD< 3 > get_vector_to (const XYZ &b) const
 Get the vector from this particle to another.
Float get_x () const
Float get_y () const
Float get_z () const
void set_coordinate (unsigned int i, Float v)
 set the ith coordinate
void set_coordinates (const algebra::VectorD< 3 > &v)
 set all coordinates from a vector
void set_coordinates_are_optimized (bool tf) const
 Set whether the coordinates are optimized.
void set_x (Float t)
void set_y (Float t)
void set_z (Float t)
 XYZ (::IMP::Particle *p)

Static Public Member Functions

static XYZ decorate_particle (::IMP::Particle *p)
static FloatKey get_coordinate_key (unsigned int i)
static const FloatKeys & get_xyz_keys ()
 Get a vector containing the keys for x,y,z.
static bool particle_is_instance (Particle *p)
static XYZ setup_particle (Particle *p, const algebra::VectorD< 3 > &v=algebra::VectorD< 3 >(0, 0, 0))

Related Functions

(Note that these are not member functions.)

double get_distance (XYZ a, XYZ b)
 Compute the distance between a pair of particles.

Member Function Documentation

algebra::VectorD<3> IMP::core::XYZ::get_coordinates (  )  const

Convert it to a vector.

Somewhat suspect based on wanting a Point/Vector differentiation but we don't have points

Reimplemented in IMP::core::RigidBody.

bool IMP::core::XYZ::get_coordinates_are_optimized (  )  const

Get whether the coordinates are optimized.

Returns:
true only if all of them are optimized.

algebra::VectorD<3> IMP::core::XYZ::get_derivatives (  )  const

Get the vector of derivatives.

Somewhat suspect based on wanting a Point/Vector differentiation but we don't have points

static const FloatKeys& IMP::core::XYZ::get_xyz_keys (  )  [static]

Get a vector containing the keys for x,y,z.

This is quite handy for initializing movers and things.

static XYZ IMP::core::XYZ::setup_particle ( Particle p,
const algebra::VectorD< 3 > &  v = algebra::VectorD<3>(0,0,0) 
) [static]

Create a decorator with the passed coordinates.


The documentation for this class was generated from the following files:

Generated on Mon Mar 8 23:08:58 2010 for IMP by doxygen 1.5.8