IMP logo
IMP Reference Guide  2.19.0
The Integrative Modeling Platform
IMP::core::Direction Class Reference

A decorator for a particle that represents a direction in 3D. More...

#include <IMP/core/direction.h>

+ Inheritance diagram for IMP::core::Direction:

Detailed Description

A decorator for a particle that represents a direction in 3D.

Definition at line 23 of file direction.h.

Public Member Functions

 Direction (::IMP::Model *m,::IMP::ParticleIndex id)
 
 Direction (const IMP::ParticleAdaptor &d)
 
void add_to_direction_derivative (int i, Float v, DerivativeAccumulator &d)
 Add v to the derivative of the ith coordinate of the direction. More...
 
void add_to_direction_derivatives (const algebra::Vector3D &v, DerivativeAccumulator &d)
 Add v to the derivatives of the x,y,z coordinates of the direction. More...
 
algebra::Vector3D get_direction () const
 Get direction. More...
 
Float get_direction_derivative (int i) const
 Get the derivative added to the ith coordinate of the direction. More...
 
algebra::Vector3D get_direction_derivatives () const
 Get the vector of derivatives added to the direction. More...
 
bool get_direction_is_optimized () const
 Get whether direction is optimized. More...
 
void reflect ()
 Flip direction so direction is reversed. More...
 
void set_direction (const algebra::Vector3D &v)
 Set direction. More...
 
void set_direction_is_optimized (bool tf) const
 Set whether direction is optimized. More...
 
void show (std::ostream &out=std::cout) const
 
- Public Member Functions inherited from IMP::Decorator
bool get_is_valid () const
 Returns true if constructed with a non-default constructor. More...
 
Modelget_model () const
 Returns the Model containing the particle. More...
 
Particleget_particle () const
 Returns the particle decorated by this decorator. More...
 
ParticleIndex get_particle_index () const
 Returns the particle index decorated by this decorator. More...
 
 operator Particle * () const
 
 operator ParticleIndex () const
 
Particleoperator-> () const
 

Static Public Member Functions

static void do_setup_particle (Model *m, ParticleIndex pi, const algebra::Vector3D &v)
 
static FloatKey get_direction_key (unsigned int i)
 Get key for direction attribute. More...
 
static bool get_is_setup (const IMP::ParticleAdaptor &p)
 
static bool get_is_setup (Model *m, ParticleIndex pi)
 Check if particle is setup as a direction. More...
 
static Direction setup_particle (Model *m, ParticleIndex pi, algebra::Vector3D v)
 
static Direction setup_particle (IMP::ParticleAdaptor pa, algebra::Vector3D v)
 

Additional Inherited Members

- Protected Member Functions inherited from IMP::Decorator
 Decorator (Model *m, ParticleIndex pi)
 
 Decorator (ParticleAdaptor p)
 

Member Function Documentation

void IMP::core::Direction::add_to_direction_derivative ( int  i,
Float  v,
DerivativeAccumulator d 
)

Add v to the derivative of the ith coordinate of the direction.

Definition at line 46 of file direction.h.

+ Here is the call graph for this function:

void IMP::core::Direction::add_to_direction_derivatives ( const algebra::Vector3D v,
DerivativeAccumulator d 
)

Add v to the derivatives of the x,y,z coordinates of the direction.

algebra::Vector3D IMP::core::Direction::get_direction ( ) const

Get direction.

Float IMP::core::Direction::get_direction_derivative ( int  i) const

Get the derivative added to the ith coordinate of the direction.

Definition at line 38 of file direction.h.

+ Here is the call graph for this function:

algebra::Vector3D IMP::core::Direction::get_direction_derivatives ( ) const

Get the vector of derivatives added to the direction.

bool IMP::core::Direction::get_direction_is_optimized ( ) const

Get whether direction is optimized.

static FloatKey IMP::core::Direction::get_direction_key ( unsigned int  i)
static

Get key for direction attribute.

static bool IMP::core::Direction::get_is_setup ( Model m,
ParticleIndex  pi 
)
static

Check if particle is setup as a direction.

void IMP::core::Direction::reflect ( )

Flip direction so direction is reversed.

Definition at line 67 of file direction.h.

void IMP::core::Direction::set_direction ( const algebra::Vector3D v)

Set direction.

void IMP::core::Direction::set_direction_is_optimized ( bool  tf) const

Set whether direction is optimized.

static Direction IMP::core::Direction::setup_particle ( IMP::ParticleAdaptor  pa,
algebra::Vector3D  v 
)
static
Returns
a Direction object that decorates the particle specified by pa
See Also
setup_particle(m, pi, v )

Definition at line 29 of file direction.h.

static Direction IMP::core::Direction::setup_particle ( Model m,
ParticleIndex  pi,
algebra::Vector3D  v 
)
static
Returns
a Direction object that decorates particle pi

Definition at line 29 of file direction.h.


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