|
Rosetta 3.5
|
container for managing PoseMetricCalculators More...
#include <PoseMetricContainer.hh>


Public Member Functions | |
| PoseMetricContainer () | |
| default destructor More... | |
| PoseMetricContainer (PoseMetricContainer const &src) | |
| copy constructor More... | |
| virtual | ~PoseMetricContainer () |
| default destructor More... | |
| PoseMetricContainer & | operator= (PoseMetricContainer const &src) |
| copy assignment More... | |
| void | clear () |
| clear the list of metric calculators, reset flags More... | |
| void | get (std::string const &calculator_name, std::string const &key, basic::MetricValueBase &val, Pose const &this_pose) |
| get a value out of a PoseMetricCalculator More... | |
| std::string | print (std::string const &calculator_name, std::string const &key, Pose const &this_pose) |
| return a string with the results of a PoseMetricCalculator More... | |
| void | attach_to (core::pose::Pose &pose) |
| attach to a Pose More... | |
| void | detach_from () |
| detach from Pose More... | |
| Pose const * | is_observing () |
| is observing a Pose? More... | |
| void | on_pose_destruction_change (core::pose::signals::DestructionEvent const &event) |
| upon receiving a pose::signals::DestructionEvent, detaches More... | |
| void | on_pose_energy_change (core::pose::signals::EnergyEvent const &event) |
| upon receiving a pose:signals::EnergyEvent, sets flag telling calculators to refresh energy based calculations More... | |
| void | on_pose_conf_change (core::pose::signals::ConformationEvent const &event) |
| upon receiving pose::signals::ConformationEvent, sets flag telling calculators to refresh structure based calculations More... | |
Private Types | |
| typedef std::map< std::string, PoseMetricCalculatorOP > | Name2Calculator |
Private Member Functions | |
| void | process_structure_change () |
| set PoseMetricCalculator structure changed flags More... | |
| void | process_energy_change () |
| set PoseMetricCalculator energy changed flags More... | |
| PoseMetricCalculatorOP | get_calculator (std::string const &calculator_name) |
| get a PoseMetricCalculator by name More... | |
| void | add_calculator (std::string const &calculator_name) |
| add a PoseMetricCalculator by name More... | |
| void | clone_calculators (Name2Calculator const &calcs) |
| clone calculators, primarily for copy More... | |
Private Attributes | |
| core::pose::Pose const * | pose_ptr_ |
| pointer to the Pose being watched More... | |
| bool | structure_is_outdated_ |
| flag for structure change More... | |
| bool | energies_are_outdated_ |
| flag for energy change More... | |
| Name2Calculator | metric_calculators_ |
| the list of metric calculators More... | |
container for managing PoseMetricCalculators
Attaches to a Pose and listens to Pose signals. It then notifies stored PoseMetricCalculators to recalculate as-needed.
Definition at line 50 of file PoseMetricContainer.hh.
|
private |
Definition at line 55 of file PoseMetricContainer.hh.
| core::pose::metrics::PoseMetricContainer::PoseMetricContainer | ( | ) |
default destructor
Definition at line 48 of file PoseMetricContainer.cc.
| core::pose::metrics::PoseMetricContainer::PoseMetricContainer | ( | PoseMetricContainer const & | src) |
copy constructor
Definition at line 57 of file PoseMetricContainer.cc.
References clone_calculators(), and metric_calculators_.
|
virtual |
|
private |
add a PoseMetricCalculator by name
Definition at line 227 of file PoseMetricContainer.cc.
References core::pose::metrics::CalculatorFactory::Instance(), metric_calculators_, and core::pose::metrics::CalculatorFactory::retrieve_calculator().
Referenced by get_calculator().
| void core::pose::metrics::PoseMetricContainer::attach_to | ( | core::pose::Pose & | pose) |
attach to a Pose
Definition at line 108 of file PoseMetricContainer.cc.
References core::pose::Pose::attach_conformation_obs(), core::pose::Pose::attach_destruction_obs(), core::pose::Pose::attach_energy_obs(), detach_from(), energies_are_outdated_, on_pose_conf_change(), on_pose_destruction_change(), on_pose_energy_change(), pose_ptr_, and structure_is_outdated_.
| void core::pose::metrics::PoseMetricContainer::clear | ( | ) |
clear the list of metric calculators, reset flags
Definition at line 87 of file PoseMetricContainer.cc.
References energies_are_outdated_, metric_calculators_, and structure_is_outdated_.
Referenced by operator=().
|
private |
clone calculators, primarily for copy
Definition at line 234 of file PoseMetricContainer.cc.
References metric_calculators_.
Referenced by operator=(), and PoseMetricContainer().
| void core::pose::metrics::PoseMetricContainer::detach_from | ( | ) |
detach from Pose
Definition at line 125 of file PoseMetricContainer.cc.
References core::pose::Pose::detach_conformation_obs(), core::pose::Pose::detach_destruction_obs(), core::pose::Pose::detach_energy_obs(), on_pose_conf_change(), on_pose_destruction_change(), on_pose_energy_change(), and pose_ptr_.
Referenced by attach_to(), on_pose_destruction_change(), and ~PoseMetricContainer().
| void core::pose::metrics::PoseMetricContainer::get | ( | std::string const & | calculator_name, |
| std::string const & | key, | ||
| basic::MetricValueBase & | val, | ||
| Pose const & | this_pose | ||
| ) |
get a value out of a PoseMetricCalculator
Definition at line 96 of file PoseMetricContainer.cc.
References get_calculator().
|
private |
get a PoseMetricCalculator by name
Definition at line 191 of file PoseMetricContainer.cc.
References add_calculator(), energies_are_outdated_, metric_calculators_, pose_ptr_, process_energy_change(), process_structure_change(), and structure_is_outdated_.
| Pose const * core::pose::metrics::PoseMetricContainer::is_observing | ( | ) |
is observing a Pose?
Definition at line 138 of file PoseMetricContainer.cc.
References pose_ptr_.
| void core::pose::metrics::PoseMetricContainer::on_pose_conf_change | ( | core::pose::signals::ConformationEvent const & | event) |
upon receiving pose::signals::ConformationEvent, sets flag telling calculators to refresh structure based calculations
Definition at line 151 of file PoseMetricContainer.cc.
References structure_is_outdated_.
Referenced by attach_to(), and detach_from().
| void core::pose::metrics::PoseMetricContainer::on_pose_destruction_change | ( | core::pose::signals::DestructionEvent const & | event) |
upon receiving a pose::signals::DestructionEvent, detaches
Definition at line 144 of file PoseMetricContainer.cc.
References detach_from().
Referenced by attach_to(), and detach_from().
| void core::pose::metrics::PoseMetricContainer::on_pose_energy_change | ( | core::pose::signals::EnergyEvent const & | event) |
upon receiving a pose:signals::EnergyEvent, sets flag telling calculators to refresh energy based calculations
Definition at line 158 of file PoseMetricContainer.cc.
References energies_are_outdated_.
Referenced by attach_to(), and detach_from().
| PoseMetricContainer & core::pose::metrics::PoseMetricContainer::operator= | ( | PoseMetricContainer const & | src) |
copy assignment
Definition at line 75 of file PoseMetricContainer.cc.
References clear(), clone_calculators(), and metric_calculators_.
| std::string core::pose::metrics::PoseMetricContainer::print | ( | std::string const & | calculator_name, |
| std::string const & | key, | ||
| Pose const & | this_pose | ||
| ) |
return a string with the results of a PoseMetricCalculator
Definition at line 102 of file PoseMetricContainer.cc.
References get_calculator().
|
private |
set PoseMetricCalculator energy changed flags
Definition at line 177 of file PoseMetricContainer.cc.
References energies_are_outdated_, and metric_calculators_.
Referenced by get_calculator().
|
private |
set PoseMetricCalculator structure changed flags
Definition at line 164 of file PoseMetricContainer.cc.
References metric_calculators_, and structure_is_outdated_.
Referenced by get_calculator().
|
private |
flag for energy change
Definition at line 160 of file PoseMetricContainer.hh.
Referenced by attach_to(), clear(), get_calculator(), on_pose_energy_change(), and process_energy_change().
|
private |
the list of metric calculators
Definition at line 164 of file PoseMetricContainer.hh.
Referenced by add_calculator(), clear(), clone_calculators(), get_calculator(), operator=(), PoseMetricContainer(), process_energy_change(), and process_structure_change().
|
private |
pointer to the Pose being watched
Definition at line 152 of file PoseMetricContainer.hh.
Referenced by attach_to(), detach_from(), get_calculator(), and is_observing().
|
private |
flag for structure change
Definition at line 156 of file PoseMetricContainer.hh.
Referenced by attach_to(), clear(), get_calculator(), on_pose_conf_change(), and process_structure_change().
1.8.4