Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TorsionDOFMover.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 /protocols/simple_moves/TorsionDOFMover.hh
11 /// @brief TorsionDOFMover header
12 /// @author Steven Lewis
13 
14 #ifndef INCLUDED_protocols_simple_moves_TorsionDOFMover_hh
15 #define INCLUDED_protocols_simple_moves_TorsionDOFMover_hh
16 
17 // Unit Headers
19 
20 // Project Headers
21 #include <core/pose/Pose.fwd.hh>
22 
23 #include <protocols/moves/Mover.hh>
24 
25 #include <core/id/AtomID.hh>
26 
27 //#include <core/scoring/methods/MMTorsionEnergy.fwd.hh>
29 
30 // Utility Headers
31 #include <core/types.hh>
32 
33 #include <utility/vector1.hh>
34 
35 
36 namespace protocols {
37 namespace simple_moves {
38 
39 ///TODO: De-duplicate shared code from RotateJumpAxisMover (angle picking code)
40 
41 ///@details This mover rotates a specific AtomTree Torsion degree of freedom (any valid 4-body torsion). It can rotate by a fixed amount, within a range, or randomly. Optionally, the mover will attempt to internally score the move with MMTorsionEnergy (similar to check_rama in Small/ShearMover). The mover will print a warning message at apply time if the specified DOF is bad. For now this mover only allows one DOF; if you want to have it consider multiple DOF's that might be a good idea. The DOF is determined by a set of 4 atoms; this allows the mover to check the validity of the DOF. I found it conceptually simpler to think about the 4 atoms involved in the torsion than try to trace DOF_IDs.
43 
44 public:
45  ///@brief default ctor
47 
48  ///@brief constructor for random distribution (just needs torsion)
49  TorsionDOFMover( core::id::AtomID const & atom1, core::id::AtomID const & atom2, core::id::AtomID const & atom3, core::id::AtomID const & atom4 );
50 
51  ///@brief constructor for range - these angles are in degrees, not radians!
52  TorsionDOFMover( core::id::AtomID const & atom1, core::id::AtomID const & atom2, core::id::AtomID const & atom3, core::id::AtomID const & atom4, core::Angle const upper, core::Angle const lower );
53 
54  ///@brief constructor for single value - these angles are in degrees, not radians!
55  TorsionDOFMover( core::id::AtomID const & atom1, core::id::AtomID const & atom2, core::id::AtomID const & atom3, core::id::AtomID const & atom4, core::Angle const angle );
56 
57  virtual ~TorsionDOFMover();
58 
59  virtual void apply( core::pose::Pose & pose );
60  virtual std::string get_name() const;
61 
62  //////////////////////////////////getters, setters////////////////////////////////////////
63  ///@brief set range of desired change - on [180, -180) degrees
64  void set_angle_range( core::Angle const upper, core::Angle const lower )
65  { upper_angle_ = upper; lower_angle_ = lower;}
66 
67  ///@brief return range of allowed angles
68  void get_angle_range( core::Angle & upper, core::Angle & lower ) const
69  { upper = upper_angle_; lower = lower_angle_; }
70 
71  ///@brief change the torsion DOF under consideration
72  void set_DOF( core::id::AtomID const & atom1, core::id::AtomID const & atom2, core::id::AtomID const & atom3, core::id::AtomID const & atom4 )
73  {
74  atom1_ = atom1;
75  atom2_ = atom2;
76  atom3_ = atom3;
77  atom4_ = atom4;
78  }
79 
80  ///@brief return DOF
81  void get_DOF( core::id::AtomID & atom1, core::id::AtomID & atom2, core::id::AtomID & atom3, core::id::AtomID & atom4 ) const
82  {
83  atom1 = atom1_;
84  atom2 = atom2_;
85  atom3 = atom3_;
86  atom4 = atom4_;
87  }
88 
89  ///@brief (de)activate scoring check
90  void check_mmt(bool const setting) { check_MMT_ = setting; }
91 
92  ///@brief getter for scoring check
93  bool check_mmt() const { return check_MMT_; }
94 
95  ///@brief set temperature for scoring check
96  void temp(core::Real const setting) { temp_ = setting; }
97 
98  ///@brief getter for temperature for scoring check
99  core::Real temp() const { return temp_; }
100 
101  ///@brief set number of tries
102  void tries(core::Size const setting) { tries_ = setting; }
103 
104  ///@brief getter for number of tries
105  core::Size tries() const { return tries_; }
106 
107 private:
108  ///@brief calculate angle for perturbation - call to RNG
110 
111  ///@brief calculate mmt score for the moving bond
113 
114  ///@brief boltzmann calculation - is the new score acceptable?
115  bool boltzmann( core::Energy const pre_score, core::Energy const post_score );
116 
117  //data
118 
119  ///@brief these atoms define the torsion
121 
122  ///@brief these angles define the range of transformations
123  core::Angle upper_angle_, lower_angle_; //these angles are in degrees, not radians!
124 
125  ///@brief boolean - should we restrict moves based on MMTorsionEnergy?
127 
128  ///@brief MMTorsionEnergy scorefunction
130 
131  ///@brief temperature for accepting moves
133 
134  ///@brief number of attempts at finding a valid move
136 
137 };//end TorsionDOFMover
138 
139 }//namespace moves
140 }//namespace protocols
141 
142 #endif // INCLUDED_protocols_simple_moves_TorsionDOFMover_HH