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>
27 #include <boost/graph/undirected_dfs.hpp>
29 IMPKINEMATICS_BEGIN_NAMESPACE
31 typedef boost::adjacency_list<
32 boost::vecS, boost::vecS, boost::undirectedS > Graph;
34 class MyDFSVisitor :
public boost::default_dfs_visitor {
36 MyDFSVisitor(std::vector<int>& dfs_order) : dfs_order_(dfs_order), counter_(0) {}
38 template <
typename Vertex,
typename Graph >
39 void discover_vertex(Vertex v,
const Graph& ) {
40 dfs_order_[v] = counter_;
44 std::vector<int>& dfs_order_;
58 bool flexible_side_chains =
false);
63 const std::vector<IMP::atom::Atoms>& dihedral_angles,
65 bool flexible_backbone =
true,
66 bool flexible_side_chains =
false);
72 const std::vector<IMP::atom::Atoms>& dihedral_angles,
74 bool flexible_backbone,
75 bool flexible_side_chains);
77 void add_edges_to_rb_graph(
const std::vector<IMP::atom::Atoms>& dihedral_angles);
83 return get_phi_joint(r)->get_angle();
87 return get_psi_joint(r)->get_angle();
94 IMP_FOREACH(
Joint *j, kf_->get_ordered_joints() ){
95 ret.push_back(dynamic_cast<DihedralAngleRevoluteJoint*>(j));
110 get_phi_joint(r)->set_angle(angle);
111 kf_->update_all_external_coordinates();
115 get_psi_joint(r)->set_angle(angle);
116 kf_->update_all_external_coordinates();
122 enum ProteinAngleType {
133 void build_topology_graph();
135 void mark_rotatable_angles(
136 const std::vector<IMP::atom::Atoms>& dihedral_angles);
138 void build_rigid_bodies();
140 void add_dihedral_joints(
141 const std::vector<IMP::atom::Atoms>& dihedral_angles);
143 void add_dihedral_joints(
144 const std::vector<IMP::atom::Residue>& residues,
145 ProteinAngleType angle_type,
146 const std::vector<IMP::atom::Atoms>& dihedral_angles);
149 ProteinAngleType angle_type,
171 class AngleToJointMap {
175 ProteinAngleType angle_type)
const;
184 typedef std::vector<Joint*> ResidueJoints;
186 boost::unordered_map<IMP::ParticleIndex, ResidueJoints>
189 #endif // IMP_DOXYGEN
205 std::vector<int> rb_order_;
210 boost::unordered_map<IMP::ParticleIndex, int> particle_index_to_node_map_, rb_particle_index_to_node_map_;
223 AngleToJointMap joint_map_;
226 IMPKINEMATICS_END_NAMESPACE
A smart pointer to a reference counted object.
The standard decorator for manipulating molecular structures.
functionality for defining rigid bodies
A class for storing lists of IMP items.
A decorator for a residue.
Wrapper class for a kinematic forest (collection of trees) made of KinematicNode objects, interconnected by joints. This data structure allows for kinematic control of the tree and interconversion between internal and external coordinates.
functionality for defining various revolute kinematic joints between rigid bodies as part of a kinema...