Rosetta 3.4
|
holds particular score components, weights and calculates the total score for a fragment candidate More...
#include <FragmentScoreManager.hh>
Public Member Functions | |
FragmentScoreManager () | |
creates an empty manager | |
FragmentScoreMapOP | create_empty_map () |
creates an empty score map | |
void | add_scoring_method (FragmentScoringMethodOP, Real) |
registers a new scoring method in this manager | |
Size | count_components () |
says how many scoring methods have already been registered | |
FragmentScoringMethodOP | get_component (Size index) |
Returns a desired scoring method. | |
utility::vector1< Real > | get_weights () |
returns a vector of weights that are used to compute the total score | |
void | show_scoring_methods (std::ostream &out) |
prints a nice table showing the registered scores | |
Real | total_score (FragmentScoreMapOP) |
calculates the total score | |
virtual bool | score_fragment_from_cache (FragmentCandidateOP, FragmentScoreMapOP) |
calculates all the small scores for a given fragment | |
virtual bool | score_fragment (FragmentCandidateOP, FragmentScoreMapOP) |
calculates all the small scores for a given fragment | |
void | use_late_scoring_for_zeros (const bool if_true) |
those score metohods that have weight = 0.0 will be computed after the fragments are picked | |
bool | if_late_scoring_for_zeros () |
says if late scoring is used or not | |
bool | score_zero_scores (FragmentCandidateOP, FragmentScoreMapOP) |
calculates all these small scores for a given fragment whose weight is 0.0 | |
void | register_score_maker (MakeFragmentScoringMethodOP) |
registers a maker object that will be used to create a scoring method object | |
void | create_scoring_method (std::string const &, Size, Real, Real, bool, FragmentPickerOP, std::string) |
creates a new scoring method object | |
void | create_scores (std::string const &, FragmentPickerOP) |
reads a config file and creates scoring methods | |
void | do_caching (VallChunkOP chunk) |
calls do_caching() for each FragmentScoringMethod object, if it is possible | |
void | clean_up () |
calls clean_up() for each FragmentScoringMethod object, if it is possible | |
void | set_width (FragmentScoringMethodOP which_score, Size width) |
sets up a new number of characters spend to print fragment score value | |
void | set_precision (FragmentScoringMethodOP which_score, Size precision) |
sets up a new precision used to print fragment score value | |
virtual void | describe_fragments (utility::vector1< std::pair< FragmentCandidateOP, scores::FragmentScoreMapOP > > const &, std::ostream &) |
prints a flat table with all scores for all the fragments in a given vector | |
Public Attributes | |
Size | default_width_ |
default width used to print a score value, equal to 6 | |
Size | default_precision_ |
default precision used to print a score value, equal to 1 | |
Static Public Attributes | |
static const Size | TOTAL_PRECISION = 3 |
precision used to display the total score for each fragment | |
Protected Attributes | |
utility::vector1 < FragmentScoringMethodOP > | scores_ |
std::map < FragmentScoringMethodOP, Size > | width_ |
std::map < FragmentScoringMethodOP, Size > | precision_ |
holds particular score components, weights and calculates the total score for a fragment candidate
protocols::frag_picker::scores::FragmentScoreManager::FragmentScoreManager | ( | ) |
creates an empty manager
References default_precision_, default_width_, and register_score_maker().
void protocols::frag_picker::scores::FragmentScoreManager::add_scoring_method | ( | FragmentScoringMethodOP | scoring_term, |
Real | weight | ||
) |
registers a new scoring method in this manager
References default_precision_, default_width_, precision_, scores_, protocols::frag_picker::scores::sort_scores(), and width_.
Referenced by create_scoring_method().
void protocols::frag_picker::scores::FragmentScoreManager::clean_up | ( | ) |
calls clean_up() for each FragmentScoringMethod object, if it is possible
References protocols::frag_picker::scores::CachingScoringMethod::clean_up(), and scores_.
Size protocols::frag_picker::scores::FragmentScoreManager::count_components | ( | ) | [inline] |
says how many scoring methods have already been registered
References scores_.
FragmentScoreMapOP protocols::frag_picker::scores::FragmentScoreManager::create_empty_map | ( | ) |
creates an empty score map
void protocols::frag_picker::scores::FragmentScoreManager::create_scores | ( | std::string const & | file_name, |
FragmentPickerOP | picker | ||
) |
reads a config file and creates scoring methods
References create_scoring_method().
void protocols::frag_picker::scores::FragmentScoreManager::create_scoring_method | ( | std::string const & | score_name, |
Size | priority, | ||
Real | weight, | ||
Real | lowest, | ||
bool | use_lowest, | ||
FragmentPickerOP | picker, | ||
std::string | config_line | ||
) |
virtual void protocols::frag_picker::scores::FragmentScoreManager::describe_fragments | ( | utility::vector1< std::pair< FragmentCandidateOP, scores::FragmentScoreMapOP > > const & | , |
std::ostream & | |||
) | [virtual] |
prints a flat table with all scores for all the fragments in a given vector
Reimplemented in protocols::frag_picker::scores::PValuedFragmentScoreManager.
void protocols::frag_picker::scores::FragmentScoreManager::do_caching | ( | VallChunkOP | chunk | ) |
calls do_caching() for each FragmentScoringMethod object, if it is possible
References protocols::frag_picker::scores::CachingScoringMethod::do_caching(), and scores_.
FragmentScoringMethodOP protocols::frag_picker::scores::FragmentScoreManager::get_component | ( | Size | index | ) | [inline] |
Returns a desired scoring method.
References scores_.
utility::vector1<Real> protocols::frag_picker::scores::FragmentScoreManager::get_weights | ( | ) | [inline] |
returns a vector of weights that are used to compute the total score
bool protocols::frag_picker::scores::FragmentScoreManager::if_late_scoring_for_zeros | ( | ) | [inline] |
says if late scoring is used or not
late scoring means that some scores (those with weight=0, such as crmsd) are evaluated only for the selected fragments rather than for all the candidates
void protocols::frag_picker::scores::FragmentScoreManager::register_score_maker | ( | MakeFragmentScoringMethodOP | scoring_term_maker | ) |
registers a maker object that will be used to create a scoring method object
Referenced by FragmentScoreManager().
bool protocols::frag_picker::scores::FragmentScoreManager::score_fragment | ( | FragmentCandidateOP | candidate, |
FragmentScoreMapOP | empty_map | ||
) | [virtual] |
calculates all the small scores for a given fragment
results are properly stored inside a FragmentScoreMap object
Reimplemented in protocols::frag_picker::scores::PValuedFragmentScoreManager.
References scores_.
bool protocols::frag_picker::scores::FragmentScoreManager::score_fragment_from_cache | ( | FragmentCandidateOP | candidate, |
FragmentScoreMapOP | empty_map | ||
) | [virtual] |
calculates all the small scores for a given fragment
results are properly stored inside a FragmentScoreMap object
Reimplemented in protocols::frag_picker::scores::PValuedFragmentScoreManager.
References protocols::frag_picker::scores::CachingScoringMethod::cached_score(), and scores_.
bool protocols::frag_picker::scores::FragmentScoreManager::score_zero_scores | ( | FragmentCandidateOP | candidate, |
FragmentScoreMapOP | empty_map | ||
) |
calculates all these small scores for a given fragment whose weight is 0.0
References scores_.
void protocols::frag_picker::scores::FragmentScoreManager::set_precision | ( | FragmentScoringMethodOP | which_score, |
Size | precision | ||
) | [inline] |
sets up a new precision used to print fragment score value
References core::io::raw_data::precision(), and precision_.
void protocols::frag_picker::scores::FragmentScoreManager::set_width | ( | FragmentScoringMethodOP | which_score, |
Size | width | ||
) | [inline] |
sets up a new number of characters spend to print fragment score value
References width_.
void protocols::frag_picker::scores::FragmentScoreManager::show_scoring_methods | ( | std::ostream & | out | ) |
prints a nice table showing the registered scores
References scores_.
Real protocols::frag_picker::scores::FragmentScoreManager::total_score | ( | FragmentScoreMapOP | f | ) |
calculates the total score
Referenced by protocols::frag_picker::scores::PValuedFragmentScoreManager::describe_fragments().
void protocols::frag_picker::scores::FragmentScoreManager::use_late_scoring_for_zeros | ( | const bool | if_true | ) | [inline] |
those score metohods that have weight = 0.0 will be computed after the fragments are picked
default precision used to print a score value, equal to 1
Referenced by add_scoring_method(), and FragmentScoreManager().
default width used to print a score value, equal to 6
Referenced by add_scoring_method(), and FragmentScoreManager().
std::map<FragmentScoringMethodOP, Size> protocols::frag_picker::scores::FragmentScoreManager::precision_ [protected] |
utility::vector1<FragmentScoringMethodOP> protocols::frag_picker::scores::FragmentScoreManager::scores_ [protected] |
Referenced by add_scoring_method(), clean_up(), count_components(), protocols::frag_picker::scores::PValuedFragmentScoreManager::describe_fragments(), do_caching(), get_component(), protocols::frag_picker::scores::PValuedFragmentScoreManager::score_fragment(), score_fragment(), protocols::frag_picker::scores::PValuedFragmentScoreManager::score_fragment_from_cache(), score_fragment_from_cache(), score_zero_scores(), and show_scoring_methods().
const Size protocols::frag_picker::scores::FragmentScoreManager::TOTAL_PRECISION = 3 [static] |
precision used to display the total score for each fragment
Referenced by protocols::frag_picker::scores::PValuedFragmentScoreManager::describe_fragments().
std::map<FragmentScoringMethodOP, Size> protocols::frag_picker::scores::FragmentScoreManager::width_ [protected] |