![]() |
Rosetta Protocols
2014.35
|
Keep track of trial statistics for any number of replicas. More...
#include <MultiTemperatureTrialCounter.hh>
Public Member Functions | |
MultiTemperatureTrialCounter () | |
Default constructor. A temperature controller must be set before the trial counter can be used. More... | |
MultiTemperatureTrialCounter (TemperatureControllerCOP) | |
Fully construct the counter with a temperature controller. More... | |
void | reset () |
Set all counters for all temperatures to zero. More... | |
void | count_trial (std::string const &) |
Note that a move of the given type was attempted. More... | |
void | count_accepted (std::string const &) |
Note that a move of the given type was accepted. More... | |
void | count_energy_drop (std::string const &, core::Real) |
Note that a move of the given type led to the given energy drop. More... | |
protocols::moves::TrialCounter const & | operator[] (core::Size) const |
Return const access to the TrialCounter for the given temperature level. More... | |
protocols::moves::TrialCounter & | operator[] (core::Size) |
Return non-const access to the TrialCounter for the given temperature level. More... | |
void | show (std::ostream &) const |
Write acceptance rates for each move at each temperature to the given stream. More... | |
void | show () const |
Write acceptance rates for each move at each temperature to this module's tracer. More... | |
void | write_to_file (std::string const &file, std::string const &tag) const |
Write acceptance rates for each move at each temperature to the given file. More... | |
void | set_temperature_observer (TemperatureControllerCOP) |
Set the temperature controller. More... | |
Private Member Functions | |
void | _write_to_stream (std::ostream &, std::string const &tag) const |
Help write the trial counters to the given stream. More... | |
Private Attributes | |
TemperatureControllerCOP | tempering_ |
utility::vector1 < protocols::moves::TrialCounter > | counters_ |
Keep track of trial statistics for any number of replicas.
This class helps MetropolisHastingsMover keep track of move statistics. At the end of a simulation, operator[]() can be used to access the TrialCounter objects kept for each temperature level. Alternatively, the show() and write_to_file() methods can also be used to directly output acceptance rates to a stream or file.
|
inline |
Default constructor. A temperature controller must be set before the trial counter can be used.
protocols::canonical_sampling::MultiTemperatureTrialCounter::MultiTemperatureTrialCounter | ( | TemperatureControllerCOP | temp_in | ) |
Fully construct the counter with a temperature controller.
References reset().
|
private |
Help write the trial counters to the given stream.
References counters_, and tempering_.
Referenced by show(), and write_to_file().
void protocols::canonical_sampling::MultiTemperatureTrialCounter::count_accepted | ( | std::string const & | tag | ) |
Note that a move of the given type was accepted.
References counters_, and tempering_.
Referenced by protocols::canonical_sampling::TrialCounterObserver::observe_after_metropolis().
void protocols::canonical_sampling::MultiTemperatureTrialCounter::count_energy_drop | ( | std::string const & | tag, |
core::Real | delta | ||
) |
Note that a move of the given type led to the given energy drop.
References counters_, and tempering_.
void protocols::canonical_sampling::MultiTemperatureTrialCounter::count_trial | ( | std::string const & | tag | ) |
Note that a move of the given type was attempted.
References counters_, and tempering_.
Referenced by protocols::canonical_sampling::TrialCounterObserver::observe_after_metropolis().
protocols::moves::TrialCounter const & protocols::canonical_sampling::MultiTemperatureTrialCounter::operator[] | ( | core::Size | level | ) | const |
Return const access to the TrialCounter for the given temperature level.
References counters_.
protocols::moves::TrialCounter & protocols::canonical_sampling::MultiTemperatureTrialCounter::operator[] | ( | core::Size | level | ) |
Return non-const access to the TrialCounter for the given temperature level.
References counters_.
void protocols::canonical_sampling::MultiTemperatureTrialCounter::reset | ( | ) |
Set all counters for all temperatures to zero.
References counters_, runtime_assert, and tempering_.
Referenced by protocols::canonical_sampling::TrialCounterObserver::initialize_simulation(), MultiTemperatureTrialCounter(), and set_temperature_observer().
void protocols::canonical_sampling::MultiTemperatureTrialCounter::set_temperature_observer | ( | TemperatureControllerCOP | temp_in | ) |
Set the temperature controller.
References reset(), and tempering_.
Referenced by protocols::canonical_sampling::TrialCounterObserver::initialize_simulation(), and protocols::canonical_sampling::TemperingBase::initialize_simulation().
void protocols::canonical_sampling::MultiTemperatureTrialCounter::show | ( | std::ostream & | os | ) | const |
Write acceptance rates for each move at each temperature to the given stream.
References _write_to_stream(), and tempering_.
Referenced by protocols::canonical_sampling::TrialCounterObserver::finalize_simulation().
void protocols::canonical_sampling::MultiTemperatureTrialCounter::show | ( | ) | const |
Write acceptance rates for each move at each temperature to this module's tracer.
References protocols::canonical_sampling::tr.
void protocols::canonical_sampling::MultiTemperatureTrialCounter::write_to_file | ( | std::string const & | file, |
std::string const & | tag | ||
) | const |
Write acceptance rates for each move at each temperature to the given file.
References _write_to_stream(), and out.
Referenced by protocols::canonical_sampling::TrialCounterObserver::finalize_simulation(), protocols::canonical_sampling::TemperingBase::finalize_simulation(), protocols::canonical_sampling::TrialCounterObserver::observe_after_metropolis(), and protocols::canonical_sampling::TemperingBase::observe_after_metropolis().
|
private |
Referenced by _write_to_stream(), count_accepted(), count_energy_drop(), count_trial(), operator[](), and reset().
|
private |
Referenced by _write_to_stream(), count_accepted(), count_energy_drop(), count_trial(), reset(), set_temperature_observer(), and show().