9 #ifndef IMPKERNEL_RESTRAINT_H
10 #define IMPKERNEL_RESTRAINT_H
12 #include <IMP/kernel_config.h>
23 IMPKERNEL_BEGIN_NAMESPACE
24 class DerivativeAccumulator;
62 double get_score()
const;
68 double evaluate(
bool calc_derivs)
const;
70 double evaluate_if_good(
bool calc_derivatives)
const;
73 double evaluate_if_below(
bool calc_derivatives,
double max)
const;
94 return unprotected_evaluate(da);
101 return unprotected_evaluate(da);
163 Restraint *create_current_decomposition()
const;
173 void set_weight(
Float weight);
174 Float get_weight()
const {
return weight_; }
188 double get_maximum_score()
const {
return max_; }
189 void set_maximum_score(
double s);
202 double max =
NO_MAX)
const;
203 #if !defined(IMP_DOXYGEN)
204 void set_last_score(
double s)
const { last_score_ = s; }
226 return Restraints(1, const_cast<Restraint *>(
this));
236 return do_create_decomposition();
249 mutable double last_score_;
260 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
284 IMPKERNEL_END_NAMESPACE
Control display of deprecation information.
const double NO_MAX
Use this value when you want to turn off maximum for restraint evaluation.
IMP::Vector< IMP::Pointer< Restraint > > Restraints
Class for adding scores from restraints to the model.
virtual RestraintInfo * get_static_info() const
Various useful constants.
virtual RestraintInfo * get_dynamic_info() const
Class for adding derivatives from restraints to the model.
virtual Restraints do_create_decomposition() const
ModelObjectsTemp do_get_outputs() const
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Ref counted objects should have private destructors.
A smart pointer to a reference counted object.
ScoringFunction * create_scoring_function(RestraintType *rs, double weight=1.0, double max=NO_MAX, std::string name=std::string())
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Class for storing model, its restraints, constraints, and particles.
virtual Restraints do_create_current_decomposition() const
Provide a nullptr keyword analog.
#define IMP_UNUSED(variable)
Provide a consistent interface for things that take Restraints as arguments.
Class for adding up scores during ScoringFunction evaluation.
Restraints create_decomposition(const RestraintsTemp &rs)
Return the decomposition of a list of restraints.
Report key:value information on restraints.
Single variable function.
virtual double get_last_score() const
bool get_was_good() const
Represents a scoring function on the model.
Report key:value information on restraints.
double Float
Basic floating-point value (could be float, double...)
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.