IMP
2.4.0
The Integrative Modeling Platform
|
#include <IMP/kinematics/KinematicForest.h>
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.
Definition at line 43 of file KinematicForest.h.
Public Member Functions | |
KinematicForest (kernel::Model *m) | |
KinematicForest (kernel::Model *m, IMP::atom::Hierarchy hierarchy) | |
Joint * | add_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. More... | |
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 () |
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... | |
virtual void | do_destroy () |
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
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
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)
rbs | list of n consecutive rigid bodies |
Definition at line 92 of file KinematicForest.h.
|
virtual |
Get information about the module and version of the object.
Reimplemented from IMP::base::Object.
Definition at line 47 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 coordinates of a particle, and makes sure that particles and joints in the tree will return correct external and internal coordinates
rb | a rigid body that was previously added to the tree |
c | new coordinates |
Definition at line 189 of file KinematicForest.h.
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
rb | a rigid body that was previously added to the tree |
r | new reference frame |
Definition at line 236 of file KinematicForest.h.