![]() |
Rosetta
2021.16
|
RealValuedParameter class, used to store a single real-valued parameter for parametric backbone generation. More...
#include <RealValuedParameter.hh>

Public Member Functions | |
| RealValuedParameter () | |
| constructors More... | |
| RealValuedParameter (RealValuedParameter const &src) | |
| ~RealValuedParameter () override | |
| ParameterOP | clone () const override |
| Make a copy of this object ( allocate actual memory for it ) More... | |
| core::Real const & | value () const |
| Get the value of this parameter. More... | |
| core::Real const & | default_value () const |
| Get the default value of this parameter. More... | |
| core::Real const & | value_min () const |
| Get the minimum value of this parameter. More... | |
| core::Real const & | value_max () const |
| Get the maximum value of this parameter. More... | |
| core::Size | value_samples () const |
| Get the samples. More... | |
| RealPerturbationType | perturbation_type () const |
| Get the perturbation type. More... | |
| core::Real const & | perturbation_magnitude () const |
| Get the perturbation magnitude of this parameter. More... | |
| void | set_input_is_angle_in_degrees (bool const setting) |
| Set whether this parameter expects that its input is an angle in degrees. More... | |
| void | set_value (core::Real const &value_in, bool const ignore_use_degrees=false) |
| Set the value of this parameter. More... | |
| void | set_default_value (core::Real const &value_in) |
| Sets the initial value of this parameter, keeping the value_set_ boolean false. More... | |
| void | set_parameter_type (ParameterType const type_in) override |
| Sets the parameter type. More... | |
| void | set_sampling_options (core::Real const &value_min_in, core::Real const &value_max_in, core::Size const samples_in) |
| Set the options for sampling this parameter. More... | |
| void | set_perturbation_type (std::string const &pert_type_in) |
| Set the perturbation type, by string. More... | |
| void | set_perturbation_type (RealPerturbationType const pert_type_in) |
| Set the perturbation type, by enum. More... | |
| void | set_perturbation_options (core::Real const &pert_magnitude_in, std::string const &pert_type_in) |
| Set the options for perturbing this parameter (with perturbation type set by string). More... | |
| void | set_perturbation_options (core::Real const &pert_magnitude_in, RealPerturbationType const pert_type_in) |
| Set the options for perturbing this parameter (with perturbation type set by enum). More... | |
| bool | copy_value_from_parameter (ParameterCOP other_parameter, ParametersCOP other_parameter_collection, ParametersCOP this_parameter_collection) override |
| Given another parameter of the same type, copy its value. This does not set value_set_ to true. More... | |
| void | parse_setting (utility::tag::TagCOP tag, bool const parse_setting, bool const parse_grid_sampling, bool const parse_perturbation, bool const parse_copying) override |
| Given a tag, parse out the setting for this parameter. More... | |
| void | provide_xsd_information (utility::tag::AttributeList &xsd, bool const provide_setting, bool const provide_copying, bool const provide_grid_sampling, bool const provide_perturbation) const override |
| Return the XSD information for this parameter. More... | |
| void | reset_sampling_and_perturbation_settings () override |
| Reset the sampling and perturbation options before storing this Parameter object in a parametric Conformation. More... | |
| void | reset_value_settings () override |
| Reset the value settings for this Parameter object. More... | |
| bool | perturbation_set () const |
| Has the perturbation information for this parameter been set? More... | |
| bool | sampling_set () const |
| Has the sampling information for this parameter been set? More... | |
| core::Real | generate_perturbed_value (core::Real const ¤t_value) const |
| Given the current value of this parameter and the current perturbation settings, return a perturbed value. More... | |
Public Member Functions inherited from core::conformation::parametric::Parameter | |
| Parameter () | |
| constructors More... | |
| ParameterCOP | get_self_ptr () const |
| Self pointers (const shared pointer). More... | |
| ParameterOP | get_self_ptr () |
| Self pointers (nonconst shared pointer). More... | |
| ParameterCAP | get_self_weak_ptr () const |
| Self pointers (const weak pointer). More... | |
| ParameterAP | get_self_weak_ptr () |
| Self pointers (nonconst weak pointer). More... | |
| std::string const & | parameter_name () const |
| Get parameter name. More... | |
| std::string const & | parameter_description () const |
| Get parameter description. More... | |
| std::string const & | short_parameter_description () const |
| Get short parameter description. More... | |
| std::string const & | parameter_units () const |
| Get units. More... | |
| ParameterType | parameter_type () const |
| Get the parameter type. More... | |
| bool | can_be_set () const |
| Is this parameter one that can be set directly by the user? More... | |
| bool | can_be_copied () const |
| Is this parameter one that can be copied from another parameter? More... | |
| bool | can_be_sampled () const |
| Is this parameter one that can be sampled? More... | |
| bool | can_be_perturbed () const |
| Is this parameter one that can be perturbed? More... | |
| bool | global_for_parameters_set () const |
| Get whether this property is meant to be global for a parameters set. More... | |
| std::string const & | copy_suffix () const |
| Get the suffix for the copy tag (e.g. "copies_helix" in the case of helical bundles). More... | |
| core::Size | copy_from_parameters_index () const |
| Get the index of the Parameters object from which we will copy this parameter's value. More... | |
| bool | value_was_set () const |
| Has the value been set? More... | |
| bool | copying_information_was_set () const |
| Has the copying information been set? More... | |
| void | set_parameter_name (std::string const &name_in) |
| Set parameter name. More... | |
| void | set_parameter_description (std::string const &description_in) |
| Set parameter description. More... | |
| void | set_short_parameter_description (std::string const &short_description_in) |
| Set short parameter description. More... | |
| void | set_parameter_units (std::string const &units_in) |
| Set parameter units. More... | |
| void | set_can_be_set_sampled_perturbed_copied (bool const can_be_set, bool const can_be_copied, bool const can_be_sampled, bool const can_be_perturbed) |
| Set whether this parameter is one that can be set directly by the user, whether it can be sampled, and whether it can be perturbed. More... | |
| void | set_global_for_parameters_set (bool const setting) |
| Set whether this property is meant to be global for a parameters set. More... | |
| void | set_copy_suffix (std::string const &suffix_in) |
| Set the suffix for the copy tag (e.g. "copies_helix" in the case of helical bundles). More... | |
| void | set_copy_from_parameters_index (core::Size const setting) |
| Set the index of the Parameters object from which we will copy this parameter's value. More... | |
| virtual void | reset_copying_settings () |
| Reset the copying options. More... | |
Static Public Member Functions | |
| static std::string const & | perturbation_type_string_from_enum (RealPerturbationType const type_enum) |
| Given a perturbation type enum, get the string for that enum. More... | |
| static RealPerturbationType | perturbation_type_enum_from_string (std::string const &type_string) |
| Given a perturbation type string, get the enum for that string. More... | |
Protected Member Functions | |
| void | set_value_sneakily (core::Real const &value_in) |
| Set the value without setting value_was_set_ = true. More... | |
| void | set_copy_information (utility::tag::TagCOP tag) |
| Parse copy information from the tag, and set it. More... | |
| virtual bool | parse_setting_only (utility::tag::TagCOP tag, bool const parse_copying_too) |
| Parse a setting for this parameter (e.g. r0="12.5"). More... | |
Protected Member Functions inherited from core::conformation::parametric::Parameter | |
| void | set_value_was_set () |
| Allows derived classes to indicate that the value has been set. More... | |
| void | reset_value_was_set () |
| Allows derived classes to indicate that the value has not been set. More... | |
Private Member Functions | |
| core::Real | convert_angle (core::Real const &val) const |
| Ensure that an angle value is in radians. More... | |
| void | provide_xsd_grid_sampling_information (utility::tag::AttributeList &xsd) const |
| Return the XSD information for grid-sampling this parameter. More... | |
| void | provide_xsd_perturbation_information (utility::tag::AttributeList &xsd) const |
| Return the XSD information for perturbing this parameter. More... | |
| void | provide_xsd_setting_information (utility::tag::AttributeList &xsd) const |
| Return the XSD information for setting this parameter. More... | |
| void | provide_xsd_copying_information (utility::tag::AttributeList &xsd) const |
| Return the XSD information for copying this parameter from another. More... | |
| void | correct_range () |
| If this is a parameter storing an angle, correct the value to be (-Pi:Pi]. Also, check that the value is positive if it is meant to be, or nonnegative if it is meant to be. More... | |
| bool | parse_grid_sampling_options (utility::tag::TagCOP tag) |
| Parse a sampling range for this parameter (e.g. r0_min="12.3" r0_max="14.3" r0_samples="5"). More... | |
| bool | parse_perturbation_options (utility::tag::TagCOP tag) |
| Parse perturbation options for this parameter (e.g. r0_perturbation="5.0" r0_perturbation_type="gaussian"). More... | |
Private Attributes | |
| core::Real | value_ |
| The value of this parameter. More... | |
| core::Real | default_value_ |
| The default value of this parameter. More... | |
| bool | default_value_was_set_ |
| Has the default value been set? More... | |
| core::Real | value_min_ |
| The min value to be sampled for this parameter. More... | |
| core::Real | value_max_ |
| The max value to be sampled for this parameter. More... | |
| core::Size | value_samples_ |
| The number of samples for this parameter. More... | |
| core::Real | perturbation_magnitude_ |
| The magnitude of the perturbation of this parameter. More... | |
| RealPerturbationType | perturbation_type_ |
| The perturbation type for this parameter. More... | |
| bool | sampling_set_ |
| Was the sampling range set? More... | |
| bool | perturbation_set_ |
| Were perturbation options set? More... | |
| bool | input_is_angle_in_degrees_ |
| Does this parameter expect that its input will be an angle in degrees? More... | |
RealValuedParameter class, used to store a single real-valued parameter for parametric backbone generation.
| core::conformation::parametric::RealValuedParameter::RealValuedParameter | ( | ) |
| core::conformation::parametric::RealValuedParameter::RealValuedParameter | ( | RealValuedParameter const & | src | ) |
|
override |
|
overridevirtual |
Make a copy of this object ( allocate actual memory for it )
Implements core::conformation::parametric::Parameter.
Reimplemented in protocols::helical_bundle::parameters::OmegaBundleParameter.
|
inlineprivate |
Ensure that an angle value is in radians.
Checks the use_degrees_ boolean. If true, converts degrees to radians; if false, returns input value.
References input_is_angle_in_degrees_, and protocols::hybridization::val.
Referenced by set_default_value(), set_perturbation_options(), set_sampling_options(), and set_value().
|
overridevirtual |
Given another parameter of the same type, copy its value. This does not set value_set_ to true.
Performs type checking in debug mode.
Implements core::conformation::parametric::Parameter.
Reimplemented in protocols::helical_bundle::parameters::OmegaBundleParameter.
References value_.
Referenced by protocols::helical_bundle::parameters::OmegaBundleParameter::copy_value_from_parameter().
|
private |
If this is a parameter storing an angle, correct the value to be (-Pi:Pi]. Also, check that the value is positive if it is meant to be, or nonnegative if it is meant to be.
Also checks sampling and perturbing options to ensure that these are reasonable.
References core::conformation::parametric::Parameter::parameter_type(), perturbation_magnitude_, perturbation_type_, core::conformation::parametric::PT_angle, core::conformation::parametric::PT_generic_nonnegative_valued_real, core::conformation::parametric::PT_generic_positive_valued_real, core::conformation::parametric::RPT_end_of_list, core::id::swap(), value_, value_max_, and value_min_.
Referenced by set_default_value(), set_parameter_type(), set_perturbation_options(), set_sampling_options(), and set_value().
|
inline |
Get the default value of this parameter.
References default_value_.
Referenced by provide_xsd_setting_information(), and reset_value_settings().
| core::Real core::conformation::parametric::RealValuedParameter::generate_perturbed_value | ( | core::Real const & | current_value | ) | const |
Given the current value of this parameter and the current perturbation settings, return a perturbed value.
References core::conformation::parametric::Parameter::parameter_type(), perturbation_magnitude_, perturbation_type_, core::conformation::parametric::PT_angle, core::conformation::parametric::PT_generic_nonnegative_valued_real, core::conformation::parametric::PT_generic_positive_valued_real, core::conformation::parametric::RPT_gaussian, and core::conformation::parametric::RPT_uniform.
|
private |
Parse a sampling range for this parameter (e.g. r0_min="12.3" r0_max="14.3" r0_samples="5").
Returns false if none of these parameters is provided.
References core::conformation::parametric::Parameter::parameter_name(), and set_sampling_options().
Referenced by parse_setting().
|
private |
Parse perturbation options for this parameter (e.g. r0_perturbation="5.0" r0_perturbation_type="gaussian").
Returns false if the _perturbation option is not provided.
References core::conformation::parametric::Parameter::parameter_name(), perturbation_type_, perturbation_type_string_from_enum(), and set_perturbation_options().
Referenced by parse_setting().
|
overridevirtual |
Given a tag, parse out the setting for this parameter.
If parse_setting is true, this tries to parse the value for this parameter. If parse_grid_sampling is true, this tries to parse a range of values to sample, and a number of samples. If parse_perturbation is true, this parses options for perturbing the value of the parameter. Note that, if multiple options are true, grid sampling or perturbation options are given priority over a flat setting (and an error is thrown if more than one of these is provided).
Implements core::conformation::parametric::Parameter.
References parse_grid_sampling_options(), parse_perturbation_options(), and parse_setting_only().
|
protectedvirtual |
Parse a setting for this parameter (e.g. r0="12.5").
Returns false if this parameter isn't provided. Also parses copying.
Reimplemented in protocols::helical_bundle::parameters::OmegaBundleParameter.
References core::conformation::parametric::Parameter::copy_suffix(), core::conformation::parametric::Parameter::parameter_name(), core::conformation::parametric::Parameter::reset_copying_settings(), reset_sampling_and_perturbation_settings(), reset_value_settings(), set_copy_information(), and set_value().
Referenced by parse_setting().
|
inline |
Get the perturbation magnitude of this parameter.
References perturbation_magnitude_.
|
inline |
Has the perturbation information for this parameter been set?
References perturbation_set_.
|
inline |
Get the perturbation type.
References perturbation_type_.
|
static |
Given a perturbation type string, get the enum for that string.
Returns RPT_unknown_type if unknown string provided.
References perturbation_type_string_from_enum(), core::conformation::parametric::RPT_end_of_list, and core::conformation::parametric::RPT_unknown_type.
Referenced by set_perturbation_options(), set_perturbation_type(), and protocols::helical_bundle::BundleParametrizationCalculator::set_perturbation_type_globally().
|
static |
Given a perturbation type enum, get the string for that enum.
Throws an error for an invalid enum.
References core::conformation::parametric::RPT_end_of_list.
Referenced by parse_perturbation_options(), and perturbation_type_enum_from_string().
|
private |
Return the XSD information for copying this parameter from another.
References core::conformation::parametric::Parameter::copy_suffix(), and core::conformation::parametric::Parameter::parameter_name().
Referenced by provide_xsd_information().
|
private |
Return the XSD information for grid-sampling this parameter.
References core::conformation::parametric::Parameter::parameter_name().
Referenced by provide_xsd_information().
|
overridevirtual |
Return the XSD information for this parameter.
Implements core::conformation::parametric::Parameter.
Reimplemented in protocols::helical_bundle::parameters::OmegaBundleParameter.
References provide_xsd_copying_information(), provide_xsd_grid_sampling_information(), provide_xsd_perturbation_information(), and provide_xsd_setting_information().
Referenced by protocols::helical_bundle::parameters::OmegaBundleParameter::provide_xsd_information().
|
private |
Return the XSD information for perturbing this parameter.
References core::conformation::parametric::Parameter::parameter_name().
Referenced by provide_xsd_information().
|
private |
Return the XSD information for setting this parameter.
References default_value(), core::conformation::parametric::Parameter::parameter_description(), core::conformation::parametric::Parameter::parameter_name(), and core::id::to_string().
Referenced by provide_xsd_information().
|
overridevirtual |
Reset the sampling and perturbation options before storing this Parameter object in a parametric Conformation.
Pure virtual. Must be implemented by derived classes.
Implements core::conformation::parametric::Parameter.
References perturbation_magnitude_, perturbation_set_, perturbation_type_, core::conformation::parametric::RPT_gaussian, sampling_set_, value_max_, value_min_, and value_samples_.
Referenced by parse_setting_only(), set_perturbation_options(), protocols::helical_bundle::parameters::OmegaBundleParameter::set_pitch_copying_information(), and set_sampling_options().
|
overridevirtual |
Reset the value settings for this Parameter object.
Implements core::conformation::parametric::Parameter.
References default_value(), core::conformation::parametric::Parameter::reset_value_was_set(), and set_value().
Referenced by parse_setting_only(), set_perturbation_options(), protocols::helical_bundle::parameters::OmegaBundleParameter::set_pitch_copying_information(), and set_sampling_options().
|
inline |
Has the sampling information for this parameter been set?
References sampling_set_.
|
protected |
Parse copy information from the tag, and set it.
References core::conformation::parametric::Parameter::copy_suffix(), core::conformation::parametric::Parameter::parameter_name(), and core::conformation::parametric::Parameter::set_copy_from_parameters_index().
Referenced by protocols::helical_bundle::parameters::OmegaBundleParameter::parse_setting_only(), and parse_setting_only().
| void core::conformation::parametric::RealValuedParameter::set_default_value | ( | core::Real const & | value_in | ) |
Sets the initial value of this parameter, keeping the value_set_ boolean false.
Also sets default_value_.
References convert_angle(), correct_range(), default_value_, default_value_was_set_, value_, and core::conformation::parametric::Parameter::value_was_set().
| void core::conformation::parametric::RealValuedParameter::set_input_is_angle_in_degrees | ( | bool const | setting | ) |
Set whether this parameter expects that its input is an angle in degrees.
Must be set before any values are set.
References default_value_was_set_, input_is_angle_in_degrees_, perturbation_set_, sampling_set_, and core::conformation::parametric::Parameter::value_was_set().
|
overridevirtual |
Sets the parameter type.
Override is limited to real types.
Reimplemented from core::conformation::parametric::Parameter.
References correct_range(), core::conformation::parametric::PT_angle, core::conformation::parametric::PT_generic_nonnegative_valued_real, core::conformation::parametric::PT_generic_positive_valued_real, core::conformation::parametric::PT_generic_real, and core::conformation::parametric::Parameter::set_parameter_type().
| void core::conformation::parametric::RealValuedParameter::set_perturbation_options | ( | core::Real const & | pert_magnitude_in, |
| std::string const & | pert_type_in | ||
| ) |
Set the options for perturbing this parameter (with perturbation type set by string).
References perturbation_type_enum_from_string().
Referenced by parse_perturbation_options().
| void core::conformation::parametric::RealValuedParameter::set_perturbation_options | ( | core::Real const & | pert_magnitude_in, |
| RealPerturbationType const | pert_type_in | ||
| ) |
Set the options for perturbing this parameter (with perturbation type set by enum).
References convert_angle(), correct_range(), perturbation_magnitude_, perturbation_set_, perturbation_type_, core::conformation::parametric::Parameter::reset_copying_settings(), reset_sampling_and_perturbation_settings(), reset_value_settings(), and core::conformation::parametric::RPT_unknown_type.
| void core::conformation::parametric::RealValuedParameter::set_perturbation_type | ( | std::string const & | pert_type_in | ) |
Set the perturbation type, by string.
Throws an error if not a valid type.
References perturbation_type_enum_from_string().
| void core::conformation::parametric::RealValuedParameter::set_perturbation_type | ( | RealPerturbationType const | pert_type_in | ) |
Set the perturbation type, by enum.
Throws an error if invalid enum.
References perturbation_type_, and core::conformation::parametric::RPT_unknown_type.
| void core::conformation::parametric::RealValuedParameter::set_sampling_options | ( | core::Real const & | value_min_in, |
| core::Real const & | value_max_in, | ||
| core::Size const | samples_in | ||
| ) |
Set the options for sampling this parameter.
References convert_angle(), correct_range(), core::conformation::parametric::Parameter::reset_copying_settings(), reset_sampling_and_perturbation_settings(), reset_value_settings(), sampling_set_, value_max_, value_min_, and value_samples_.
Referenced by parse_grid_sampling_options().
| void core::conformation::parametric::RealValuedParameter::set_value | ( | core::Real const & | value_in, |
| bool const | ignore_use_degrees = false |
||
| ) |
Set the value of this parameter.
If ignore_use_degrees is true, this will just set the value to the input value. Otherwise, it convert from degrees to radians if input_is_angle_in_degrees_ is true.
References convert_angle(), correct_range(), core::conformation::parametric::Parameter::set_value_was_set(), and value_.
Referenced by protocols::helical_bundle::parameters::OmegaBundleParameter::parse_setting_only(), parse_setting_only(), and reset_value_settings().
|
protected |
Set the value without setting value_was_set_ = true.
References value_.
Referenced by protocols::helical_bundle::parameters::OmegaBundleParameter::copy_pitch_from_parameter().
|
inline |
Get the value of this parameter.
References value_.
Referenced by protocols::helical_bundle::parameters::OmegaBundleParameter::copy_pitch_from_parameter().
|
inline |
Get the maximum value of this parameter.
References value_max_.
|
inline |
Get the minimum value of this parameter.
References value_min_.
|
inline |
Get the samples.
References value_samples_.
|
private |
The default value of this parameter.
Referenced by default_value(), and set_default_value().
|
private |
Has the default value been set?
Referenced by set_default_value(), and set_input_is_angle_in_degrees().
|
private |
Does this parameter expect that its input will be an angle in degrees?
Will be converted to radians internally, in this case.
Referenced by convert_angle(), and set_input_is_angle_in_degrees().
|
private |
The magnitude of the perturbation of this parameter.
Referenced by correct_range(), generate_perturbed_value(), perturbation_magnitude(), reset_sampling_and_perturbation_settings(), and set_perturbation_options().
|
private |
Were perturbation options set?
Referenced by perturbation_set(), reset_sampling_and_perturbation_settings(), set_input_is_angle_in_degrees(), and set_perturbation_options().
|
private |
The perturbation type for this parameter.
Referenced by correct_range(), generate_perturbed_value(), parse_perturbation_options(), perturbation_type(), reset_sampling_and_perturbation_settings(), set_perturbation_options(), and set_perturbation_type().
|
private |
Was the sampling range set?
Referenced by reset_sampling_and_perturbation_settings(), sampling_set(), set_input_is_angle_in_degrees(), and set_sampling_options().
|
private |
The value of this parameter.
Referenced by copy_value_from_parameter(), correct_range(), set_default_value(), set_value(), set_value_sneakily(), and value().
|
private |
The max value to be sampled for this parameter.
Referenced by correct_range(), reset_sampling_and_perturbation_settings(), set_sampling_options(), and value_max().
|
private |
The min value to be sampled for this parameter.
Referenced by correct_range(), reset_sampling_and_perturbation_settings(), set_sampling_options(), and value_min().
|
private |
The number of samples for this parameter.
Referenced by reset_sampling_and_perturbation_settings(), set_sampling_options(), and value_samples().
1.8.7