![]() |
Rosetta
2021.16
|
This Metric reports options that have been set in the command line and splits script_vars. Each option name is the type and the setting is the value in the map. This is primarily aimed at benchmarking and record-keeping for large-scale rosetta runs or experiments. It works with both the global and local OptionsCollection to enable its use in JD3. It is analogous to the ProtocolFeatures reporter, with more options for xml-based variables. More...
#include <ProtocolSettingsMetric.hh>

Public Member Functions | |
| ProtocolSettingsMetric (bool base_name_option_only=true, bool get_script_vars=true, bool get_user_options=true, bool skip_corrections=true) | |
| Constructors ///. More... | |
| ProtocolSettingsMetric (utility::options::OptionCollection const &options, bool base_name_option_only=true, bool get_script_vars=true, bool get_user_options=true, bool skip_corrections=true) | |
| Parse the Local Options Collection. More... | |
| ProtocolSettingsMetric (ProtocolSettingsMetric const &src) | |
| Copy constructor (not needed unless you need deep copies) More... | |
| ~ProtocolSettingsMetric () override | |
| Destructor (important for properly forward-declaring smart-pointer members) More... | |
| std::map< std::string, std::string > | calculate (core::pose::Pose const &pose) const override |
| Metric Methods ///. More... | |
| void | set_only_report_these_options (utility::vector1< std::string > const &select_opts) |
| Only return these options. If not getting full namespaces, these are ONLY the base names. More... | |
| std::string | name () const override |
| Name of the class. More... | |
| std::string | metric () const override |
| Name of the metric. More... | |
| utility::vector1< std::string > | get_metric_names () const override |
| Get the submetric names that this Metric will calculate. More... | |
| void | set_job_tag (std::string const &job_tag) |
| Set a specific job tag that will be output as job_tag for this particular run. Used for benchmarking. More... | |
| void | parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data) override |
| called by parse_my_tag – should not be used directly More... | |
| core::simple_metrics::SimpleMetricOP | clone () const override |
| void | parse_options (utility::options::OptionCollection const &options, bool base_name_option_only=true, bool get_script_vars=true, bool get_user_options=true, bool skip_corrections=true) |
| Parse an options collection into a set of string-string pairs. More... | |
| void | split_script_vars (std::string const &script_vars_option_string, std::map< std::string, std::string > &options_values) const |
| Split the script_vars string into individual options and place them into options_values map. More... | |
Public Member Functions inherited from core::simple_metrics::CompositeStringMetric | |
| CompositeStringMetric () | |
| ~CompositeStringMetric () override | |
| CompositeStringMetric (CompositeStringMetric const &other) | |
| void | apply (std::string const &out_label, pose::Pose &pose, bool override_existing_data=false) const override |
| Calculate the metric and add it to the pose within the SimpleMetricData cache. labeled as out_label. More... | |
| std::map< std::string, std::string > | cached_calculate (pose::Pose const &pose, bool use_cache, std::string prefix="", std::string suffix="", bool fail_on_missing_cache=true) const |
| Grab the data from the pose if it exists or calculate the metric. More... | |
Public Member Functions inherited from core::simple_metrics::SimpleMetric | |
| SimpleMetric (std::string const &simple_metric_type) | |
| ~SimpleMetric () override | |
| SimpleMetric (SimpleMetric const &other) | |
| SimpleMetric & | operator= (SimpleMetric const &) |
| void | apply (pose::Pose &pose, std::string const &prefix="", std::string const &suffix="", bool override_existing_data=false) const |
| Calculate the metric and add it to the Score, which is output into a scorefile - labeled as prefix+metric+suffix. More... | |
| void | set_custom_type (std::string const &custom_type) |
| std::string | get_custom_type () const |
| Additional setting to prefix/suffix. More... | |
| virtual void | parse_base_tag (utility::tag::TagCOP tag) |
| Parse the base class tag. Keep required interface for parse_my_tag. More... | |
| std::string | simple_metric_type () const |
| std::string | get_final_sm_type () const |
| Get the final name of this metric including its simple_metric_type_ name and any set custom type. More... | |
| virtual void | provide_citation_info (basic::citation_manager::CitationCollectionList &) const |
| Provide citations to the passed CitationCollectionList Subclasses should add the info for themselves and any other classes they use. More... | |
Static Public Member Functions | |
| static std::string | name_static () |
| Name of the class for creator. More... | |
| static void | provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd) |
Static Public Member Functions inherited from core::simple_metrics::SimpleMetric | |
| static utility::tag::XMLSchemaComplexTypeGeneratorOP | complex_type_generator_for_simple_metric (utility::tag::XMLSchemaDefinition &) |
Private Attributes | |
| std::map< std::string, std::string > | options_values_ |
| utility::vector1< std::string > | limit_reporting_to_these_options_ |
| std::string | job_tag_ = "" |
This Metric reports options that have been set in the command line and splits script_vars. Each option name is the type and the setting is the value in the map. This is primarily aimed at benchmarking and record-keeping for large-scale rosetta runs or experiments. It works with both the global and local OptionsCollection to enable its use in JD3. It is analogous to the ProtocolFeatures reporter, with more options for xml-based variables.
| core::simple_metrics::composite_metrics::ProtocolSettingsMetric::ProtocolSettingsMetric | ( | bool | base_name_option_only = true, |
| bool | get_script_vars = true, |
||
| bool | get_user_options = true, |
||
| bool | skip_corrections = true |
||
| ) |
Constructors ///.
Parse the Global Options Collections
Default constructor
References parse_options().
| core::simple_metrics::composite_metrics::ProtocolSettingsMetric::ProtocolSettingsMetric | ( | utility::options::OptionCollection const & | options, |
| bool | base_name_option_only = true, |
||
| bool | get_script_vars = true, |
||
| bool | get_user_options = true, |
||
| bool | skip_corrections = true |
||
| ) |
Parse the Local Options Collection.
References parse_options().
|
default |
Copy constructor (not needed unless you need deep copies)
Copy constructor.
|
override |
Destructor (important for properly forward-declaring smart-pointer members)
|
overridevirtual |
Metric Methods ///.
Defined in RealMetric:
Calculate the metric and add it to the pose as a score. labeled as prefix+metric+suffix.
Score is added through setExtraScorePose and is output into the score tables/file at pose output. Calculate the metric.
Implements core::simple_metrics::CompositeStringMetric.
References job_tag_, limit_reporting_to_these_options_, options_values_, and core::scoring::pair.
|
overridevirtual |
Implements core::simple_metrics::CompositeStringMetric.
|
overridevirtual |
Get the submetric names that this Metric will calculate.
Implements core::simple_metrics::CompositeStringMetric.
References limit_reporting_to_these_options_, options_values_, and core::scoring::pair.
|
overridevirtual |
Name of the metric.
Implements core::simple_metrics::CompositeStringMetric.
|
overridevirtual |
Name of the class.
Implements core::simple_metrics::CompositeStringMetric.
References name_static().
|
static |
Name of the class for creator.
Referenced by core::simple_metrics::composite_metrics::ProtocolSettingsMetricCreator::keyname(), name(), and provide_xml_schema().
|
overridevirtual |
called by parse_my_tag – should not be used directly
Implements core::simple_metrics::CompositeStringMetric.
References job_tag_, core::simple_metrics::SimpleMetric::parse_base_tag(), parse_options(), set_job_tag(), and set_only_report_these_options().
| void core::simple_metrics::composite_metrics::ProtocolSettingsMetric::parse_options | ( | utility::options::OptionCollection const & | options, |
| bool | base_name_option_only = true, |
||
| bool | get_script_vars = true, |
||
| bool | get_user_options = true, |
||
| bool | skip_corrections = true |
||
| ) |
Parse an options collection into a set of string-string pairs.
References protocols::sparta::contains(), core::sequence::end, options_values_, split_script_vars(), and TR().
Referenced by parse_my_tag(), and ProtocolSettingsMetric().
|
static |
| void core::simple_metrics::composite_metrics::ProtocolSettingsMetric::set_job_tag | ( | std::string const & | job_tag | ) |
Set a specific job tag that will be output as job_tag for this particular run. Used for benchmarking.
References job_tag_.
Referenced by parse_my_tag().
| void core::simple_metrics::composite_metrics::ProtocolSettingsMetric::set_only_report_these_options | ( | utility::vector1< std::string > const & | select_opts | ) |
Only return these options. If not getting full namespaces, these are ONLY the base names.
References limit_reporting_to_these_options_.
Referenced by parse_my_tag().
| void core::simple_metrics::composite_metrics::ProtocolSettingsMetric::split_script_vars | ( | std::string const & | script_vars_option_string, |
| std::map< std::string, std::string > & | options_values | ||
| ) | const |
Split the script_vars string into individual options and place them into options_values map.
Referenced by parse_options().
|
private |
Referenced by calculate(), parse_my_tag(), and set_job_tag().
|
private |
Referenced by calculate(), get_metric_names(), and set_only_report_these_options().
|
private |
Referenced by calculate(), get_metric_names(), and parse_options().
1.8.7