Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MetricRecorder.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/MetricRecorder.hh
11 ///
12 /// @brief
13 /// @author
14 
15 
16 #ifndef INCLUDED_protocols_canonical_sampling_MetricRecorder_hh
17 #define INCLUDED_protocols_canonical_sampling_MetricRecorder_hh
18 
19 
20 // Project forward headers
22 
23 
24 // Project headers
26 #include <core/types.hh>
27 #include <core/pose/Pose.fwd.hh>
28 #include <utility/io/ozstream.hh>
29 
30 
31 // External library headers
32 
33 
34 // C++ headers
35 #include <ctime>
36 #include <string>
37 
38 #include <core/id/TorsionID.fwd.hh>
39 #include <utility/vector1.hh>
40 
41 
42 
43 // Operating system headers
44 
45 
46 // Forward declarations
47 
48 
49 namespace protocols {
50 namespace canonical_sampling {
51 
52 
53  /// @brief
55 {
56  // Friends
57 
58 
59 public: // Types
60 
61 
62 private: // Types
63 
64 
65 
66 
67 public: // Constants
68 
69 
70 private: // Constants
71 
72 
73 
74 
75 public: // Creation
76 
77 
78  /// @brief Constructor
80 
81 
82  /// @brief Destructor
84 
85 
86  /// @brief Copy constructor
87  MetricRecorder( MetricRecorder const & );
88 
89 
90 private: // Creation
91 
92 
93 
94 
95 public: // Methods: assignment
96 
97 
98  /// @brief operator=
100  operator=( MetricRecorder const & );
101 
102 
103 public: // Methods: comparison
104 
105 
106 
107 public: // Methods
108 
109  virtual
111  clone() const;
112 
113  virtual
115  fresh_instance() const;
116 
117  virtual
119  get_name() const;
120 
121  virtual
122  void
123  parse_my_tag(
124  utility::tag::TagPtr const tag,
126  protocols::filters::Filters_map const & filters,
127  protocols::moves::Movers_map const & movers,
128  core::pose::Pose const & pose
129  );
130 
131  virtual
132  bool
133  reinitialize_for_each_job() const { return true; };
134 
135  std::string const &
136  file_name() const;
137 
138  void
139  file_name(
140  std::string const & file_name
141  );
142 
143  core::Size
144  stride() const;
145 
146  void
147  stride(
149  );
150 
151  bool
152  cumulate_jobs() const;
153 
154  void
156  bool cumulate_jobs
157  );
158 
159  bool
160  cumulate_replicas() const;
161 
162  void
164  bool cumulate_replicas
165  );
166 
167  bool
168  prepend_output_name() const;
169 
170  void
173  );
174 
175  void
176  add_torsion(
177  core::id::TorsionID const & torsion_id,
178  std::string name = ""
179  );
180 
181  void
182  add_torsion(
183  core::pose::Pose const & pose,
184  std::string const & rsd,
186  core::Size torsion,
187  std::string name = ""
188  );
189 
190  void
191  reset(
192  core::pose::Pose const & pose,
194  );
195 
196  void
198  core::pose::Pose const & pose,
200  );
201 
202  virtual
203  void
204  apply(
205  core::pose::Pose & pose
206  );
207 
208  virtual
209  void
211  core::pose::Pose & pose,
212  protocols::canonical_sampling::MetropolisHastingsMover const & metropolis_hastings_mover,
213  core::Size cycle //non-zero if trajectory is restarted
214  );
215 
216  virtual
217  void
219  protocols::canonical_sampling::MetropolisHastingsMover const & metropolis_hastings_mover
220  );
221 
222  virtual
223  void
225  core::pose::Pose & pose,
226  protocols::canonical_sampling::MetropolisHastingsMover const & metropolis_hastings_mover
227  );
228 
229 private:
230 
231  void
232  write_model(
233  core::pose::Pose const & pose
234  );
235 
236 
237 
238 public: // Properties
239 
240 
241 
242 
243 private: // Fields
244 
251  utility::io::ozstream recorder_stream_;
253  time_t last_flush_;
254 
255 }; // MetricRecorder
256 
257 
258 } // namespace canonical_sampling
259 } // namespace protocols
260 
261 
262 #endif // INCLUDED_protocols_canonical_sampling_MetricRecorder_HH