IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform

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.
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.
algebra::Vector3D get_direction () const
 Get direction.
Float get_direction_derivative (int i) const
 Get the derivative added to the ith coordinate of the direction.
algebra::Vector3D get_direction_derivatives () const
 Get the vector of derivatives added to the direction.
bool get_direction_is_optimized () const
 Get whether direction is optimized.
void reflect ()
 Flip direction so direction is reversed.
void set_direction (const algebra::Vector3D &v)
 Set direction.
void set_direction_is_optimized (bool tf) const
 Set whether direction is optimized.
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.
Model * get_model () const
 Returns the Model containing the particle.
Particle * get_particle () const
 Returns the particle decorated by this decorator.
ParticleIndex get_particle_index () const
 Returns the particle index decorated by this decorator.
 operator Particle * () const
 operator ParticleIndex () const
Particle * operator-> () 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.
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.
static Direction setup_particle (IMP::ParticleAdaptor pa, algebra::Vector3D v)
static Direction setup_particle (Model *m, ParticleIndex pi, algebra::Vector3D v)

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ Direction() [1/3]

IMP::core::Direction::Direction ( )

Definition at line 28 of file direction.h.

◆ Direction() [2/3]

IMP::core::Direction::Direction ( ::IMP::Model * m,
::IMP::ParticleIndex id )

Definition at line 28 of file direction.h.

◆ Direction() [3/3]

IMP::core::Direction::Direction ( const IMP::ParticleAdaptor & d)
explicit

Definition at line 28 of file direction.h.

Member Function Documentation

◆ add_to_direction_derivative()

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:

◆ add_to_direction_derivatives()

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.

◆ get_direction()

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

Get direction.

◆ get_direction_derivative()

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:

◆ get_direction_derivatives()

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

Get the vector of derivatives added to the direction.

◆ get_direction_is_optimized()

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

Get whether direction is optimized.

◆ get_direction_key()

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

Get key for direction attribute.

◆ get_is_setup() [1/2]

bool IMP::core::Direction::get_is_setup ( const IMP::ParticleAdaptor & p)
static

Definition at line 28 of file direction.h.

◆ get_is_setup() [2/2]

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

Check if particle is setup as a direction.

◆ reflect()

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

Flip direction so direction is reversed.

Definition at line 67 of file direction.h.

Here is the call graph for this function:

◆ set_direction()

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

Set direction.

◆ set_direction_is_optimized()

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

Set whether direction is optimized.

◆ setup_particle() [1/2]

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.

◆ setup_particle() [2/2]

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: