IMP
2.0.1
The Integrative Modeling Platform
|
#include <IMP/core/IncrementalScoringFunction.h>
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 |
Model * | get_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) |
Related Functions inherited from IMP::kernel::ScoringFunction | |
typedef IMP::base::Vector < IMP::base::WeakPointer < ScoringFunction > > | ScoringFunctionsTemp |
This is a scoring function that computes the score efficiently when a small number of particles are changed.
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.
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.
to_move | particles to be moved, must contain at least one particle |
rs | restraints (can be empty in principle, in which case the score is 0) |
weight | the weight used to scale the restraints |
max | maximum value for evaluate_if_good or evaluate_if_below, can be ignored for most purposes |
name | The name template to use for the scoring function. |
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.
|
virtual |
Return a set of restraints equivalent to this scoring function.
Implements IMP::kernel::ScoringFunction.
|
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.
|
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.