Rosetta
|
Manages lists of constraints generated by ConstraintGenerators. More...
#include <ConstraintsManager.hh>
Public Member Functions | |
ConstraintsManager () | |
virtual | ~ConstraintsManager () |
void | store_constraints (core::pose::Pose &pose, std::string const &name, ConstraintCOPs const &csts) const |
Stores the given constraints in the pose datacache, under the name given. More... | |
ConstraintCOPs const & | retrieve_constraints (core::pose::Pose const &pose, std::string const &name) const |
Retrieves constraints from the pose datacache with the given name. More... | |
bool | has_stored_constraints (core::pose::Pose const &pose, std::string const &name) const |
Checks to see whether constraints exist in datacache under the given name. More... | |
void | remove_constraints (core::pose::Pose &pose, std::string const &name) const |
Clears constraints stored under the given name. More... | |
Static Public Attributes | |
static core::pose::datacache::CacheableDataType::Enum const | MY_TYPE = core::pose::datacache::CacheableDataType::CONSTRAINT_GENERATOR |
Private Types | |
typedef core::scoring::constraints::ConstraintCOPs | ConstraintCOPs |
Private Member Functions | |
ConstraintsMap & | retrieve_constraints_map (core::pose::Pose &pose) const |
non-const access to cached map More... | |
ConstraintsMap const & | retrieve_constraints_map (core::pose::Pose const &pose) const |
const access to cached map More... | |
void | store_empty_constraints_map (core::pose::Pose &pose) const |
adds an empty constraints map to the pose datacache More... | |
Manages lists of constraints generated by ConstraintGenerators.
|
private |
protocols::constraint_generator::ConstraintsManager::ConstraintsManager | ( | ) |
|
virtualdefault |
bool protocols::constraint_generator::ConstraintsManager::has_stored_constraints | ( | core::pose::Pose const & | pose, |
std::string const & | name | ||
) | const |
Checks to see whether constraints exist in datacache under the given name.
[in] | pose | Pose where constraints are cached |
[in] | name | Name under which constraints may be stored |
References core::pose::Pose::data(), protocols::constraint_generator::ConstraintsMap::end(), protocols::constraint_generator::ConstraintsMap::find(), MY_TYPE, and retrieve_constraints_map().
void protocols::constraint_generator::ConstraintsManager::remove_constraints | ( | core::pose::Pose & | pose, |
std::string const & | name | ||
) | const |
Clears constraints stored under the given name.
If constraints are not found under the given name, or there is no cached data, this will do nothing.
[in,out] | pose | Pose where constraints are cached |
[in] | name | Name under which constraints are cached |
References core::pose::Pose::data(), protocols::constraint_generator::ConstraintsMap::end(), protocols::constraint_generator::ConstraintsMap::erase(), protocols::constraint_generator::ConstraintsMap::find(), MY_TYPE, and retrieve_constraints_map().
Referenced by protocols::constraint_generator::RemoveConstraints::apply().
ConstraintsManager::ConstraintCOPs const & protocols::constraint_generator::ConstraintsManager::retrieve_constraints | ( | core::pose::Pose const & | pose, |
std::string const & | name | ||
) | const |
Retrieves constraints from the pose datacache with the given name.
[in] | pose | Pose where constraints are cached |
[in] | name | Name under which constraints are stored |
References protocols::constraint_generator::ConstraintsMap::end(), protocols::constraint_generator::ConstraintsMap::find(), retrieve_constraints_map(), and protocols::constraint_generator::ConstraintsMap::valid_names_string().
Referenced by protocols::constraint_generator::RemoveConstraints::apply().
|
private |
non-const access to cached map
Given a nonconst pose, returns a nonconst reference to its constraints map.
References core::pose::Pose::data(), MY_TYPE, and store_empty_constraints_map().
Referenced by has_stored_constraints(), remove_constraints(), retrieve_constraints(), and store_constraints().
|
private |
const access to cached map
Given a const pose, returns a const reference to its constraints map, throwing error if no constaints map is present.
References core::pose::Pose::data(), and MY_TYPE.
void protocols::constraint_generator::ConstraintsManager::store_constraints | ( | core::pose::Pose & | pose, |
std::string const & | name, | ||
ConstraintCOPs const & | csts | ||
) | const |
Stores the given constraints in the pose datacache, under the name given.
[in,out] | pose | Pose where constraints will be cached |
[in] | name | Name under which constraints will be stored |
[in] | csts | Constraints to cache |
References protocols::constraint_generator::ConstraintsMap::end(), protocols::constraint_generator::ConstraintsMap::find(), protocols::constraint_generator::ConstraintsMap::insert(), retrieve_constraints_map(), and protocols::constraint_generator::TR().
|
private |
adds an empty constraints map to the pose datacache
References core::pose::Pose::data(), and MY_TYPE.
Referenced by retrieve_constraints_map().
|
static |
Referenced by has_stored_constraints(), remove_constraints(), retrieve_constraints_map(), and store_empty_constraints_map().