Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CartesianMinimizerMap.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file core/optimization/CartesianMinimizerMap.hh
11 /// @brief Class for connecting DOFs in the atom tree to DOFs optimized by the AtomTreeMinimizer
12 /// @author Phil Bradley
13 
14 
15 #ifndef INCLUDED_core_optimization_CartesianMinimizerMap_hh
16 #define INCLUDED_core_optimization_CartesianMinimizerMap_hh
17 
18 // Unit headers
20 
21 // Package headers
22 // AUTO-REMOVED #include <core/optimization/DOF_Node.hh>
24 
25 #include <core/id/TorsionID.hh>
26 #include <core/id/DOF_ID.hh>
27 #include <core/id/AtomID.hh>
28 
29 // Project headers
31 #include <core/pose/Pose.fwd.hh>
33 #include <core/id/AtomID_Map.hh>
34 // AUTO-REMOVED #include <core/id/DOF_ID_Map.hh>
36 
37 // AUTO-REMOVED #include <list>
38 
39 #include <utility/vector1.hh>
40 #include <ObjexxFCL/FArray1D.hh>
41 
42 
43 
44 namespace core {
45 namespace optimization {
46 
48 {
49 public:
50 
51  ///
53  {}
54 
55  ///
57 
58  ///
59  virtual
60  kinematics::DomainMap const &
61  domain_map() const
62  {
63  return domain_map_;
64  }
65 
66  virtual
67  void
69  DOF_ID const & new_torsion,
70  DOF_ID const & parent
71  );
72 
73  virtual
74  void
75  add_atom(
76  AtomID const & AtomID,
77  DOF_ID const & dof_id
78  );
79 
80  ///
81  void
82  setup(
83  pose::Pose & pose,
84  kinematics::MoveMap const & move_map
85  );
86 
87  /// clears old data+dimensions dof_node_pointer using size data from the pose
88  void
89  reset( pose::Pose const & pose );
90 
91  ///
92  void
94  pose::Pose const & pose,
95  Multivec & dofs
96  ) const;
97 
98  ///
99  void
101  pose::Pose & pose,
102  Multivec const & dofs
103  ) const;
104 
105  ///
106  inline int
107  ndofs() const { return 3*moving_atoms_.size(); }
108 
109  inline int
110  ntorsions() const { return moving_dofids_.size(); }
111 
112  inline id::DOF_ID
113  get_dof_id(Size n) const { return moving_dofids_[n]; }
114 
115  inline id::TorsionID
116  get_TorsionID(Size n) const { return moving_torsionids_[n]; }
117 
118  inline int
119  natoms() const { return moving_atoms_.size(); }
120 
121  inline id::AtomID
122  get_atom(Size n) const { return moving_atoms_[n]; }
123 
124  inline Size
125  get_atom_index(id::AtomID x) const { return atom_indices_[x]; }
126 
129  return atom_derivatives_[ resid ];
130  }
131 
132  void
134 
135 private:
136 
137  // maps dofIDs->torsionIDs
138  // removes dofIDs with no relevant atoms
139  void
140  assign_rosetta_torsions_and_trim( pose::Pose const & pose ); // part of setup
141 
142 
143 private:
144 
145  // map moving atoms->index
147 
148  /// list of all the moving atoms
150 
151  //
153 
154  /// list of all moving torsions: dof ids and torsion ids
155  /// we don't need all the info from dof_node, just this
158 
159  ///
161 
162 }; // CartesianMinimizerMap
163 
164 
165 } // namespace kinematics
166 } // namespace core
167 
168 
169 #endif