Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SidechainMover.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/sidechain_moves/SidechainMover.hh
11 /// @brief definition of SidechainMover class and functions
12 /// @author Colin A. Smith (colin.smith@ucsf.edu)
13 
14 
15 #ifndef INCLUDED_protocols_simple_moves_sidechain_moves_SidechainMover_hh
16 #define INCLUDED_protocols_simple_moves_sidechain_moves_SidechainMover_hh
17 
18 // Unit Headers
20 
21 // Protocols Headers
25 
26 // Core Headers
30 #include <core/pose/Pose.fwd.hh>
31 // AUTO-REMOVED #include <core/pack/dunbrack/DunbrackRotamer.hh>
33 
37 
38 // Numeric Headers
39 // AUTO-REMOVED #include <numeric/random/random.hh>
40 
41 // Utility headers
42 #include <utility/vector1.hh>
43 
44 #include <numeric/random/random.fwd.hh>
45 
46 
47 namespace protocols {
48 namespace simple_moves {
49 namespace sidechain_moves {
50 
51 /// @brief class for non-discrete side chain sampling using Dunbrack rotamer probabilities/distributions
53 
54 public:
55 //
56  /// @brief default constructor
58 
59  /// @brief constructor with user provided rotamer library
62  );
63 
65  SidechainMover const & mover
66  );
67 
69 
70  virtual
72  clone() const;
73 
74  virtual
75  void
77  utility::tag::TagPtr const tag,
79  protocols::filters::Filters_map const & filters,
80  protocols::moves::Movers_map const & movers,
81  core::pose::Pose const & pose
82  );
83 
84  /// @brief initialize the packer task if necessary
85  void
86  init_task(
87  core::pose::Pose const & pose
88  );
89 
90  virtual
91  void
93  core::pose::Pose & pose,
95  core::Size cycle //non-zero if trajectory is restarted
96  );
97 
100 
101  bool task_initialized();
102  /// @brief apply a sidechain move to a Pose object
103  void
104  apply(
105  core::pose::Pose & pose
106  );
107 
108  virtual std::string get_name() const;
109 
110  core::Real
112  core::conformation::Residue const & proposed_residue,
113  core::Size const proposed_resnum,
114  core::chemical::ResidueType const & initial_residue_type,
115  utility::vector1<core::Real> const & initial_chi_angles
116  ) const;
117 
118  /// @brief test the backrub move
119  void
120  test_move(
122  );
123 
124  /// @brief idealize sidechains that might be altered
125  void
127  core::pose::Pose & pose
128  );
129 
130  /// @brief get the rotamer library
132  rotamer_library() const;
133 
134  /// @brief get the task factory
136  task_factory() const;
137 
138  /// @brief set the task factory
139  void
142  );
143 
144  /// @brief get the packer task
146  task() const;
147 
148  /// @brief set the task
149  void
150  set_task(
152  );
153 
154  /// @brief get the probability of uniformly sampling chi angles
155  core::Real
156  prob_uniform() const;
157 
158  /// @brief set the probability of uniformly sampling chi angles
159  void
161  core::Real prob_uniform
162  );
163 
164  /// @brief get whether detailed balance is preserved (i.e. proposal density ratio calculated)
165  bool
167 
168  /// @brief set whether detailed balance is preserved (i.e. proposal density ratio calculated)
169  void
171  bool preserve_detailed_balance
172  );
173 
174  ///@brief perform direct chi manipulations rather than using replace_residue to effect rotamer changes; useful if things are kinematically dependent on a sidechain.
175  bool
177 
178  ///@brief perform direct chi manipulations rather than using replace_residue to effect rotamer changes; useful if things are kinematically dependent on a sidechain.
179  void
181  bool const change_chi_without_replacing_residue
182  );
183 
184  /// @brief get the TorsionIDs perturbed by the mover during moves, along with their ranges
185  virtual
188  core::pose::Pose & pose
189  );
190 
191  /// @brief get the DOF_IDs perturbed by the mover during moves, along with their ranges
192  virtual
195  core::pose::Pose & pose
196  );
197 
198  /// @brief get the probability of sampling within the same rotamer
199  core::Real
200  prob_withinrot() const;
201 
202  /// @brief set the probability of sampling within the same rotamer
203  void
205  core::Real prob_withinrot
206  );
207 
208  core::Real
209  prob_random_pert_current() const;
210 
211  void
213  core::Real prob_pert
214  );
215 
216  /// @brief get the residues that can be changed by this mover
218  packed_residues() const;
219 
220  /// @brief get a vector indicating whether each residue can be packed
221  utility::vector1<bool> const &
222  residue_packed() const;
223 
224  /// @brief get the next residue to be changed, 0 means a random will be chosen
225  core::Size
226  next_resnum() const;
227 
228  /// @brief set the next residue to be changed, 0 means a random will be chosen
229  void
230  next_resnum(
231  core::Size resnum
232  );
233 
234  /// @brief get the number of chi angles sampled in the last move
235  core::Size
236  last_nchi() const;
237 
238  /// @brief get whether the last move mutated the residue
239  bool
240  last_mutation() const;
241 
242  /// @brief get whether the last move used uniform chi sampling
243  bool
244  last_uniform() const;
245 
246  /// @brief get whether the last move sampled within the same rotamer
247  bool
248  last_withinrot() const;
249 
250  /// @brief get the ratio of proposal densities for the last move
251  virtual
252  core::Real
254 
255 
256  /// @brief update string describing the move type
257  void
258  update_type();
259 
260  /// @brief set temperature for bias sampling at dunbrack distribution
261  void
263  sampling_temperature_ = temp;
264  }
265 
266  core::Real
268  return sampling_temperature_;
269  }
270 
271 private:
272 
273  void
276  );
277 
278  void
280 
281  void
284  utility::vector1<core::Real> const & previous_chi_angles
285  );
286 
287  bool
289  numeric::random::RandomGenerator & Rand,
291  utility::vector1<core::Real> const & previous_chi_angles,
292  utility::vector1<core::Real> const & new_chi_angles
293  );
294 
295  void
296  perturb_chi(
297  numeric::random::RandomGenerator Rand,
298  core::Real max_deviation,
299  utility::vector1<core::Real> & current_chi,
301  );
302 
303 
304 
305 private:
306 
330 
331 protected:
334 }; //SidechainMover
335 
336 
337 } // sidechain_moves
338 } // simple_moves
339 } // protocols
340 
341 #endif