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

AACompositionPropertiesSet, a helper class that stores: More...

#include <AACompositionEnergySetup.hh>

Inheritance diagram for core::scoring::aa_composition_energy::AACompositionPropertiesSet:
Inheritance graph
[legend]

Public Member Functions

 AACompositionPropertiesSet ()
 Default constructor for AACompositionPropertiesSet. More...
 
 AACompositionPropertiesSet (utility::vector1< std::string > const &included_type_strings, utility::vector1< std::string > const &excluded_type_strings, utility::vector1< std::string > const &included_properties_strings, utility::vector1< std::string > const &or_properties_strings, utility::vector1< std::string > const &excluded_properties_strings)
 Constructor for AACompositionPropertiesSet that takes lists of included and excluded properties. More...
 
 AACompositionPropertiesSet (AACompositionPropertiesSet const &src)
 Copy constructor for AACompositionPropertiesSet. More...
 
 ~AACompositionPropertiesSet () override
 Default destructor for AACompositionPropertiesSet. More...
 
virtual
AACompositionPropertiesSetOP 
clone () const
 Clone: create a copy of this object, and return an owning pointer to the copy. More...
 
bool properties_match_this (core::chemical::ResidueType const &rsd_type) const
 Check whether the properties of a residue type match those of this set. More...
 
void parse_included_types (utility::vector1< std::string > const &typelist)
 Take a list of included type strings and add it to the list of included types, checking that none of the types has already been added. More...
 
void parse_excluded_types (utility::vector1< std::string > const &typelist)
 Take a list of excluded type strings and add it to the list of excluded types, checking that none of the types has already been added. More...
 
void parse_included_properites (utility::vector1< std::string > const &proplist)
 Take a list of included property strings and parse it. More...
 
void parse_or_properties (utility::vector1< std::string > const &proplist)
 Take a list of included property strings and parse it. More...
 
void parse_excluded_properites (utility::vector1< std::string > const &proplist)
 Take a list of excluded property strings and parse it. More...
 
std::string one_line_report () const
 Generate a one-line summary of the properties stored in this AACompositionPropertySet. More...
 

Private Member Functions

void add_included_type (std::string const &type)
 Add a type to the list of types that are always counted. More...
 
void add_excluded_type (std::string const &type)
 Add a type to the list of types that are never counted. More...
 
void add_included_property (core::chemical::ResidueProperty const property)
 Add a property to the list of properties that must be present. More...
 
void add_or_property (core::chemical::ResidueProperty const property)
 Add a property to the list of properties that, if present, result in the residue being counted if it's not in the excluded_types_ or excluded_properties_ lists. More...
 
void add_excluded_property (core::chemical::ResidueProperty const property)
 Add a property to the list of properties that must not be present. More...
 
core::chemical::ResidueProperty parse_property (std::string const &name) const
 Convert a property name to a ResidueProperty enum. More...
 

Private Attributes

utility::vector1< std::string > included_types_
 Residue names that are counted. More...
 
utility::vector1< std::string > excluded_types_
 Residue names that are not counted. More...
 
utility::vector1
< core::chemical::ResidueProperty
included_properties_
 Properties that a residue MUST have. More...
 
utility::vector1
< core::chemical::ResidueProperty
or_properties_
 Properties, any of which is sufficient for a residue to be counted if it's not in the NOT_TYPE or NOT_PROPERTIES lists. More...
 
utility::vector1
< core::chemical::ResidueProperty
excluded_properties_
 Properties that a residue MUST NOT have. More...
 

Detailed Description

AACompositionPropertiesSet, a helper class that stores:

The logic is as follows: a residue is counted if and only if [any TYPE matches] OR [ (no NOT_TYPE matches) AND ( {all PROPERTIES match} OR {any OR_PROPERTIES match} OR {no TYPEs defined AND no PROPERTIES defined AND no OR_PROPERTIES defined } ) AND ( no NOT_PROPERTIES match) ]

Constructor & Destructor Documentation

core::scoring::aa_composition_energy::AACompositionPropertiesSet::AACompositionPropertiesSet ( )

Default constructor for AACompositionPropertiesSet.

core::scoring::aa_composition_energy::AACompositionPropertiesSet::AACompositionPropertiesSet ( utility::vector1< std::string > const &  included_type_strings,
utility::vector1< std::string > const &  excluded_type_strings,
utility::vector1< std::string > const &  included_properties_strings,
utility::vector1< std::string > const &  or_properties_strings,
utility::vector1< std::string > const &  excluded_properties_strings 
)

Constructor for AACompositionPropertiesSet that takes lists of included and excluded properties.

References parse_excluded_properites(), parse_excluded_types(), parse_included_properites(), parse_included_types(), and parse_or_properties().

core::scoring::aa_composition_energy::AACompositionPropertiesSet::AACompositionPropertiesSet ( AACompositionPropertiesSet const &  src)

Copy constructor for AACompositionPropertiesSet.

core::scoring::aa_composition_energy::AACompositionPropertiesSet::~AACompositionPropertiesSet ( )
overridedefault

Default destructor for AACompositionPropertiesSet.

Member Function Documentation

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::add_excluded_property ( core::chemical::ResidueProperty const  property)
private

Add a property to the list of properties that must not be present.

Checks that it hasn't yet been added to any list.

