33 #include <utility/tag/Tag.hh>
43 #include <utility/vector0.hh>
44 #include <utility/vector1.hh>
53 namespace canonical_sampling {
67 return "MetricRecorder";
72 cumulate_jobs_(false),
73 cumulate_replicas_(false),
74 prepend_output_name_(false),
86 file_name_(other.file_name_),
87 stride_(other.stride_),
88 cumulate_jobs_(other.cumulate_jobs_),
89 cumulate_replicas_(other.cumulate_replicas_),
90 prepend_output_name_(other.prepend_output_name_),
91 step_count_(other.step_count_),
92 torsion_ids_(other.torsion_ids_),
93 last_flush_(other.last_flush_)
100 runtime_assert(
false);
119 return "MetricRecorder";
132 cumulate_jobs_ = tag->getOption<
bool >(
"cumulate_jobs", false );
141 TagPtr const subtag = *subtag_it;
145 if (subtag->getName() ==
"Torsion") {
151 if (subtag->hasOption(
"name")) name = subtag->getOptions().find(
"name")->second;
156 utility_exit_with_message(
"Parsed unknown metric type in MetricRecorder");
211 bool cumulate_replicas
225 bool prepend_output_name
237 runtime_assert(torsion_id.
valid());
241 std::ostringstream name_stream;
242 name_stream << torsion_id;
243 name = name_stream.str();
246 torsion_ids_.push_back(std::pair<core::id::TorsionID, std::string>(torsion_id, name));
260 std::transform(type.begin(), type.end(), type.begin(), toupper);
264 }
else if (type ==
"CHI") {
266 }
else if (type ==
"JUMP") {
269 utility_exit_with_message(
"Unknown torsion type");
295 std::ostringstream file_name_stream;
304 core::Size nstruct_index( job ? job->nstruct_index() : 1 );
305 std::string output_name( metropolis_hastings_mover ? metropolis_hastings_mover->output_name() :
"" );
310 if (metropolis_hastings_mover) {
311 tempering =
dynamic_cast< TemperingBase const *
>( metropolis_hastings_mover->tempering()() );
340 if (tempering)
recorder_stream_ <<
'\t' << metropolis_hastings_mover->monte_carlo()->temperature();
349 time_t now = time(NULL);
379 metropolis_hastings_mover.
monte_carlo()->last_accepted_pose(),
380 &metropolis_hastings_mover
392 metropolis_hastings_mover.
monte_carlo()->last_accepted_pose(),
393 &metropolis_hastings_mover