9 #ifndef IMPCORE_RESTRAINTS_SCORING_FUNCTION_H
10 #define IMPCORE_RESTRAINTS_SCORING_FUNCTION_H
12 #include <IMP/core/core_config.h>
15 #include <IMP/internal/RestraintsScoringFunction.h>
16 #include <cereal/access.hpp>
17 #include <cereal/types/base_class.hpp>
18 #include <cereal/types/polymorphic.hpp>
20 IMPCORE_BEGIN_NAMESPACE
24 #if defined(IMP_DOXYGEN) || defined(SWIG)
27 public IMP::internal::RestraintsScoringFunction
30 friend class cereal::access;
32 template<
class Archive>
void serialize(Archive &ar) {
33 ar(cereal::base_class<IMP::internal::RestraintsScoringFunction>(
this));
39 double weight = 1.0,
double max =
NO_MAX,
40 std::string name =
"RestraintsScoringFunction%1%")
41 : IMP::internal::RestraintsScoringFunction(rs, weight, max, name) {}
44 : IMP::internal::RestraintsScoringFunction(rs, 1.0,
NO_MAX, name) {}
48 void do_add_score_and_derivatives(
51 void do_add_score_and_derivatives_moved(
62 unsigned int get_number_of_restraints()
const;
63 void clear_restraints();
64 Restraint *get_restraint(
unsigned int i)
const;
65 void erase_restraint(
unsigned int i);
68 unsigned int _python_index_restraint(
Restraint *r,
unsigned int start,
const double NO_MAX
Use this value when you want to turn off maximum for restraint evaluation.
RestraintsTemp get_restraints(const Subset &s, const ParticleStatesTable *pst, const DependencyGraph &dg, RestraintSet *rs)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Create a scoring function on a list of restraints.
A more IMP-like version of the std::vector.
void add_restraint(RMF::FileHandle fh, Restraint *hs)
Provide a consistent interface for things that take Restraints as arguments.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
void add_restraints(RMF::FileHandle fh, const Restraints &hs)
Class for adding up scores during ScoringFunction evaluation.
Represents a scoring function on the model.
Represents a scoring function on the model.
Restraints create_restraints(RMF::FileConstHandle fh, Model *m)
Abstract base class for all restraints.
A restraint is a term in an IMP ScoringFunction.