9 #ifndef IMPCORE_INCREMENTAL_SCORING_FUNCTION_H
10 #define IMPCORE_INCREMENTAL_SCORING_FUNCTION_H
12 #include <IMP/core/core_config.h>
17 #include <boost/unordered_map.hpp>
19 IMPCORE_BEGIN_NAMESPACE
21 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
51 struct ScoringFunctionsMap
52 :
public boost::unordered_map<kernel::ParticleIndex, Data> {
53 ~ScoringFunctionsMap();
55 ScoringFunctionsMap scoring_functions_;
60 Floats flattened_restraints_scores_;
64 struct Wrapper :
public base::Vector<internal::NBLScoring *> {
69 void create_scoring_functions();
70 void do_non_incremental_evaluate();
72 const boost::unordered_map<kernel::Restraint *, int> &all,
89 double weight = 1.0,
double max =
NO_MAX,
91 "IncrementalScoringFunction%1%");
96 void reset_moved_particles();
101 void add_close_pair_score(
PairScore *ps,
double distance,
104 void add_close_pair_score(
PairScore *ps,
double distance,
106 void clear_close_pair_scores();
116 IMPCORE_END_NAMESPACE
const double NO_MAX
Use this value when you want to turn off maximum for restraint evaluation.
virtual Restraints create_restraints() const =0
Return a set of restraints equivalent to this scoring function.
Import IMP/kernel/base_types.h in the namespace.
virtual void handle_set_has_required_score_states(bool)
A smart pointer to a ref-counted Object that is a class member.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
IMP::base::Vector< IMP::base::WeakPointer< Restraint > > RestraintsTemp
Represents a scoring function on the model.
Abstract class for scoring object(s) of type ParticlePair.
Class for adding up scores during ScoringFunction evaluation.
IMP::base::Vector< IMP::base::WeakPointer< ScoreState > > ScoreStatesTemp
IMP::base::Vector< IMP::base::Pointer< PairPredicate > > PairPredicates
virtual void do_add_score_and_derivatives(ScoreAccumulator sa, const ScoreStatesTemp &ss)=0
A nullptr-initialized pointer to an IMP Object.
virtual ModelObjectsTemp do_get_inputs() const =0
Functions to generate vectors.
Storage of a model, its restraints, constraints and particles.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.