Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
core::chemical::ResidueProperties Class Reference

#include <ResidueProperties.hh>

Inheritance diagram for core::chemical::ResidueProperties:
Inheritance graph
[legend]

Public Member Functions

 ResidueProperties ()
 Empty constructor – Create a default ResidueProperites object. More...
 
 ResidueProperties (ResidueTypeBase const &residue_type)
 Constructor with owning ResidueType. More...
 
 ResidueProperties (ResidueProperties const &)=default
 
void set_parent_name (std::string const &setting)
 Set the name of the owning ResidueType, for diagnostic purposes. More...
 
virtual void show (std::ostream &output=std::cout) const
 Generate string representation of ResidueProperties for debugging purposes. More...
 
bool has_property (ResidueProperty const property) const
 Get whether or not this ResidueType has the requested property. More...
 
bool has_property (std::string const &property) const
 Get whether or not this ResidueType has the requested property by string. More...
 
void set_property (ResidueProperty const property, bool const setting)
 Set the status of the given property for this ResidueType. More...
 
void set_property (std::string const &property, bool const setting)
 Set the status of the given property for this ResidueType by string. More...
 
bool is_variant_type (VariantType const variant_type) const
 Get whether or not this ResidueType is of the requested VariantType. More...
 
bool is_variant_type (std::string const &variant_type) const
 Get whether or not this ResidueType is of the requested VariantType by string. More...
 
void set_variant_type (VariantType const variant_type, bool const setting)
 Set the status of a given VariantType for this ResidueType. More...
 
void set_variant_type (std::string const &variant_type, bool const setting)
 Set the status of a given VariantType for this ResidueType by string. More...
 
bool has_custom_variant_types () const
 Does this ResidueType contain additional VariantTypes than the standard list? More...
 
void enable_custom_variant_types ()
 Turn on the ability to create VariantTypes "on-the-fly". More...
 
void add_numeric_property (std::string const &tag, core::Real const value)
 Add a numeric property. More...
 
void add_string_property (std::string const &tag, std::string const &value)
 Add a string property. More...
 
std::map< std::string,
core::Real > const & 
numeric_properties () const
 
std::map< std::string,
std::string > const & 
string_properties () const
 
utility::vector1< std::string > get_list_of_properties () const
 Generate and return a list of strings representing the properties of this ResidueType. More...
 
utility::vector1< VariantTypeget_list_of_variant_enums () const
 Return a list of VariantType enums for this ResidueType. More...
 
utility::vector1< std::string >
const & 
get_list_of_custom_variants_by_reference () const
 Get a const-access reference to the list of custom VariantType strings for this ResidueType. More...
 
utility::vector1< std::string > get_list_of_variants () const
 Generate and return a list of strings representing the VariantTypes of this ResidueType. More...
 
utility::vector1< std::string > get_list_of_custom_variants () const
 Return a list of custom VariantTypes only for this ResidueType. More...
 
bool operator== (ResidueProperties const &other) const
 
bool operator!= (ResidueProperties const &other) const
 

Static Public Member Functions

static ResidueProperty const & get_property_from_string (std::string const &property)
 Static constant data access. More...
 
static std::string const & get_string_from_property (ResidueProperty const property)
 Get a string from the corresponding ResidueProperty enum value. More...
 
static VariantType const & get_variant_from_string (std::string const &variant)
 Get the VariantType enum value from the corresponding string. This public static class method is defined in VariantType_mappings.cc, which is auto-generated by the add_ResidueType_enum_files.py script. More...
 
static std::string const & get_string_from_variant (VariantType const variant)
 Get a string from the corresponding VariantType enum value. This public static class method is defined in VariantType_mappings.cc, which is auto-generated by the add_ResidueType_enum_files.py script. More...
 

Private Attributes

std::string parent_residue_type_ {"<Unspecified ResidueType>"}
 The name of the parent ResidueType (for diagnositic output) More...
 
utility::vector1< boolgeneral_property_status_
 Storage of general properties. More...
 
utility::vector1< boolvariant_type_status_
 The patch operations/variant types that describe this residue. More...
 
bool has_custom_variant_types_ = false
 "Custom" variants as strings are permitted for the enzdes and metalloproteins cases. More...
 
utility::vector1< std::string > custom_variant_types_
 
std::map< std::string, core::Realnumeric_properties_
 Arbitrary numeric properties with string names. More...
 
std::map< std::string,
std::string > 
string_properties_
 Arbitrary string properties with string names. More...
 

Detailed Description

This is a container class for the large assortment of properties associated with ResidueTypes. It prevents ResidueType from becoming cluttered with an over-abundance of properties and related methods.

Remarks
This is the first step in a major refactor of how properties are handled in Rosetta. For now, I have just gathered all the properties related code into one place, so that changes to the system can be more readily made. Previous behavior has been maintained. In the future, I have several ideas for further improvements. ~Labonte

Constructor & Destructor Documentation

core::chemical::ResidueProperties::ResidueProperties ( )

Empty constructor – Create a default ResidueProperites object.

core::chemical::ResidueProperties::ResidueProperties ( ResidueTypeBase const &  residue_type)

Constructor with owning ResidueType.

core::chemical::ResidueProperties::ResidueProperties ( ResidueProperties const &  )
default

Member Function Documentation

void core::chemical::ResidueProperties::add_numeric_property ( std::string const &  tag,
core::Real const  value 
)

Add a numeric property.

Note
This function was copied from its old location in ResidueType.

References numeric_properties_.

void core::chemical::ResidueProperties::add_string_property ( std::string const &  tag,
std::string const &  value 
)

Add a string property.

Note
This function was copied from its old location in ResidueType.

References string_properties_.

void core::chemical::ResidueProperties::enable_custom_variant_types ( )
inline

Turn on the ability to create VariantTypes "on-the-fly".

Custom" VariantTypes as strings are permitted for the enzdes and metalloproteins cases. Do not enable unless you have a good reason to, as string look-ups are less efficient and more error-prone.

References has_custom_variant_types_.

utility::vector1< std::string > core::chemical::ResidueProperties::get_list_of_custom_variants ( ) const
inline
utility::vector1< std::string > const & core::chemical::ResidueProperties::get_list_of_custom_variants_by_reference ( ) const

Get a const-access reference to the list of custom VariantType strings for this ResidueType.

This will not include enum-based standard variants.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu)

References custom_variant_types_.

utility::vector1< std::string > core::chemical::ResidueProperties::get_list_of_properties ( ) const
utility::vector1< VariantType > core::chemical::ResidueProperties::get_list_of_variant_enums ( ) const

Return a list of VariantType enums for this ResidueType.

This will not include custom, string-based variant types generated on the fly.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu)

References core::chemical::FIRST_VARIANT, core::chemical::N_VARIANTS, and variant_type_status_.

utility::vector1< std::string > core::chemical::ResidueProperties::get_list_of_variants ( ) const

Generate and return a list of strings representing the VariantTypes of this ResidueType.

This will include both custom, string-based variants made on-the-fly AND the standard variants that are enumerated.

References custom_variant_types_, core::chemical::FIRST_VARIANT, get_string_from_variant(), has_custom_variant_types_, core::chemical::N_VARIANTS, and variant_type_status_.

Referenced by protocols::enzdes::SecondaryMatchProtocol::add_enz_cst_interaction_to_pose(), protocols::simple_moves::hbs::HbsPatcher::apply(), protocols::simple_moves::a3b_hbs::A3BHbsPatcher::apply(), protocols::protein_interface_design::movers::SaveAndRetrieveSidechains::apply(), protocols::toolbox::pose_manipulation::construct_poly_uniq_restype_pose(), protocols::toolbox::pose_manipulation::construct_poly_XXX_pose(), protocols::enzdes::EnzdesBaseProtocol::cst_minimize(), core::conformation::form_disulfide_helper(), protocols::simple_moves::chiral::get_chiral_residue_type(), core::chemical::ResidueTypeSet::get_residue_type_with_variant_added(), core::chemical::ResidueTypeSet::get_residue_type_with_variant_removed(), protocols::abinitio::abscript::RigidChunkCM::initialize(), protocols::environment::ProtectedConformation::match_variants(), core::chemical::ResidueTypeSelector::match_variants(), core::pose::MiniPose::MiniPose(), core::chemical::Selector_MATCH_VARIANTS::operator[](), core::chemical::Selector_NO_VARIANTS::operator[](), protocols::stepwise::modeler::rna::remove_all_variant_types(), protocols::toolbox::match_enzdes_util::CovalentConnectionReplaceInfo::remove_covalent_connection_from_pose(), core::chemical::ResidueDatabaseIO::report_residue_type_variant(), show(), and core::pose::Pose::virtual_to_real().

ResidueProperty const & core::chemical::ResidueProperties::get_property_from_string ( std::string const &  property)
static
std::string const & core::chemical::ResidueProperties::get_string_from_property ( ResidueProperty const  property)
static

Get a string from the corresponding ResidueProperty enum value.

This public static class method is defined in ResidueProperty_mappings.cc, which is auto-generated by the add_ResidueType_enum_files.py script. Note – made public because it's a handy function for other code to use (VKM, 22 July 2015).

Note
This function should be used to iterate through all property names. This can be done as follows: for( core::Size i(1); i<=static_cast<core::Size>( core::chemcial::N_PROPERTIES ); ++i ) { std::string const name( core::chemical::ResidueProperties::get_string_from_property( static_cast< core::chemical::ResidueProperty >(i) ) ); // Do something with the name here. }

References core::chemical::STRING_LIST().

Referenced by core::chemical::ResidueTypeFinder::filter_all_properties(), core::chemical::ResidueTypeFinder::filter_disallow_properties(), get_list_of_properties(), core::scoring::aa_composition_energy::AACompositionPropertiesSet::one_line_report(), core::chemical::operator<<(), and core::select::residue_selector::ResiduePropertySelector::provide_xml_schema().

std::string const & core::chemical::ResidueProperties::get_string_from_variant ( VariantType const  variant)
static

Get a string from the corresponding VariantType enum value. This public static class method is defined in VariantType_mappings.cc, which is auto-generated by the add_ResidueType_enum_files.py script.

References core::chemical::STRING_LIST().

Referenced by core::chemical::ResidueTypeFinder::filter_disallow_variants(), get_list_of_variants(), core::chemical::ResidueTypeSet::get_residue_type_with_variant_added(), and core::chemical::ResidueTypeSet::get_residue_type_with_variant_removed().

VariantType const & core::chemical::ResidueProperties::get_variant_from_string ( std::string const &  variant)
static
bool core::chemical::ResidueProperties::has_custom_variant_types ( ) const
inline
bool core::chemical::ResidueProperties::has_property ( ResidueProperty const  property) const
inline

Get whether or not this ResidueType has the requested property.

References general_property_status_.

Referenced by core::select::residue_selector::ResiduePropertySelector::apply(), core::chemical::ResidueType::has_sc_orbitals(), core::chemical::ResidueType::initialize_derived_data(), core::chemical::ResidueType::is_acetylated_nterminus(), core::chemical::ResidueTypeBase::is_achiral_backbone(), core::chemical::ResidueTypeBase::is_achiral_sidechain(), core::chemical::ResidueType::is_adduct(), core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_aramid(), core::chemical::ResidueType::is_aromatic(), core::chemical::ResidueType::is_beta_aa(), core::chemical::ResidueType::is_branch_point(), core::chemical::ResidueType::is_canonical_aa(), core::chemical::ResidueType::is_canonical_nucleic(), core::chemical::ResidueType::is_carbohydrate(), core::chemical::ResidueType::is_charged(), core::chemical::ResidueType::is_coarse(), core::chemical::ResidueType::is_cyclic(), core::chemical::ResidueTypeBase::is_d_aa(), core::chemical::ResidueTypeBase::is_d_rna(), core::chemical::ResidueType::is_disulfide_bonded(), core::chemical::ResidueTypeBase::is_DNA(), core::chemical::ResidueType::is_gamma_aa(), core::chemical::ResidueType::is_inverted_virtual_residue(), core::chemical::ResidueTypeBase::is_l_aa(), core::chemical::ResidueTypeBase::is_l_rna(), core::chemical::ResidueType::is_ligand(), core::chemical::ResidueType::is_lipid(), core::chemical::ResidueType::is_lower_terminus(), core::chemical::ResidueType::is_membrane(), core::chemical::ResidueType::is_meta_aramid(), core::chemical::ResidueType::is_metal(), core::chemical::ResidueType::is_metalbinding(), core::chemical::ResidueType::is_methylated_cterminus(), core::chemical::ResidueType::is_n_methylated(), core::chemical::ResidueType::is_oligourea(), core::chemical::ResidueType::is_ortho_aramid(), core::chemical::ResidueType::is_para_aramid(), core::chemical::ResidueTypeBase::is_peptoid(), core::chemical::ResidueType::is_PNA(), core::chemical::ResidueType::is_polar(), core::chemical::ResidueTypeBase::is_polymer(), core::chemical::ResidueType::is_post_methylene_meta_aramid(), core::chemical::ResidueType::is_post_methylene_ortho_aramid(), core::chemical::ResidueType::is_post_methylene_para_aramid(), core::chemical::ResidueType::is_pre_methylene_meta_aramid(), core::chemical::ResidueType::is_pre_methylene_ortho_aramid(), core::chemical::ResidueType::is_pre_methylene_para_aramid(), core::chemical::ResidueType::is_pre_methylene_post_methylene_meta_aramid(), core::chemical::ResidueType::is_pre_methylene_post_methylene_ortho_aramid(), core::chemical::ResidueType::is_pre_methylene_post_methylene_para_aramid(), core::chemical::ResidueTypeBase::is_protein(), core::chemical::ResidueType::is_purine(), core::chemical::ResidueType::is_pyrimidine(), core::chemical::ResidueTypeBase::is_r_peptoid(), core::chemical::ResidueTypeBase::is_RNA(), core::chemical::ResidueTypeBase::is_s_peptoid(), core::chemical::ResidueType::is_sidechain_amine(), core::chemical::ResidueType::is_sidechain_thiol(), core::chemical::ResidueType::is_solvent(), core::chemical::ResidueType::is_sri(), core::chemical::ResidueType::is_surface(), core::chemical::ResidueType::is_terminus(), core::chemical::ResidueType::is_TNA(), core::chemical::ResidueType::is_TP3(), core::chemical::ResidueType::is_triazolemer(), core::chemical::ResidueType::is_upper_terminus(), core::chemical::ResidueType::is_virtual_residue(), core::chemical::ResidueType::is_virtualizable_by_packer(), core::chemical::ResidueType::is_VRT1(), core::chemical::ResidueType::is_water(), core::chemical::ResidueType::requires_actcoord(), and core::chemical::ResidueType::show().

bool core::chemical::ResidueProperties::has_property ( std::string const &  property) const

Get whether or not this ResidueType has the requested property by string.

References general_property_status_, get_property_from_string(), core::chemical::NO_PROPERTY, and core::chemical::TR().

bool core::chemical::ResidueProperties::is_variant_type ( VariantType const  variant_type) const
inline

Get whether or not this ResidueType is of the requested VariantType.

References core::chemical::NO_VARIANT, and variant_type_status_.

Referenced by core::chemical::variants_match_with_exceptions().

bool core::chemical::ResidueProperties::is_variant_type ( std::string const &  variant_type) const
std::map< std::string, core::Real > const& core::chemical::ResidueProperties::numeric_properties ( ) const
inline
bool core::chemical::ResidueProperties::operator!= ( ResidueProperties const &  other) const
inline

References operator==().

bool core::chemical::ResidueProperties::operator== ( ResidueProperties const &  other) const
void core::chemical::ResidueProperties::set_parent_name ( std::string const &  setting)
inline

Set the name of the owning ResidueType, for diagnostic purposes.

References parent_residue_type_.

void core::chemical::ResidueProperties::set_property ( ResidueProperty const  property,
bool const  setting 
)
inline

Set the status of the given property for this ResidueType.

References general_property_status_.

void core::chemical::ResidueProperties::set_property ( std::string const &  property,
bool const  setting 
)

Set the status of the given property for this ResidueType by string.

References general_property_status_, get_property_from_string(), and core::chemical::NO_PROPERTY.

void core::chemical::ResidueProperties::set_variant_type ( VariantType const  variant_type,
bool const  setting 
)
inline

Set the status of a given VariantType for this ResidueType.

References variant_type_status_.

void core::chemical::ResidueProperties::set_variant_type ( std::string const &  variant_type,
bool const  setting 
)
void core::chemical::ResidueProperties::show ( std::ostream &  output = std::cout) const
virtual
std::map< std::string, std::string > const& core::chemical::ResidueProperties::string_properties ( ) const
inline

Member Data Documentation

utility::vector1< std::string > core::chemical::ResidueProperties::custom_variant_types_
private
utility::vector1< bool > core::chemical::ResidueProperties::general_property_status_
private

Storage of general properties.

Referenced by get_list_of_properties(), has_property(), operator==(), and set_property().

bool core::chemical::ResidueProperties::has_custom_variant_types_ = false
private

"Custom" variants as strings are permitted for the enzdes and metalloproteins cases.

Referenced by enable_custom_variant_types(), get_list_of_variants(), has_custom_variant_types(), is_variant_type(), operator==(), and set_variant_type().

std::map<std::string,core::Real> core::chemical::ResidueProperties::numeric_properties_
private

Arbitrary numeric properties with string names.

Referenced by add_numeric_property(), numeric_properties(), and operator==().

std::string core::chemical::ResidueProperties::parent_residue_type_ {"<Unspecified ResidueType>"}
private

The name of the parent ResidueType (for diagnositic output)

Referenced by operator==(), set_parent_name(), and set_variant_type().

std::map<std::string,std::string> core::chemical::ResidueProperties::string_properties_
private

Arbitrary string properties with string names.

Referenced by add_string_property(), operator==(), and string_properties().

utility::vector1< bool > core::chemical::ResidueProperties::variant_type_status_
private

The patch operations/variant types that describe this residue.

Referenced by get_list_of_variant_enums(), get_list_of_variants(), is_variant_type(), operator==(), and set_variant_type().


The documentation for this class was generated from the following files: