Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
protocols::cyclic_peptide::PeptideInternalHbondsMetric Class Reference

A simple metric for measuring the backbone hydrogen bonds within a peptide backbone, ignoring hydrogen bonds to other parts of a pose. Note that this metric does not count intra-residue hydrogen bonds. More...

#include <PeptideInternalHbondsMetric.hh>

Inheritance diagram for protocols::cyclic_peptide::PeptideInternalHbondsMetric:
Inheritance graph
[legend]

Public Member Functions

 PeptideInternalHbondsMetric ()=default
 Constructors ///. More...
 
 PeptideInternalHbondsMetric (PeptideInternalHbondsMetric const &)=default
 Copy constructor (not needed unless you need deep copies) More...
 
 ~PeptideInternalHbondsMetric () override=default
 Destructor (important for properly forward-declaring smart-pointer members) More...
 
core::simple_metrics::SimpleMetricOP clone () const override
 Duplicate this object, and return a smart pointer to the copy. More...
 
core::Real calculate (core::pose::Pose const &pose) const override
 Metric Methods ///. More...
 
std::string name () const override
 Name of the class. More...
 
std::string metric () const override
 Return text indicating what we're measuring. 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...
 
void configure_from_filter_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data)
 Configure this metric from the tag passed to the companion filter (the PeptideInternalHbondsFilter). More...
 
void report (std::ostream &outstream, core::pose::Pose const &pose) const
 allows printing data to a stream. More...
 
void set_hbond_types (bool const backbone_backbone_setting, bool const backbone_sidechain_setting, bool const sidechain_sidechain_setting)
 Set whether we're counting backbone-backbone, backbone-sidechain, and sidechain-sidechain hydrogen bonds. More...
 
void set_exclusion_distance (core::Size const setting)
 Set the number of residues apart in terms of covalent connectivity that two residues have to be in order for their hydrogen bonds to be counted. More...
 
void set_hbond_energy_cutoff (core::Real const setting)
 Set the energy cutoff for counting a hydrogen bond. More...
 
void set_scorefxn (core::scoring::ScoreFunctionCOP const &sfxn_in)
 Set the scorefunction for identifying hydrogen bonds. If this is not called, the default scorefunction is used. More...
 
void set_residue_selector (core::select::residue_selector::ResidueSelectorCOP const &res_selector_in)
 Set the scorefunction for selecting the peptide. If this is not called, whole pose is counted. More...
 
bool backbone_backbone () const
 Get whether we're counting backbone-backbone hbonds: More...
 
bool backbone_sidechain () const
 Get whether we're counting backbone-sidechain hbonds: More...
 
bool sidechain_sidechain () const
 Get whether we're counting sidechain-sidechain hbonds: More...
 
core::Size exclusion_distance () const
 Get the number of residues apart in terms of covalent connectivity that two residues have to be in order for their hydrogen bonds to be counted. More...
 
core::Real hbond_energy_cutoff () const
 Get the energy cutoff for counting a hydrogen bond. More...
 
core::scoring::ScoreFunctionCOP scorefxn () const
 Get the scorefunction for identifying hydrogen bonds. Note that if this is nullptr, the default scorefunction is used. More...
 
core::select::residue_selector::ResidueSelectorCOP residue_selector () const
 Get the scorefunction for selecting the peptide. If this nullptr, whole pose is counted. More...
 
void provide_citation_info (basic::citation_manager::CitationCollectionList &) const override
 Provide the citation. More...
 
- Public Member Functions inherited from core::simple_metrics::RealMetric
 RealMetric ()
 
 ~RealMetric () override
 
 RealMetric (RealMetric const &other)
 
RealMetricoperator= (RealMetric const &)
 
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 as a score. labeled as out_label. More...
 
core::Real 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...
 
utility::vector1< std::string > get_metric_names () const override
 Get the metric name(s) that this Metric will calculate. More...
 
