RestraintSets allow one to define a tree of restraints and to weight various restraints. Upon evaluation, all of the restraints in the RestraintSet are evaluated using the provided weight (weights are multiplicative when RestraintSets are nested).
If the weight is 0, the restraints are not evaluated.
Public Member Functions | |
ContainersTemp | get_input_containers () const |
ParticlesTemp | get_input_particles () const |
ParticlesList | get_interacting_particles () const |
virtual std::string | get_type_name () const |
virtual ::IMP::VersionInfo | get_version_info () const |
Float | get_weight () const |
RestraintSet (const std::string &name="RestraintSet %1%") | |
Create an empty set. | |
RestraintSet (double weight, const std::string &name="RestraintSet %1%") | |
Create an empty set. | |
void | set_weight (Float weight) |
virtual double | unprotected_evaluate (DerivativeAccumulator *accum) const |
Methods to control the nested Restraint objects | |
This container manages a set of Restraint objects. To manipulate the stored set use the methods below. | |
unsigned int | add_restraint (Restraint *obj) |
void | add_restraints (const Restraints &obj) |
void | clear_restraints () |
bool | get_has_restraints () const |
return true if there are any objects in the container | |
unsigned int | get_number_of_restraints () const |
Restraint * | get_restraint (unsigned int i) const |
void | remove_restraint (Restraint *d) |
Remove any occurences of d from the container. | |
void | remove_restraints (const Restraints &d) |
Remove any occurences of each item in d. | |
template<class F > | |
void | remove_restraints_if (const F &f) |
Remove any occurrences for which f is true. | |
void | reserve_restraints (unsigned int sz) |
RestraintConstIterator | restraints_begin () const |
RestraintIterator | restraints_begin () |
RestraintConstIterator | restraints_end () const |
RestraintIterator | restraints_end () |
void | set_restraints (const Restraints &ps) |
Protected Member Functions | |
void | set_model (Model *m) |
Friends | |
template<class T > | |
void | IMP::internal::unref (T *) |
unsigned int IMP::RestraintSet::add_restraint | ( | Restraint * | obj | ) |
void IMP::RestraintSet::add_restraints | ( | const Restraints & | obj | ) |
Add several objects to the container. They are not necessarily added at the end.
Restraint* IMP::RestraintSet::get_restraint | ( | unsigned int | i | ) | const |
Get the object refered to by the index
IndexException | in Python if the index is out of range |
void IMP::RestraintSet::set_restraints | ( | const Restraints & | ps | ) |
Set the contents of the container to ps removing all its current contents.