9 #ifndef IMPKERNEL_DECLARE_RESTRAINT_H
10 #define IMPKERNEL_DECLARE_RESTRAINT_H
12 #include <IMP/kernel/kernel_config.h>
21 IMPKERNEL_BEGIN_NAMESPACE
59 IMPKERNEL_DEPRECATED_METHOD_DECL(2.1)
60 Restraint(std::string name =
"Restraint %1%");
64 double get_score()
const;
75 double evaluate(
bool calc_derivs)
const;
78 double evaluate_if_good(
bool calc_derivatives)
const;
81 double evaluate_if_below(
bool calc_derivatives,
double max)
const;
102 return unprotected_evaluate(da);
109 return unprotected_evaluate(da);
144 Restraint *create_current_decomposition()
const;
154 void set_weight(
Float weight);
155 Float get_weight()
const {
return weight_; }
169 double get_maximum_score()
const {
return max_; }
170 void set_maximum_score(
double s);
184 double max =
NO_MAX)
const;
185 #if !defined(IMP_DOXYGEN)
186 void set_last_score(
double s)
const { last_score_ = s; }
201 IMPKERNEL_DEPRECATED_METHOD_DECL(2.1)
204 IMPKERNEL_DEPRECATED_METHOD_DECL(2.1)
216 return Restraints(1, const_cast<Restraint *>(
this));
227 return do_create_decomposition();
241 mutable double last_score_;
253 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
277 IMPKERNEL_END_NAMESPACE
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.
ScoringFunctions create_decomposition(ScoringFunction *sf)
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.
ParticlesTemp get_input_particles(const ModelObjectsTemp &mos)
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.
ContainersTemp get_input_containers(const ModelObjectsTemp &mos)
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...)
bool get_was_good() const
IMP::kernel::Restraint Restraint
Various useful constants.
Class for storing model, its restraints, constraints, and particles.