IMP logo
IMP Reference Guide  2.18.0
The Integrative Modeling Platform
RestraintsScoringFunction.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/RestraintsScoringFunction.h
3  * \brief A scoring function on a list of restraints
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPCORE_RESTRAINTS_SCORING_FUNCTION_H
10 #define IMPCORE_RESTRAINTS_SCORING_FUNCTION_H
11 
12 #include <IMP/core/core_config.h>
13 #include <IMP/ScoringFunction.h>
14 #include <IMP/Restraint.h>
15 #include <IMP/internal/RestraintsScoringFunction.h>
16 
17 IMPCORE_BEGIN_NAMESPACE
18 
19 //! Create a scoring function on a list of restraints.
21 #if defined(IMP_DOXYGEN) || defined(SWIG)
22  public ScoringFunction
23 #else
24  public IMP::internal::RestraintsScoringFunction
25 #endif
26  {
27  public:
29  double weight = 1.0, double max = NO_MAX,
30  std::string name = "RestraintsScoringFunction%1%")
31  : IMP::internal::RestraintsScoringFunction(rs, weight, max, name) {}
33  std::string name)
34  : IMP::internal::RestraintsScoringFunction(rs, 1.0, NO_MAX, name) {}
35 #if defined(SWIG)
36  void do_add_score_and_derivatives(
37  ScoreAccumulator sa, const ScoreStatesTemp &ss) override;
38 
39  void do_add_score_and_derivatives_moved(
40  ScoreAccumulator sa, const ParticleIndexes &moved_pis,
41  const ParticleIndexes &reset_pis,
42  const ScoreStatesTemp &ss) override;
43 
44  virtual Restraints create_restraints() const override;
45  virtual ModelObjectsTemp do_get_inputs() const override;
47 #endif
48 };
49 
50 IMPCORE_END_NAMESPACE
51 
52 #endif /* IMPCORE_RESTRAINTS_SCORING_FUNCTION_H */
const double NO_MAX
Use this value when you want to turn off maximum for restraint evaluation.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Create a scoring function on a list of restraints.
A more IMP-like version of the std::vector.
Definition: Vector.h:42
Provide a consistent interface for things that take Restraints as arguments.
Definition: Restraint.h:353
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.