- Public Member Functions inherited from core::simple_metrics::SimpleMetric
 SimpleMetric (std::string const &simple_metric_type)
 
 ~SimpleMetric () override
 
 SimpleMetric (SimpleMetric const &other)
 
SimpleMetricoperator= (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...
 

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)
 Provide a description of the XML interface. More...
 
static void provide_shared_xml_schema_elements (utility::tag::AttributeList &attlist)
 Provide descriptions of XML interface elements shared between this metric and the companion filter. More...
 
- Static Public Member Functions inherited from core::simple_metrics::SimpleMetric
static
utility::tag::XMLSchemaComplexTypeGeneratorOP 
complex_type_generator_for_simple_metric (utility::tag::XMLSchemaDefinition &)
 

Private Member Functions

core::Size count_hbonds (core::pose::Pose const &original_pose, core::select::residue_selector::ResidueSubset const &selection) const
 Given a pose and a selection, count the internal hydrogen bonds. More...
 
utility::vector1< std::list
< core::Size > > 
generate_allowed_partners (core::pose::Pose const &pose, utility::vector1< core::Size > const &selected_residues) const
 Given a vector of selected resiudes and a pose, construct a vector of lists of allowed residue partners. More...
 

Private Attributes

bool backbone_backbone_ = true
 Are we counting backbone-backbone hydrogen bonds? Default true. More...
 
bool backbone_sidechain_ = false
 Are we counting backbone-sidechain hydrogen bonds? Default false. More...
 
bool sidechain_sidechain_ = false
 Are we counting sidechain-sidechain hydrogen bonds? Default false. More...
 
core::Size exclusion_distance_ = 1
 The number of residues apart in terms of covalent connectivity that two residues have to be in order for their hydrogen bonds to be counted. Defaults to 1. More...
 
core::Real hbond_energy_cutoff_ = -0.25
 The energy cutoff for counting a hydrogen bond. Defaults to -0.25. More...
 
core::scoring::ScoreFunctionCOP scorefxn_
 The scorefunction to use for evaluating hydrogen bonds. If none is provided, we'll grab the default scorefunction and cache it. More...
 
core::select::residue_selector::ResidueSelectorCOP residue_selector_
 The residue selector. If none is provided, we evaluate the whole pose. More...
 

Friends

class ::PeptideInternalHbondsMetricTests
 

Detailed Description

A simple metric for measuring the backbone hydrogen bonds within a peptide backbone, ignoring hydrogen bonds to other parts of a pose. Note that this metric does not count intra-residue hydrogen bonds.

Constructor & Destructor Documentation

protocols::cyclic_peptide::PeptideInternalHbondsMetric::PeptideInternalHbondsMetric ( )
default

Constructors ///.

Default constructor

protocols::cyclic_peptide::PeptideInternalHbondsMetric::PeptideInternalHbondsMetric ( PeptideInternalHbondsMetric const &  )
default

Copy constructor (not needed unless you need deep copies)

protocols::cyclic_peptide::PeptideInternalHbondsMetric::~PeptideInternalHbondsMetric ( )
overridedefault

Destructor (important for properly forward-declaring smart-pointer members)

Member Function Documentation

bool protocols::cyclic_peptide::PeptideInternalHbondsMetric::backbone_backbone ( ) const
inline

Get whether we're counting backbone-backbone hbonds:

References backbone_backbone_.

Referenced by configure_from_filter_tag(), and count_hbonds().

bool protocols::cyclic_peptide::PeptideInternalHbondsMetric::backbone_sidechain ( ) const
inline

Get whether we're counting backbone-sidechain hbonds:

References backbone_sidechain_.

Referenced by configure_from_filter_tag(), and count_hbonds().

core::Real protocols::cyclic_peptide::PeptideInternalHbondsMetric::calculate ( core::pose::Pose const &  pose) const
overridevirtual

Metric Methods ///.

Calculate the metric.

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::RealMetric.

References count_hbonds(), residue_selector_, core::pose::Pose::total_residue(), and protocols::cyclic_peptide::TR().

core::simple_metrics::SimpleMetricOP protocols::cyclic_peptide::PeptideInternalHbondsMetric::clone ( ) const
overridevirtual

Duplicate this object, and return a smart pointer to the copy.

Implements core::simple_metrics::RealMetric.

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::configure_from_filter_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap &  data 
)
core::Size protocols::cyclic_peptide::PeptideInternalHbondsMetric::count_hbonds ( core::pose::Pose const &  original_pose,
core::select::residue_selector::ResidueSubset const &  selection 
) const
private
core::Size protocols::cyclic_peptide::PeptideInternalHbondsMetric::exclusion_distance ( ) const
inline

Get the number of residues apart in terms of covalent connectivity that two residues have to be in order for their hydrogen bonds to be counted.

Defaults to 1.

References exclusion_distance_.

Referenced by configure_from_filter_tag(), and generate_allowed_partners().

utility::vector1< std::list< core::Size > > protocols::cyclic_peptide::PeptideInternalHbondsMetric::generate_allowed_partners ( core::pose::Pose const &  pose,
utility::vector1< core::Size > const &  selected_residues 
) const
private

Given a vector of selected resiudes and a pose, construct a vector of lists of allowed residue partners.

This is an O(N^2) operation, unfortunately. However, the selected_residues list should be small, and N is its length.

References exclusion_distance(), core::pose::Pose::residue(), and core::pose::Pose::total_residue().

Referenced by count_hbonds().

core::Real protocols::cyclic_peptide::PeptideInternalHbondsMetric::hbond_energy_cutoff ( ) const
inline

Get the energy cutoff for counting a hydrogen bond.

Defaults to -0.25.

References hbond_energy_cutoff_.

Referenced by configure_from_filter_tag().

std::string protocols::cyclic_peptide::PeptideInternalHbondsMetric::metric ( ) const
overridevirtual

Return text indicating what we're measuring.

Implements core::simple_metrics::RealMetric.

std::string protocols::cyclic_peptide::PeptideInternalHbondsMetric::name ( ) const
overridevirtual

Name of the class.

Implements core::simple_metrics::RealMetric.

References name_static().

std::string protocols::cyclic_peptide::PeptideInternalHbondsMetric::name_static ( )
static
void protocols::cyclic_peptide::PeptideInternalHbondsMetric::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap &  data 
)
overridevirtual

called by parse_my_tag – should not be used directly

Implements core::simple_metrics::RealMetric.

References configure_from_filter_tag().

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::provide_citation_info ( basic::citation_manager::CitationCollectionList &  citations) const
overridevirtual

Provide the citation.

Reimplemented from core::simple_metrics::SimpleMetric.

References name_static(), residue_selector_, and scorefxn_.

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::provide_shared_xml_schema_elements ( utility::tag::AttributeList &  attlist)
static

Provide descriptions of XML interface elements shared between this metric and the companion filter.

Provide XML interface elements shared between this metric and the companion filter.

References core::select::residue_selector::attributes_for_parse_residue_selector(), and core::scoring::attributes_for_parse_score_function_w_description().

Referenced by protocols::cyclic_peptide::PeptideInternalHbondsFilter::provide_xml_schema(), and provide_xml_schema().

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
void protocols::cyclic_peptide::PeptideInternalHbondsMetric::report ( std::ostream &  outstream,
core::pose::Pose const &  pose 
) const

allows printing data to a stream.

References count_hbonds(), residue_selector_, and core::pose::Pose::total_residue().

core::select::residue_selector::ResidueSelectorCOP protocols::cyclic_peptide::PeptideInternalHbondsMetric::residue_selector ( ) const
inline

Get the scorefunction for selecting the peptide. If this nullptr, whole pose is counted.

References residue_selector_.

core::scoring::ScoreFunctionCOP protocols::cyclic_peptide::PeptideInternalHbondsMetric::scorefxn ( ) const
inline

Get the scorefunction for identifying hydrogen bonds. Note that if this is nullptr, the default scorefunction is used.

References scorefxn_.

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::set_exclusion_distance ( core::Size const  setting)