References excluded_properties_, included_properties_, and or_properties_.

Referenced by parse_excluded_properites().

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::add_excluded_type ( std::string const &  type)
private

Add a type to the list of types that are never counted.

Checks that it hasn't yet been added to any list.

References excluded_types_, and included_types_.

Referenced by parse_excluded_types().

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::add_included_property ( core::chemical::ResidueProperty const  property)
private

Add a property to the list of properties that must be present.

Checks that it hasn't yet been added to any list.

References excluded_properties_, included_properties_, and or_properties_.

Referenced by parse_included_properites().

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::add_included_type ( std::string const &  type)
private

Add a type to the list of types that are always counted.

Checks that it hasn't yet been added to any list.

References excluded_types_, and included_types_.

Referenced by parse_included_types().

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::add_or_property ( core::chemical::ResidueProperty const  property)
private

Add a property to the list of properties that, if present, result in the residue being counted if it's not in the excluded_types_ or excluded_properties_ lists.

Checks that it hasn't yet been added to any list.

References excluded_properties_, included_properties_, and or_properties_.

Referenced by parse_or_properties().

AACompositionPropertiesSetOP core::scoring::aa_composition_energy::AACompositionPropertiesSet::clone ( ) const
virtual

Clone: create a copy of this object, and return an owning pointer to the copy.

std::string core::scoring::aa_composition_energy::AACompositionPropertiesSet::one_line_report ( ) const

Generate a one-line summary of the properties stored in this AACompositionPropertySet.

References excluded_properties_, excluded_types_, core::chemical::ResidueProperties::get_string_from_property(), included_properties_, included_types_, and or_properties_.

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::parse_excluded_properites ( utility::vector1< std::string > const &  proplist)

Take a list of excluded property strings and parse it.

Populates the excluded_properties_ vector based on the properties named in the list.

References add_excluded_property(), excluded_properties_, and parse_property().

Referenced by AACompositionPropertiesSet().

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::parse_excluded_types ( utility::vector1< std::string > const &  typelist)

Take a list of excluded type strings and add it to the list of excluded types, checking that none of the types has already been added.

Populates the excluded_types_ vector based on the types named in the list.

References add_excluded_type(), and excluded_types_.

Referenced by AACompositionPropertiesSet().

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::parse_included_properites ( utility::vector1< std::string > const &  proplist)

Take a list of included property strings and parse it.

Populates the included_properties_ vector based on the properties named in the list.

References add_included_property(), included_properties_, and parse_property().

Referenced by AACompositionPropertiesSet().

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::parse_included_types ( utility::vector1< std::string > const &  typelist)

Take a list of included type strings and add it to the list of included types, checking that none of the types has already been added.

Populates the included_types_ vector based on the types named in the list.

References add_included_type(), and included_types_.

Referenced by AACompositionPropertiesSet().

void core::scoring::aa_composition_energy::AACompositionPropertiesSet::parse_or_properties ( utility::vector1< std::string > const &  proplist)

Take a list of included property strings and parse it.

Populates the included_properties_ vector based on the properties named in the list.

References add_or_property(), or_properties_, and parse_property().

Referenced by AACompositionPropertiesSet().

core::chemical::ResidueProperty core::scoring::aa_composition_energy::AACompositionPropertiesSet::parse_property ( std::string const &  name) const
private

Convert a property name to a ResidueProperty enum.

Throws an error if the property name is not recognized.

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

Referenced by parse_excluded_properites(), parse_included_properites(), and parse_or_properties().

bool core::scoring::aa_composition_energy::AACompositionPropertiesSet::properties_match_this ( core::chemical::ResidueType const &  rsd_type) const
inline

Check whether the properties of a residue type match those of this set.

This checks:

  1. Whether the residue name matches an exlcuded name -> return false.
  2. Whether the residue name matches an included name -> return true.
  3. Whether the residue properties match an excluded property -> return false.
  4. Whether all three of the included_types and or_properties and included_property lists are empty -> return true.
  5. Whether any or_property is matched -> return true.
  6. Whether there exist any proprties to match -> if not, return false.
  7. Whether any properties are not matched -> return false. Returns true

References excluded_properties_, excluded_types_, core::chemical::ResidueTypeBase::has_property(), included_properties_, included_types_, core::chemical::ResidueTypeBase::name3(), and or_properties_.

Member Data Documentation

utility::vector1< core::chemical::ResidueProperty > core::scoring::aa_composition_energy::AACompositionPropertiesSet::excluded_properties_
private
utility::vector1< std::string > core::scoring::aa_composition_energy::AACompositionPropertiesSet::excluded_types_
private
utility::vector1< core::chemical::ResidueProperty > core::scoring::aa_composition_energy::AACompositionPropertiesSet::included_properties_
private
utility::vector1< std::string > core::scoring::aa_composition_energy::AACompositionPropertiesSet::included_types_
private
utility::vector1< core::chemical::ResidueProperty > core::scoring::aa_composition_energy::AACompositionPropertiesSet::or_properties_
private

Properties, any of which is sufficient for a residue to be counted if it's not in the NOT_TYPE or NOT_PROPERTIES lists.

Referenced by add_excluded_property(), add_included_property(), add_or_property(), one_line_report(), parse_or_properties(), and properties_match_this().


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