IMP  2.0.1
The Integrative Modeling Platform
IMP::core::IncrementalScoringFunction Class Reference

#include <IMP/core/IncrementalScoringFunction.h>

+ Inheritance diagram for IMP::core::IncrementalScoringFunction:

Public Member Functions

 IncrementalScoringFunction (const ParticlesTemp &to_move, const RestraintsTemp &rs, double weight=1.0, double max=NO_MAX, std::string name="IncrementalScoringFunction%1%")
 
void add_close_pair_score (PairScore *ps, double distance, const ParticlesTemp &particles, const PairPredicates &filters)
 
void add_close_pair_score (PairScore *ps, double distance, const ParticlesTemp &particles)
 
void clear_close_pair_scores ()
 
Restraints create_restraints () const
 
void do_add_score_and_derivatives (IMP::ScoreAccumulator sa, const ScoreStatesTemp &ss)
 
ParticleIndexes get_movable_particles () const
 
ScoreStatesTemp get_required_score_states () const
 
void reset_moved_particles ()
 
void set_moved_particles (const ParticleIndexes &p)
 
- Public Member Functions inherited from IMP::kernel::ScoringFunction
 ScoringFunction (Model *m, std::string name)
 
void clear_caches ()
 
virtual ModelObjectsTemp do_get_inputs () const
 
virtual ModelObjectsTemp do_get_outputs () const
 
virtual void do_update_dependencies ()
 
double evaluate (bool derivatives)
 Evaluate and return the score. More...
 
double evaluate_if_below (bool derivatives, double max)
 
double evaluate_if_good (bool derivatives)
 
bool get_had_good_score () const
 
double get_last_score () const
 
const ScoreStatesTemp & get_score_states ()
 
- Public Member Functions inherited from IMP::kernel::ModelObject
 ModelObject (Model *m, std::string name)
 
ModelObjectsTemp get_inputs () const
 
ModelObjectsTemps get_interactions () const
 
Modelget_model () const
 
ModelObjectsTemp get_outputs () const
 
- Public Member Functions inherited from IMP::base::Object
virtual IMP::base::VersionInfo get_version_info () const =0
 Get information about the module and version of the object.
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Additional Inherited Members

- Public Types inherited from IMP::kernel::ScoringFunction
typedef std::pair< double, bool > ScoreIsGoodPair
 
- Protected Member Functions inherited from IMP::kernel::ScoringFunction
ScoreAccumulator get_score_accumulator (bool deriv)
 
ScoreAccumulator get_score_accumulator_if_below (bool deriv, double max)
 
ScoreAccumulator get_score_accumulator_if_good (bool deriv)
 

Detailed Description

This is a scoring function that computes the score efficiently when a small number of particles are changed.

Note
At the moment moves of one particle at a time are handled most efficiently.
Only full evaluation is supported and information about restraint sets and such are lost (and so one can't count on information about whether the score is good).

The ensure proper evaluation, the ScoringFunction is divided into a number of sub scoring functions, one per possibly moved particles. Each of

Definition at line 39 of file IncrementalScoringFunction.h.

Constructor & Destructor Documentation

IMP::core::IncrementalScoringFunction::IncrementalScoringFunction ( const ParticlesTemp &  to_move,
const RestraintsTemp &  rs,
double  weight = 1.0,
double  max = NO_MAX,
std::string  name = "IncrementalScoringFunction%1%" 
)

Pass the particles that will be individuall mode, and the list of restraints to evaluate on them.

Parameters
to_moveparticles to be moved, must contain at least one particle
rsrestraints (can be empty in principle, in which case the score is 0)
weightthe weight used to scale the restraints
maxmaximum value for evaluate_if_good or evaluate_if_below, can be ignored for most purposes
nameThe name template to use for the scoring function.

Member Function Documentation

void IMP::core::IncrementalScoringFunction::add_close_pair_score ( PairScore ps,
double  distance,
const ParticlesTemp &  particles,
const PairPredicates &  filters 
)

Close pairs scores can be handled separately for efficiency, to do that, add a pair score here to act on the list of particles.

Restraints IMP::core::IncrementalScoringFunction::create_restraints ( ) const
virtual

Return a set of restraints equivalent to this scoring function.

Implements IMP::kernel::ScoringFunction.

void IMP::core::IncrementalScoringFunction::do_add_score_and_derivatives ( IMP::ScoreAccumulator  sa,
const ScoreStatesTemp &  ss 
)
virtual

Do the actual work of computing the score and (optional) derivatives. The list of all score states that must be updated is passed.

Implements IMP::kernel::ScoringFunction.

ScoreStatesTemp IMP::core::IncrementalScoringFunction::get_required_score_states ( ) const
virtual

Return any score states needed in order to do scoring.

Implements IMP::kernel::ScoringFunction.

void IMP::core::IncrementalScoringFunction::reset_moved_particles ( )

Undo the last moved particles. This is similar in effect to, but perhaps more efficient than, calling set_moved_particles() a second time with the same list.

void IMP::core::IncrementalScoringFunction::set_moved_particles ( const ParticleIndexes p)

Set which particles have moved since the last evaluate.


The documentation for this class was generated from the following file: