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
36 bool flexible_side_chains =
false);
41 const std::vector<atom::Atoms>& dihedral_angles,
43 bool flexible_backbone =
true,
44 bool flexible_side_chains =
false);
50 const std::vector<atom::Atoms>& dihedral_angles,
52 bool flexible_backbone,
53 bool flexible_side_chains);
55 void add_edges_to_rb_graph(
const std::vector<atom::Atoms>& dihedral_angles);
61 return get_phi_joint(r)->get_angle();
65 return get_psi_joint(r)->get_angle();
74 IMP_FOREACH(
Joint *j, kf_->get_ordered_joints() ){
75 ret.push_back(dynamic_cast<DihedralAngleRevoluteJoint*>(j));
89 get_phi_joint(r)->set_angle(angle);
90 kf_->update_all_external_coordinates();
94 get_psi_joint(r)->set_angle(angle);
95 kf_->update_all_external_coordinates();
103 enum ProteinAngleType {
114 void build_topology_graph();
116 void order_rigid_bodies(
const std::vector<atom::Atoms>& dihedral_angles,
117 const std::vector<atom::Atoms>& phi_angles,
118 const std::vector<atom::Atoms>& psi_angles,
121 void mark_rotatable_angles(
const std::vector<atom::Atoms>& dihedral_angles);
123 void build_rigid_bodies();
125 void add_dihedral_joints(
const std::vector<atom::Atoms>& dihedral_angles);
127 void add_dihedral_joints(
const std::vector<atom::Residue>& residues,
128 ProteinAngleType angle_type,
129 const std::vector<atom::Atoms>& dihedral_angles);
132 ProteinAngleType angle_type,
142 DihedralAngleRevoluteJoint* get_psi_joint(
const atom::Residue r)
const {
143 return (DihedralAngleRevoluteJoint*)joint_map_.get_joint(r, PSI);
146 DihedralAngleRevoluteJoint* get_other_joint(
const atom::Residue r)
const {
147 return (DihedralAngleRevoluteJoint*)joint_map_.get_joint(r, OTHER);
154 class AngleToJointMap {
157 Joint* get_joint(
const atom::Residue r,
158 ProteinAngleType angle_type)
const;
161 void add_joint(
const atom::Residue r, ProteinAngleType angle_type,
167 typedef std::vector<Joint*> ResidueJoints;
169 boost::unordered_map<ParticleIndex, ResidueJoints>
172 #endif // IMP_DOXYGEN
176 typedef boost::adjacency_list<
177 boost::vecS, boost::vecS, boost::undirectedS > Graph;
180 atom::Hierarchy mhd_;
183 ParticlesTemp atom_particles_;
192 std::vector<int> rb_order_, parents_;
197 boost::unordered_map<ParticleIndex, int> particle_index_to_node_map_, rb_particle_index_to_node_map_;
199 Vector<ParticleIndex> node_to_particle_index_map_;
202 core::RigidBodies rbs_;
207 PointerMember<kinematics::KinematicForest> kf_;
210 AngleToJointMap joint_map_;
212 boost::unordered_map<int, boost::unordered_map<int, Pointer<DihedralAngleRevoluteJoint> > > rigid_bodies_2_joint_map_;
219 IMPKINEMATICS_END_NAMESPACE
Kinematic structure over a protein, with backbone and side chain dihedrals.
#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.
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...