9 #ifndef IMPKERNEL_DECLARE_RESTRAINT_H
10 #define IMPKERNEL_DECLARE_RESTRAINT_H
12 #include <IMP/kernel/kernel_config.h>
20 IMPKERNEL_BEGIN_NAMESPACE
65 struct ModelInitTag{};
67 Restraint(ModelInitTag, std::string name=
"Restraint %1%");
69 Restraint(std::string name=
"Restraint %1%");
74 double get_score()
const;
85 double evaluate(
bool calc_derivs)
const;
88 double evaluate_if_good(
bool calc_derivatives)
const;
91 double evaluate_if_below(
bool calc_derivatives,
double max)
const;
112 return unprotected_evaluate(da);
119 return unprotected_evaluate(da);
154 Restraint* create_current_decomposition()
const;
165 void set_weight(
Float weight);
166 Float get_weight()
const {
return weight_; }
180 double get_maximum_score()
const {
183 void set_maximum_score(
double s);
198 #if !defined(IMP_DOXYGEN)
199 void set_last_score(
double s)
const { last_score_=s;}
213 #if IMP_HAS_DEPRECATED
229 return Restraints(1, const_cast<Restraint*>(
this));
240 return do_create_decomposition();
257 mutable double last_score_;
262 IMPKERNEL_END_NAMESPACE