Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MetropolisHastingsMover.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/canonical_sampling/MetropolisHastingsMover.hh
11 /// @brief
12 /// @author
13 
14 #ifndef INCLUDED_protocols_canonical_sampling_MetropolisHastingsMover_hh
15 #define INCLUDED_protocols_canonical_sampling_MetropolisHastingsMover_hh
16 
17 // Unit Headers
19 #include <protocols/moves/Mover.hh>
21 
22 // Project Headers
24 #include <core/pose/Pose.fwd.hh>
25 #include <numeric/random/WeightedSampler.hh>
26 
27 // Utility Headers
28 #include <core/types.hh>
29 #include <utility/vector0.hh>
30 #include <utility/vector1.hh>
31 
34 
35 #ifdef WIN32
38 #endif
39 
40 
41 namespace protocols {
42 namespace canonical_sampling {
43 
44 ///@details
46 
47 public:
48 
50 
52  MetropolisHastingsMover const & metropolis_hastings_mover
53  );
54 
55  virtual
57 
58  virtual
59  void
60  apply( core::pose::Pose & pose );
61 
62  virtual
64  get_name() const;
65 
67  clone() const;
68 
69  virtual
71  fresh_instance() const;
72 
73  virtual
74  bool
76 
77  virtual
78  bool
80 
81  virtual
82  void
84  utility::tag::TagPtr const tag,
86  protocols::filters::Filters_map const & filters,
87  protocols::moves::Movers_map const & movers,
88  core::pose::Pose const & pose
89  );
90 
92  monte_carlo() const;
93 
94  void
97  );
98 
99  void
102  );
103 
105  tempering() const;
106 
107  core::Size
108  ntrials() const { return ntrials_; }
109 
110  void
111  set_ntrials(
113  );
114 
115  std::string const &
116  output_name() const;
117 
118  void
120  std::string const & output_name
121  );
122 
125  std::string const & suffix,
126  bool cumulate_jobs = false,
127  bool cumulate_replicas = false
128  ) const;
129 
130  bool
131  finished() const;
132 
133  virtual
135  random_mover();
136 
137  virtual
138  void
139  add_mover(
140  ThermodynamicMoverOP mover,
141  core::Real weight,
142  utility::tag::TagPtr const& subtag
143  );
144 
145  virtual void
146  add_mover(
147  ThermodynamicMoverOP mover,
148  core::Real weight
149  );
150 
151  void
153  core::Real weight
154  );
155 
156  void
158  core::Real weight
159  );
160 
161  void
163  core::Real weight
164  );
165 
166  void
168  core::Real weight,
169  core::Real prob_uniform,
170  core::Real prob_withinrot,
171  bool preserve_cbeta
172  );
173 
174  void
176  core::Real weight,
177  core::Real prob_uniform,
178  core::Real prob_withinrot,
179  bool preserve_cbeta,
181  );
182 
183  void
184  add_observer(
185  ThermodynamicObserverOP observer
186  );
187 
188  ThermodynamicMover const&
189  last_move() const;
190 
191  bool
192  last_accepted() const {
193  return last_accepted_;
194  }
195 
196 protected:
197 
199  tempering() { return tempering_; }
200 
203  {
204  return movers_[idx];
205  }
206 
208 
209  //initialize all movers
210  //return cycle number if a restart, 0 otherwise
212 
213  void set_last_accepted( bool setting ) {
214  last_accepted_ = setting;
215  }
216 
217  void set_last_move( ThermodynamicMoverOP setting );
218 
220  ObserverList const& observers() { return observers_; }
221 
223 private:
224 
225  ///configurables...
232 
233  //helper
234  numeric::random::WeightedSampler weighted_sampler_;
235 
236  ///some status is necessary for the observers
240 
241  //internal book keeping
243 
244 }; //end MetropolisHastingsMover
245 
246 } //namespace canonical_sampling
247 } //namespace protocols
248 
249 #endif //INCLUDED_protocols_canonical_sampling_MetropolisHastingsMover_HH