IMP  2.2.1
The Integrative Modeling Platform
IMP::kinematics::KinematicForest Class Reference

#include <IMP/kinematics/KinematicForest.h>

+ Inheritance diagram for IMP::kinematics::KinematicForest:

Public Member Functions

 KinematicForest (kernel::Model *m)
 
 KinematicForest (kernel::Model *m, IMP::atom::Hierarchy hierarchy)
 
Jointadd_edge (IMP::core::RigidBody parent, IMP::core::RigidBody child)
 
void add_edge (Joint *joint)
 
void add_rigid_bodies_in_chain (IMP::core::RigidBodies rbs)
 
IMP::algebra::Vector3D get_coordinates_safe (IMP::core::RigidBody rb) const
 
bool get_is_member (IMP::core::RigidBody rb) const
 
Joints get_ordered_joints () const
 
IMP::algebra::ReferenceFrame3D get_reference_frame_safe (IMP::core::RigidBody rb) const
 
virtual std::string get_type_name () const
 
virtual ::IMP::base::VersionInfo get_version_info () const
 Get information about the module and version of the object.
 
void mark_external_coordinates_changed ()
 
void mark_internal_coordinates_changed ()
 
void reset_root (IMP::kernel::Particle *new_root)
 
void set_coordinates_safe (IMP::core::RigidBody rb, IMP::algebra::Vector3D c)
 
void set_reference_frame_safe (IMP::core::RigidBody rb, IMP::algebra::ReferenceFrame3D r)
 
void update_all_external_coordinates ()
 
void update_all_internal_coordinates ()
 
- Public Member Functions inherited from IMP::base::Object
virtual void clear_caches ()
 
virtual void do_destroy ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Friends

std::ostream & operator<< (std::ostream &s, const KinematicForest &kt)
 

Additional Inherited Members

- Protected Member Functions inherited from IMP::base::Object
 Object (std::string name)
 Construct an object with the given name. More...
 

Detailed Description

An unified interface for defining and manipulating a kinematic structure over a model. The kinematic structure is defined as a forest over model particles at a certain hierarchy, such that a directed edge indicates the propagation of changes in internal coordinates (joint values) to values of external (cartesian) coordinates.

See Also
Joint

Definition at line 43 of file KinematicForest.h.

Constructor & Destructor Documentation

IMP::kinematics::KinematicForest::KinematicForest ( kernel::Model m,
IMP::atom::Hierarchy  hierarchy 
)

Builds a kinematic forest automatically from a hierarchy that contains rigid bodies and adds a ScoreState to the model, to make sure the internal and external coordinates are synced before model updating

Member Function Documentation

Joint* IMP::kinematics::KinematicForest::add_edge ( IMP::core::RigidBody  parent,
IMP::core::RigidBody  child 
)

Adds a kinematic edge between parent and child, using a TransformationJoint between them, and decorating them as KinematicNodes if needed.

Definition at line 67 of file KinematicForest.h.

void IMP::kinematics::KinematicForest::add_edge ( Joint joint)

Adds a kinematic edge between the joint parent and child rigid bodies, decorating them as KinematicNodes if needed. The joint becomes owned by this KinematicForest, such that changes to the joint are synchronized with the KinematicForest

Note
it is assumed that neither the joint or the rigid bodies in it were previously added to a kinematic forest (might change in future IMP versions)
void IMP::kinematics::KinematicForest::add_rigid_bodies_in_chain ( IMP::core::RigidBodies  rbs)

adds edges between each pair of consecutive rigid bodies in the list rbs, using default TransformationJoint joints (transforming from one rigid body to the next)

Parameters
rbslist of n consecutive rigid bodies

Definition at line 92 of file KinematicForest.h.

void IMP::kinematics::KinematicForest::mark_external_coordinates_changed ( )

notifies the tree that external Cartesian coordinates have changed and therefore internal (joint) coordinates are not up to date

Definition at line 177 of file KinematicForest.h.

void IMP::kinematics::KinematicForest::mark_internal_coordinates_changed ( )

notifies the tree that joint (internal) coordinates have changed and therefore external coordinates are not up to date

Definition at line 168 of file KinematicForest.h.

void IMP::kinematics::KinematicForest::set_coordinates_safe ( IMP::core::RigidBody  rb,
IMP::algebra::Vector3D  c 
)

sets the corodinates of a particle, and makes sure that particles and joints in the tree will return correct external and internal coordinates

Parameters
rba rigid body that was previously added to the tree
cnew coordinates

Definition at line 189 of file KinematicForest.h.

+ Here is the call graph for this function:

void IMP::kinematics::KinematicForest::set_reference_frame_safe ( IMP::core::RigidBody  rb,
IMP::algebra::ReferenceFrame3D  r 
)

sets the reference frame of a rigid body, and makes sure that particles and joints in the tree will return correct external and internal coordinates when queried through the KinematicForest

Parameters
rba rigid body that was previously added to the tree
rnew reference frame

Definition at line 236 of file KinematicForest.h.

+ Here is the call graph for this function:


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