Rosetta
|
Tags used to tag messeges sent by MPI functions used to decide whether a slave is requesting a new job id or flagging as job as being a bad input. More...
#include <EvaluatedArchive.hh>
Public Types | |
typedef std::map< std::string, core::Real > | WeightMap |
typedefs for Evaluators and Weights More... | |
typedef std::map< std::string, evaluation::PoseEvaluatorCOP > | EvaluatorMap |
Public Member Functions | |
EvaluatedArchive (ArchiveManagerAP ptr) | |
Constructor and Destructor. More... | |
EvaluatedArchive () | |
~EvaluatedArchive () override | |
bool | add_structure (core::io::silent::SilentStructOP new_decoy, core::io::silent::SilentStructOP alternative_decoy, Batch const &batch) override |
add decoy to Archive @detail evaluate decoy and call add_evaluated_structure More... | |
core::Real | select_score (core::io::silent::SilentStructOP evaluated_decoy) |
compute score according to select_weights — this can contain any evaluator columns More... | |
void | setup_default_evaluators () |
set common evaluators: eg. ConstraintEvaluator if -cst_file is present More... | |
bool | restore_from_file () override |
overloaded that we can sort the pool after reading More... | |
void | read_structures (core::io::silent::SilentFileData &sfd, core::io::silent::SilentFileData &alternative_decoys, Batch const &batch) override |
only overloaded this to add some verbosity each time we read structures More... | |
void | init_from_decoy_set (core::io::silent::SilentFileData const &sfd) override=0 |
overloaded to make input decoys appear the same as decoys coming from batches More... | |
void | start_evaluation_timer () const |
core::io::silent::SilentStructOP | evaluate_silent_struct (core::io::silent::SilentStructOP from_batch) const |
yields an "evaluated" silent-struct which can be queried with select_score @detail will run scoring-process if evaluate_local() otherwise just returns the intpu-silent-struct More... | |
virtual bool | add_evaluated_structure (core::io::silent::SilentStructOP evaluated_decoy, core::io::silent::SilentStructOP alternative_decoy, Batch const &) |
add an evaluated decoy to Archive (i.e, evaluated_decoy = evaluate( some_decoy ) ); More... | |
bool | evaluate_local () const |
specify if decoys are evaluated on the master or (non-local i.e., on the individual slave nodes) More... | |
void | set_evaluate_local (bool setting) |
virtual void | rescore () |
recompute all score-values of all decoys and re-order the archive by (new) select_score More... | |
void | add_evaluation (evaluation::PoseEvaluatorCOP, core::Real weight=0.0) |
add new PoseEvaluation to set of evaluators, specify weight for contribution to select_score() More... | |
void | remove_evaluation (std::string const &column) |
remove Evaluator More... | |
bool | has_evaluator (std::string const &column) |
is a certain elvaluator present ? More... | |
void | set_weight (std::string const &column, core::Real weight) |
set weight of an evaluator or a column otherwise present in silent-structs (i.e, score, chainbreak, external evaluation like score_final ) More... | |
core::Real | get_weight (std::string const &column) const |
void | set_scorefxn (core::scoring::ScoreFunctionOP scorefxn_) |
set scorefxn used for evaluation More... | |
core::scoring::ScoreFunction const & | scorefxn () const |
virtual WeightMap const & | score_variations () const |
virtual core::Real | score_variation (std::string const &col) const |
WeightMap const & | weights () const |
EvaluatorMap const & | evaluators () const |
void | set_weights (WeightMap const &setting) |
void | set_evaluators (EvaluatorMap const &, WeightMap const &) |
void | save_to_file (std::string suffix="") override |
overloaded to save / restore the variance_archive_ More... | |
![]() | |
ArchiveBase (ArchiveManagerAP ptr=nullptr) | |
~ArchiveBase () override | |
bool | finished () const override |
is archive converged ? More... | |
void | initialize () override |
void | generate_batch () override=0 |
create a new batch with manager().start_new_batch() and manager().finalize_batch(); More... | |
core::Size | nstruct () const |
how many structures should be in archive .. varies from decoys().size() in startup phase. More... | |
void | set_nstruct (core::Size set) |
set target size of pool More... | |
void | save_decoys (std::string const &dirname, std::string const &name, SilentStructs const &decoys) |
helper routine to save decoys properly More... | |
void | load_decoys (std::string const &filename, SilentStructs &decoys) |
void | save_status (std::ostream &) const override |
save and restore status of archive to file-system More... | |
virtual void | restore_status (std::istream &) |
void | idle () override |
called when nothing is happening More... | |
core::Size & | accepts_since_last_batch () |
core::Size | accepts_since_last_batch () const |
core::Size | proposed_since_last_batch () const |
core::Real | current_acceptance_ratio () const |
void | reset_accept_counter () |
core::Size | total_proposed () |
core::Size | total_accepts () |
bool | statistics_valid () |
SilentStructs const & | decoys () const |
SilentStructs & | decoys () |
![]() | |
~AbstractArchiveBase () override | |
Automatically generated virtual destructor for class deriving directly from VirtualBase. More... | |
AbstractArchiveBase (BaseArchiveManagerAP ptr) | |
AbstractArchiveBase () | |
virtual bool | still_interested (jd2::archive::Batch const &) const |
old-batches might be outdated and should not be computed anymore return true for this query if this is the case for old_batch More... | |
virtual core::Size | generate_batch (jd2::archive::Batch &, core::Size) |
create a batch for the current stage, return ct != 0 if more batches should be created at current stage. (e.g., harvest_batches) More... | |
void | set_name (std::string const &set) |
set name of archive ( used also for save_to_file and restore_from_file ) More... | |
std::string const & | name () const |
BaseArchiveManager & | manager () |
access to the ArchiveManager (control of batches) More... | |
virtual void | set_manager (BaseArchiveManagerAP manager) |
Static Public Member Functions | |
static void | register_options () |
Archive specific options. More... | |
![]() | |
static void | register_options () |
Protected Member Functions | |
core::scoring::ScoreFunctionOP | scorefxn_non_const () |
virtual void | score (core::pose::Pose &pose) const |
score a pose More... | |
virtual void | invalidate_score_variations () |
![]() | |
virtual void | count_structure (Batch const &batch, bool accepted) |
count the structure for the acceptance statistics only count if not from expired batch More... | |
void | count_removed_structures (core::Size n_removed) |
count the structure for the acceptance statistics only count if not from expired batch More... | |
void | set_max_nstruct (core::Size setting) |
core::Size | max_nstruct () |
virtual void | add_structure_at_position (SilentStructs::iterator iss, core::io::silent::SilentStructOP new_decoy, core::io::silent::SilentStructOP alternative_decoy) |
call to insert structure at position given by iterator More... | |
virtual void | erase_decoy (std::string const &tag) |
![]() | |
BaseArchiveManagerAP | manager_ptr () |
Private Types | |
typedef ArchiveBase | Parent |
Private Member Functions | |
virtual core::io::silent::SilentStructOP | evaluate_pose (core::io::silent::SilentStructOP result, core::pose::Pose &input_pose) const |
call score( pose ) and collect energies into result this is low-level function: it expects that result already contains the coordinates of the pose for convenience the pointer result is also return value More... | |
void | sort () |
re-sort decoys based on select_score More... | |
Private Attributes | |
core::scoring::ScoreFunctionOP | scorefxn_ |
scorefxn_ for evaluate( SilentStruct, Pose const& ) More... | |
WeightMap | select_weights_ |
Evaluators and weights for select_score and evaluate. More... | |
EvaluatorMap | evaluators_ |
WeightMap | dummy_score_variations_ |
bool | scores_are_clean_ |
keep track wether cached scores in archive_select_score are up-to-date More... | |
bool | b_evaluate_incoming_decoys_ |
local evaluation or is evaluation outsourced to slave nodes? More... | |
time_t | start_eval_time_ |
VarianceStatisticsArchiveOP | variance_archive_ |
Static Private Attributes | |
static bool | options_registered_ |
keep track whether our options have been registered at start up More... | |
Additional Inherited Members | |
![]() | |
typedef std::list< core::io::silent::SilentStructOP > | SilentStructs |
typedef SilentStructs::const_iterator | const_decoy_iterator |
typedef SilentStructs::const_iterator | decoy_iterator |
![]() | |
static std::string const | TAG_IN_FILE |
static std::string const | SOURCE_FILE |
Tags used to tag messeges sent by MPI functions used to decide whether a slave is requesting a new job id or flagging as job as being a bad input.
This job distributor is meant for running jobs where the machine you are using has a large number of processors, the number of jobs is much greater than the number of processors, or the runtimes of the individual jobs could vary greatly. It dedicates the head node (whichever processor gets processor rank #0) to handling job requests from the slave nodes (all nonzero ranks). Unlike the MPIWorkPartitionJobDistributor, this JD will not work at all without MPI and the implementations of all but the interface functions have been put inside of ifdef directives. Generally each function has a master and slave version, and the interface functions call one or the other depending on processor rank.
typedef std::map< std::string, evaluation::PoseEvaluatorCOP > protocols::jd2::archive::EvaluatedArchive::EvaluatorMap |
|
private |
typedef std::map< std::string, core::Real > protocols::jd2::archive::EvaluatedArchive::WeightMap |
typedefs for Evaluators and Weights
protocols::jd2::archive::EvaluatedArchive::EvaluatedArchive | ( | ArchiveManagerAP | ptr | ) |
Constructor and Destructor.
References options_registered_, and setup_default_evaluators().
protocols::jd2::archive::EvaluatedArchive::EvaluatedArchive | ( | ) |
References OBSOLETE, options_registered_, and setup_default_evaluators().
|
overridedefault |
|
virtual |
add an evaluated decoy to Archive (i.e, evaluated_decoy = evaluate( some_decoy ) );
Reimplemented in protocols::abinitio::HedgeArchive, protocols::jd2::archive::VarianceStatisticsArchive, and protocols::jd2::archive::NormalizedEvaluatedArchive.
References protocols::jd2::archive::ArchiveBase::add_structure_at_position(), protocols::jd2::archive::ArchiveBase::decoys(), core::sequence::end, protocols::jd2::archive::ArchiveBase::nstruct(), select_score(), start_eval_time_, and protocols::jd2::tr().
Referenced by protocols::jd2::archive::NormalizedEvaluatedArchive::add_evaluated_structure(), and add_structure().
void protocols::jd2::archive::EvaluatedArchive::add_evaluation | ( | evaluation::PoseEvaluatorCOP | eval, |
core::Real | weight = 0.0 |
||
) |
add new PoseEvaluation to set of evaluators, specify weight for contribution to select_score()
References core::energy_methods::eval(), evaluators_, protocols::jd2::archive::AbstractArchiveBase::name(), scores_are_clean_, set_weight(), and protocols::jd2::tr().
Referenced by protocols::abinitio::IterativeBase::add_core_evaluator(), protocols::abinitio::IterativeBase::init_from_decoy_set(), protocols::abinitio::IterativeBase::initialize(), protocols::abinitio::IterativeBase::reassign_noesy_data(), protocols::abinitio::IterativeBase::replace_noesy_filter_constraints(), protocols::abinitio::IterativeBase::rescore_nonlocal_archive(), protocols::abinitio::IterativeBase::restore_status(), set_evaluators(), protocols::abinitio::IterativeBase::setup_autoNOE(), protocols::abinitio::IterativeBase::setup_default_evaluators(), and protocols::abinitio::IterativeBase::setup_filter_cst().
|
overridevirtual |
add decoy to Archive @detail evaluate decoy and call add_evaluated_structure
Reimplemented from protocols::jd2::archive::ArchiveBase.
References add_evaluated_structure(), evaluate_silent_struct(), and protocols::jd2::tr().
|
inline |
specify if decoys are evaluated on the master or (non-local i.e., on the individual slave nodes)
References b_evaluate_incoming_decoys_.
Referenced by evaluate_silent_struct(), protocols::abinitio::IterativeBase::gen_evaluation_output(), protocols::abinitio::IterativeBase::idle(), protocols::abinitio::IterativeBase::init_from_decoy_set(), protocols::abinitio::IterativeBase::initialize(), protocols::abinitio::IterativeFullatom::initialize(), read_structures(), protocols::abinitio::IterativeBase::reassign_noesy_data(), protocols::abinitio::IterativeBase::rescore_nonlocal_archive(), protocols::abinitio::IterativeBase::restore_status(), select_score(), and protocols::abinitio::IterativeBase::setup_autoNOE().
|
privatevirtual |
call score( pose ) and collect energies into result this is low-level function: it expects that result already contains the coordinates of the pose for convenience the pointer result is also return value
@detail evaluate a pose ... store info in iss (and return the same for convenience )
References evaluators_, score(), and protocols::jd2::tr().
Referenced by evaluate_silent_struct().
core::io::silent::SilentStructOP protocols::jd2::archive::EvaluatedArchive::evaluate_silent_struct | ( | core::io::silent::SilentStructOP | iss | ) | const |
yields an "evaluated" silent-struct which can be queried with select_score @detail will run scoring-process if evaluate_local() otherwise just returns the intpu-silent-struct
evaluate decoy... if non-local evaluation just copy silent-struct
References core::scoring::Energies::clear(), core::pose::Pose::data(), core::pose::Pose::energies(), evaluate_local(), evaluate_pose(), start_eval_time_, start_evaluation_timer(), and protocols::jd2::tr().
Referenced by add_structure(), protocols::abinitio::IterativeBase::add_structure(), and rescore().
|
inline |
core::Real protocols::jd2::archive::EvaluatedArchive::get_weight | ( | std::string const & | column | ) | const |
bool protocols::jd2::archive::EvaluatedArchive::has_evaluator | ( | std::string const & | column | ) |
is a certain elvaluator present ?
References evaluators_.
|
overridepure virtual |
overloaded to make input decoys appear the same as decoys coming from batches
Reimplemented from protocols::jd2::archive::ArchiveBase.
Implemented in protocols::abinitio::IterativeBase, protocols::jd2::archive::VarianceStatisticsArchive, protocols::abinitio::IterativeAbrelax, and protocols::abinitio::HedgeArchive.
|
inlineprotectedvirtual |
Reimplemented in protocols::jd2::archive::NormalizedEvaluatedArchive.
Referenced by protocols::jd2::archive::VarianceStatisticsArchive::add_evaluated_structure(), and set_weight().
|
overridevirtual |
only overloaded this to add some verbosity each time we read structures
Reimplemented from protocols::jd2::archive::ArchiveBase.
References protocols::jd2::archive::Batch::batch(), evaluate_local(), protocols::jd2::archive::AbstractArchiveBase::name(), protocols::jd2::archive::ArchiveBase::read_structures(), score_variations(), scorefxn(), select_weights_, core::scoring::ScoreFunction::show_pretty(), and protocols::jd2::tr().
Referenced by protocols::abinitio::IterativeBase::read_structures().
|
static |
Archive specific options.
References protocols::evaluation::options_registered_, and protocols::moves::Mover::register_options().
void protocols::jd2::archive::EvaluatedArchive::remove_evaluation | ( | std::string const & | column | ) |
remove Evaluator
References evaluators_, protocols::jd2::archive::AbstractArchiveBase::name(), scores_are_clean_, select_weights_, and protocols::jd2::tr().
Referenced by protocols::abinitio::IterativeBase::init_from_decoy_set(), protocols::abinitio::IterativeFullatom::initialize(), and protocols::abinitio::IterativeBase::rescore_nonlocal_archive().
|
virtual |
recompute all score-values of all decoys and re-order the archive by (new) select_score
@detail rescore and sort archive
Reimplemented in protocols::jd2::archive::NormalizedEvaluatedArchive, protocols::abinitio::IterativeBase, and protocols::abinitio::HedgeArchive.
References protocols::jd2::archive::ArchiveBase::decoys(), evaluate_silent_struct(), protocols::jd2::archive::AbstractArchiveBase::name(), score_variations(), scores_are_clean_, select_weights_, sort(), and protocols::jd2::tr().
Referenced by protocols::jd2::archive::NormalizedEvaluatedArchive::rescore(), and select_score().
|
overridevirtual |
overloaded that we can sort the pool after reading
@detail restore archive and sort
Reimplemented from protocols::jd2::archive::ArchiveBase.
Reimplemented in protocols::jd2::archive::NormalizedEvaluatedArchive.
References protocols::jd2::archive::ArchiveBase::restore_from_file(), scores_are_clean_, and sort().
Referenced by protocols::jd2::archive::NormalizedEvaluatedArchive::restore_from_file().
|
overridevirtual |
overloaded to save / restore the variance_archive_
Reimplemented from protocols::jd2::archive::ArchiveBase.
Reimplemented in protocols::jd2::archive::NormalizedEvaluatedArchive.
References protocols::jd2::archive::ArchiveBase::save_to_file().
Referenced by protocols::jd2::archive::NormalizedEvaluatedArchive::save_to_file().
|
protectedvirtual |
score a pose
@detail before we can apply score-fxn we have to add extra data: RDC, NOES, (not supported yet: PCS, ... )
Reimplemented in protocols::abinitio::IterativeBase.
References scorefxn().
Referenced by evaluate_pose(), and protocols::abinitio::IterativeBase::score().
|
virtual |
Reimplemented in protocols::jd2::archive::NormalizedEvaluatedArchive.
|
virtual |
Reimplemented in protocols::jd2::archive::NormalizedEvaluatedArchive.
References dummy_score_variations_.
Referenced by read_structures(), rescore(), and select_score().
core::scoring::ScoreFunction const & protocols::jd2::archive::EvaluatedArchive::scorefxn | ( | ) | const |
References scorefxn_.
Referenced by protocols::abinitio::IterativeBase::do_dynamic_patching(), protocols::abinitio::IterativeBase::initialize(), protocols::abinitio::IterativeFullatom::initialize(), read_structures(), protocols::abinitio::IterativeBase::rescore(), protocols::jd2::archive::NormalizedEvaluatedArchive::rescore(), score(), and set_scorefxn().
|
protected |
References scorefxn_.
Referenced by protocols::abinitio::IterativeBase::init_from_decoy_set().
Real protocols::jd2::archive::EvaluatedArchive::select_score | ( | core::io::silent::SilentStructOP | evaluated_decoy | ) |
compute score according to select_weights — this can contain any evaluator columns
@detail compute the score of an evaluated decoy
References evaluate_local(), protocols::jd2::archive::AbstractArchiveBase::name(), rescore(), score_variations(), scores_are_clean_, select_weights_, SPECIAL_INITIAL_DECOY_PENALTY(), core::simple_metrics::metrics::sum, and protocols::jd2::tr().
Referenced by add_evaluated_structure(), protocols::abinitio::HedgeArchive::add_evaluated_structure(), protocols::abinitio::IterativeBase::add_structure(), protocols::abinitio::IterativeBase::collect_hedgeing_decoys_from_batches(), and protocols::abinitio::HedgeArchive::restore_status().
|
inline |
void protocols::jd2::archive::EvaluatedArchive::set_evaluators | ( | EvaluatorMap const & | evaluators, |
WeightMap const & | weights | ||
) |
References add_evaluation(), evaluators(), evaluators_, and weights().
void protocols::jd2::archive::EvaluatedArchive::set_scorefxn | ( | core::scoring::ScoreFunctionOP | scorefxn_ | ) |
set scorefxn used for evaluation
References scorefxn(), scorefxn_, and scores_are_clean_.
Referenced by protocols::abinitio::IterativeBase::initialize(), protocols::abinitio::IterativeFullatom::initialize(), and protocols::abinitio::IterativeBase::rescore_nonlocal_archive().
void protocols::jd2::archive::EvaluatedArchive::set_weight | ( | std::string const & | column, |
core::Real | weight | ||
) |
set weight of an evaluator or a column otherwise present in silent-structs (i.e, score, chainbreak, external evaluation like score_final )
References dummy_score_variations_, invalidate_score_variations(), protocols::jd2::archive::AbstractArchiveBase::name(), scores_are_clean_, select_weights_, and protocols::jd2::tr().
Referenced by add_evaluation(), protocols::abinitio::IterativeBase::init_from_decoy_set(), protocols::abinitio::IterativeBase::initialize(), protocols::abinitio::IterativeFullatom::initialize(), protocols::abinitio::IterativeBase::rescore_nonlocal_archive(), set_weights(), protocols::abinitio::IterativeBase::setup_autoNOE(), and setup_default_evaluators().
void protocols::jd2::archive::EvaluatedArchive::set_weights | ( | WeightMap const & | setting | ) |
References select_weights_, and set_weight().
void protocols::jd2::archive::EvaluatedArchive::setup_default_evaluators | ( | ) |
set common evaluators: eg. ConstraintEvaluator if -cst_file is present
References set_weight(), and SPECIAL_INITIAL_DECOY_PENALTY().
Referenced by EvaluatedArchive(), and protocols::abinitio::IterativeBase::setup_default_evaluators().
|
private |
re-sort decoys based on select_score
References protocols::jd2::archive::ArchiveBase::decoys().
Referenced by rescore(), and restore_from_file().
void protocols::jd2::archive::EvaluatedArchive::start_evaluation_timer | ( | ) | const |
References start_eval_time_, and protocols::jd2::tr().
Referenced by evaluate_silent_struct().
|
inline |
References select_weights_.
Referenced by protocols::abinitio::IterativeBase::collect_hedge_structures(), protocols::jd2::archive::NormalizedEvaluatedArchive::determine_score_variations(), protocols::abinitio::get_core(), protocols::abinitio::IterativeBase::rescore(), protocols::jd2::archive::NormalizedEvaluatedArchive::rescore(), and set_evaluators().
|
private |
local evaluation or is evaluation outsourced to slave nodes?
Referenced by evaluate_local(), and set_evaluate_local().
|
private |
Referenced by score_variations(), and set_weight().
|
private |
Referenced by add_evaluation(), evaluate_pose(), evaluators(), has_evaluator(), remove_evaluation(), and set_evaluators().
|
staticprivate |
keep track whether our options have been registered at start up
Referenced by EvaluatedArchive().
|
private |
scorefxn_ for evaluate( SilentStruct, Pose const& )
Referenced by scorefxn(), scorefxn_non_const(), and set_scorefxn().
|
mutableprivate |
keep track wether cached scores in archive_select_score are up-to-date
Referenced by add_evaluation(), remove_evaluation(), rescore(), restore_from_file(), select_score(), set_scorefxn(), and set_weight().
|
private |
Evaluators and weights for select_score and evaluate.
Referenced by get_weight(), read_structures(), remove_evaluation(), rescore(), select_score(), set_weight(), set_weights(), and weights().
|
mutableprivate |
Referenced by add_evaluated_structure(), evaluate_silent_struct(), and start_evaluation_timer().
|
private |