10 #ifndef IMPKINEMATICS_PROTEIN_KINEMATICS_H
11 #define IMPKINEMATICS_PROTEIN_KINEMATICS_H
13 #include "kinematics_config.h"
21 #include <boost/unordered_map.hpp>
26 #include <boost/graph/adjacency_list.hpp>
28 IMPKINEMATICS_BEGIN_NAMESPACE
40 bool flexible_side_chains =
false);
45 const std::vector<atom::Atoms>& dihedral_angles,
47 bool flexible_backbone =
true,
48 bool flexible_side_chains =
false);
54 const std::vector<atom::Atoms>& dihedral_angles,
56 bool flexible_backbone,
57 bool flexible_side_chains);
59 void add_edges_to_rb_graph(
const std::vector<atom::Atoms>& dihedral_angles);
65 return get_phi_joint(r)->get_angle();
69 return get_psi_joint(r)->get_angle();
78 IMP_FOREACH(
Joint *j, kf_->get_ordered_joints() ){
79 ret.push_back(dynamic_cast<DihedralAngleRevoluteJoint*>(j));
95 get_phi_joint(r)->set_angle(angle);
96 kf_->update_all_external_coordinates();
100 get_psi_joint(r)->set_angle(angle);
101 kf_->update_all_external_coordinates();
109 enum ProteinAngleType {
120 void build_topology_graph();
122 void order_rigid_bodies(
const std::vector<atom::Atoms>& dihedral_angles,
123 const std::vector<atom::Atoms>& phi_angles,
124 const std::vector<atom::Atoms>& psi_angles,
127 void mark_rotatable_angles(
const std::vector<atom::Atoms>& dihedral_angles);
130 void build_rigid_bodies();
132 void add_dihedral_joints(
const std::vector<atom::Atoms>& dihedral_angles);
134 void add_dihedral_joints(
const std::vector<atom::Residue>& residues,
135 ProteinAngleType angle_type,
136 const std::vector<atom::Atoms>& dihedral_angles);
139 ProteinAngleType angle_type,
149 DihedralAngleRevoluteJoint* get_psi_joint(
const atom::Residue r)
const {
150 return (DihedralAngleRevoluteJoint*)joint_map_.get_joint(r, PSI);
153 DihedralAngleRevoluteJoint* get_other_joint(
const atom::Residue r)
const {
154 return (DihedralAngleRevoluteJoint*)joint_map_.get_joint(r, OTHER);
161 class AngleToJointMap {
164 Joint* get_joint(
const atom::Residue r,
165 ProteinAngleType angle_type)
const;
168 void add_joint(
const atom::Residue r, ProteinAngleType angle_type,
174 typedef std::vector<Joint*> ResidueJoints;
176 boost::unordered_map<ParticleIndex, ResidueJoints>
179 #endif // IMP_DOXYGEN
183 typedef boost::adjacency_list<
184 boost::vecS, boost::vecS, boost::undirectedS > Graph;
187 atom::Hierarchy mhd_;
190 ParticlesTemp atom_particles_;
199 std::vector<int> rb_order_, parents_;
204 boost::unordered_map<ParticleIndex, int> particle_index_to_node_map_, rb_particle_index_to_node_map_;
206 Vector<ParticleIndex> node_to_particle_index_map_;
209 core::RigidBodies rbs_;
214 PointerMember<kinematics::KinematicForest> kf_;
217 AngleToJointMap joint_map_;
219 boost::unordered_map<int, boost::unordered_map<int, Pointer<DihedralAngleRevoluteJoint> > > rigid_bodies_2_joint_map_;
226 IMPKINEMATICS_END_NAMESPACE
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A more IMP-like version of the std::vector.
The standard decorator for manipulating molecular structures.
Common base class for heavy weight IMP objects.
functionality for defining rigid bodies
IMP::Vector< IMP::Pointer< DihedralAngleRevoluteJoint > > DihedralAngleRevoluteJoints
A class for storing lists of IMP items.
core::RigidBodies get_rigid_bodies()
Joint that is parameterized as a dihedral angle between two planes.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
A decorator for a residue.
Base class for joints between rigid bodies in a kinematic tree.
Define and manipulate a kinematic structure over a model.
Define and manipulate a kinematic structure over a model.
functionality for defining various revolute kinematic joints between rigid bodies as part of a kinema...