IMP  2.2.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 kernel::ParticlesTemp &to_move, const kernel::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 kernel::ParticlesTemp &particles, const PairPredicates &filters)
 
void add_close_pair_score (PairScore *ps, double distance, const kernel::ParticlesTemp &particles)
 
void clear_close_pair_scores ()
 
virtual kernel::Restraints create_restraints () const
 
void do_add_score_and_derivatives (IMP::ScoreAccumulator sa, const ScoreStatesTemp &ss)
 
virtual kernel::ModelObjectsTemp do_get_inputs () const
 
kernel::ParticleIndexes get_movable_indexes () const
 
virtual std::string get_type_name () const
 
virtual ::IMP::base::VersionInfo get_version_info () const
 Get information about the module and version of the object.
 
virtual void handle_set_has_required_score_states (bool)
 
void reset_moved_particles ()
 
void set_moved_particles (const kernel::ParticleIndexes &p)
 
- Public Member Functions inherited from IMP::kernel::ScoringFunction
 ScoringFunction (kernel::Model *m, std::string name)
 
virtual ModelObjectsTemp do_get_outputs () const
 
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
 
- Public Member Functions inherited from IMP::kernel::ModelObject
 ModelObject (kernel::Model *m, std::string name)
 
bool get_has_dependencies () const
 Return whether this object has dependencies computed.
 
bool get_has_required_score_states () const
 
ModelObjectsTemp get_inputs () const
 
ModelObjectsTemps get_interactions () const
 
Modelget_model () const
 
ModelObjectsTemp get_outputs () const
 
const ScoreStatesTempget_required_score_states () const
 
void set_has_dependencies (bool tf)
 
void set_has_required_score_states (bool tf)
 
- Public Member Functions inherited from IMP::base::Object
virtual void clear_caches ()
 
virtual void do_destroy ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
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
virtual void do_add_score_and_derivatives (ScoreAccumulator sa, const ScoreStatesTemp &ss)=0
 
ScoreAccumulator get_score_accumulator (bool deriv)
 
ScoreAccumulator get_score_accumulator_if_below (bool deriv, double max)
 
ScoreAccumulator get_score_accumulator_if_good (bool deriv)
 
- Protected Member Functions inherited from IMP::kernel::ModelObject
virtual ModelObjectsTemps do_get_interactions () const
 
- Protected Member Functions inherited from IMP::base::Object
 Object (std::string name)
 Construct an object with the given name. More...
 

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 38 of file IncrementalScoringFunction.h.

Constructor & Destructor Documentation

IMP::core::IncrementalScoringFunction::IncrementalScoringFunction ( const kernel::ParticlesTemp to_move,
const kernel::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 kernel::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.

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

Return a set of restraints equivalent to this scoring function.

Implements IMP::kernel::ScoringFunction.

virtual kernel::ModelObjectsTemp IMP::core::IncrementalScoringFunction::do_get_inputs ( ) const
virtual

Get any Particle, Container or other ModelObjects read by this during evaluation. If you read everything in a container, you can just return that container.

Implements IMP::kernel::ModelObject.

virtual void IMP::core::IncrementalScoringFunction::handle_set_has_required_score_states ( bool  )
virtual

Called when set_has_required_score_states() is called.

Reimplemented from IMP::kernel::ModelObject.

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 kernel::ParticleIndexes p)

Set which particles have moved since the last evaluate.


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