9 #ifndef IMPKERNEL_RESTRAINT_H
10 #define IMPKERNEL_RESTRAINT_H
12 #include <IMP/kernel/kernel_config.h>
21 IMPKERNEL_BEGIN_NAMESPACE
60 double get_score()
const;
71 double evaluate(
bool calc_derivs)
const;
74 double evaluate_if_good(
bool calc_derivatives)
const;
77 double evaluate_if_below(
bool calc_derivatives,
double max)
const;
98 return unprotected_evaluate(da);
105 return unprotected_evaluate(da);
140 Restraint *create_current_decomposition()
const;
150 void set_weight(
Float weight);
151 Float get_weight()
const {
return weight_; }
165 double get_maximum_score()
const {
return max_; }
166 void set_maximum_score(
double s);
180 double max =
NO_MAX)
const;
181 #if !defined(IMP_DOXYGEN)
182 void set_last_score(
double s)
const { last_score_ = s; }
205 return Restraints(1, const_cast<Restraint *>(
this));
216 return do_create_decomposition();
230 mutable double last_score_;
242 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
269 IMPKERNEL_END_NAMESPACE
Restraints create_decomposition(const RestraintsTemp &rs)
Class for adding derivatives from restraints to the model.
const double NO_MAX
Use this value when you want to turn off maximum for restraint evaluation.
Class for adding derivatives from restraints to the model.
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
IMP::kernel::DerivativeAccumulator DerivativeAccumulator
#define IMP_UNUSED(variable)
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Ref counted objects should have private destructors.
IMP::base::Vector< IMP::base::Pointer< Restraint > > Restraints
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())
Control display of deprecation information.
Class for adding scores from restraints to the model.
virtual double get_last_score() const
Single variable function.
Class for adding up scores during ScoringFunction evaluation.
A restraint is a term in an IMP ScoringFunction.
ModelObjectsTemp do_get_outputs() const
virtual Restraints do_create_current_decomposition() const
double Float
Basic floating-point value (could be float, double...)
virtual Restraints do_create_decomposition() const
bool get_was_good() const
IMP::kernel::Restraint Restraint
Various useful constants.
Class for storing model, its restraints, constraints, and particles.