Set the number of residues apart in terms of covalent connectivity that two residues have to be in order for their hydrogen bonds to be counted.

Defaults to 1.

References exclusion_distance_.

Referenced by configure_from_filter_tag().

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::set_hbond_energy_cutoff ( core::Real const  setting)

Set the energy cutoff for counting a hydrogen bond.

Defaults to -0.25.

References hbond_energy_cutoff_.

Referenced by configure_from_filter_tag().

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::set_hbond_types ( bool const  backbone_backbone_setting,
bool const  backbone_sidechain_setting,
bool const  sidechain_sidechain_setting 
)

Set whether we're counting backbone-backbone, backbone-sidechain, and sidechain-sidechain hydrogen bonds.

Throws if all are set to false. Defaults to only backbone-backbone being true.

References backbone_backbone_, backbone_sidechain_, and sidechain_sidechain_.

Referenced by configure_from_filter_tag().

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::set_residue_selector ( core::select::residue_selector::ResidueSelectorCOP const &  res_selector_in)

Set the scorefunction for selecting the peptide. If this is not called, whole pose is counted.

References residue_selector_.

Referenced by configure_from_filter_tag().

void protocols::cyclic_peptide::PeptideInternalHbondsMetric::set_scorefxn ( core::scoring::ScoreFunctionCOP const &  sfxn_in)

Set the scorefunction for identifying hydrogen bonds. If this is not called, the default scorefunction is used.

References scorefxn_.

Referenced by configure_from_filter_tag().

bool protocols::cyclic_peptide::PeptideInternalHbondsMetric::sidechain_sidechain ( ) const
inline

Get whether we're counting sidechain-sidechain hbonds:

References sidechain_sidechain_.

Referenced by configure_from_filter_tag(), and count_hbonds().

Friends And Related Function Documentation

friend class ::PeptideInternalHbondsMetricTests
friend

Member Data Documentation

bool protocols::cyclic_peptide::PeptideInternalHbondsMetric::backbone_backbone_ = true
private

Are we counting backbone-backbone hydrogen bonds? Default true.

Referenced by backbone_backbone(), count_hbonds(), and set_hbond_types().

bool protocols::cyclic_peptide::PeptideInternalHbondsMetric::backbone_sidechain_ = false
private

Are we counting backbone-sidechain hydrogen bonds? Default false.

Referenced by backbone_sidechain(), count_hbonds(), and set_hbond_types().

core::Size protocols::cyclic_peptide::PeptideInternalHbondsMetric::exclusion_distance_ = 1
private

The number of residues apart in terms of covalent connectivity that two residues have to be in order for their hydrogen bonds to be counted. Defaults to 1.

Referenced by exclusion_distance(), and set_exclusion_distance().

core::Real protocols::cyclic_peptide::PeptideInternalHbondsMetric::hbond_energy_cutoff_ = -0.25
private

The energy cutoff for counting a hydrogen bond. Defaults to -0.25.

Referenced by hbond_energy_cutoff(), and set_hbond_energy_cutoff().

core::select::residue_selector::ResidueSelectorCOP protocols::cyclic_peptide::PeptideInternalHbondsMetric::residue_selector_
private

The residue selector. If none is provided, we evaluate the whole pose.

Referenced by calculate(), provide_citation_info(), report(), residue_selector(), and set_residue_selector().

core::scoring::ScoreFunctionCOP protocols::cyclic_peptide::PeptideInternalHbondsMetric::scorefxn_
mutableprivate

The scorefunction to use for evaluating hydrogen bonds. If none is provided, we'll grab the default scorefunction and cache it.

Referenced by count_hbonds(), provide_citation_info(), scorefxn(), and set_scorefxn().

bool protocols::cyclic_peptide::PeptideInternalHbondsMetric::sidechain_sidechain_ = false
private

Are we counting sidechain-sidechain hydrogen bonds? Default false.

Referenced by count_hbonds(), set_hbond_types(), and sidechain_sidechain().


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