9 #ifndef IMPKERNEL_RESTRAINT_H
10 #define IMPKERNEL_RESTRAINT_H
12 #include <IMP/kernel_config.h>
21 IMPKERNEL_BEGIN_NAMESPACE
22 class DerivativeAccumulator;
60 double get_score()
const;
66 double evaluate(
bool calc_derivs)
const;
68 double evaluate_if_good(
bool calc_derivatives)
const;
71 double evaluate_if_below(
bool calc_derivatives,
double max)
const;
92 return unprotected_evaluate(da);
99 return unprotected_evaluate(da);
134 Restraint *create_current_decomposition()
const;
144 void set_weight(
Float weight);
145 Float get_weight()
const {
return weight_; }
159 double get_maximum_score()
const {
return max_; }
160 void set_maximum_score(
double s);
173 double max =
NO_MAX)
const;
174 #if !defined(IMP_DOXYGEN)
175 void set_last_score(
double s)
const { last_score_ = s; }
197 return Restraints(1, const_cast<Restraint *>(
this));
207 return do_create_decomposition();
220 mutable double last_score_;
231 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
255 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.
Various useful constants.
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
#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.
Single variable function.
virtual double get_last_score() const
bool get_was_good() const
Represents a scoring function on the model.
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.