![]() |
Rosetta
2021.16
|
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>

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) | |
| RealMetric & | operator= (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) | |
| 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... | |
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 |
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.
|
default |
Constructors ///.
Default constructor
|
default |
Copy constructor (not needed unless you need deep copies)
|
overridedefault |
Destructor (important for properly forward-declaring smart-pointer members)
|
inline |
Get whether we're counting backbone-backbone hbonds:
References backbone_backbone_.
Referenced by configure_from_filter_tag(), and count_hbonds().
|
inline |
Get whether we're counting backbone-sidechain hbonds:
References backbone_sidechain_.
Referenced by configure_from_filter_tag(), and count_hbonds().
|
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().
|
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 | ||
| ) |
Configure this metric from the tag passed to the companion filter (the PeptideInternalHbondsFilter).
References backbone_backbone(), backbone_sidechain(), exclusion_distance(), hbond_energy_cutoff(), core::select::residue_selector::parse_residue_selector(), core::scoring::parse_score_function(), set_exclusion_distance(), set_hbond_energy_cutoff(), set_hbond_types(), set_residue_selector(), set_scorefxn(), and sidechain_sidechain().
Referenced by parse_my_tag().
|
private |
Given a pose and a selection, count the internal hydrogen bonds.
References backbone_backbone(), backbone_backbone_, backbone_sidechain(), backbone_sidechain_, core::scoring::hbonds::HBondOptions::decompose_bb_hb_into_pair_energies(), core::scoring::hbonds::fill_hbond_set(), generate_allowed_partners(), core::scoring::get_score_function(), core::scoring::hbond, core::scoring::hbond_bb_sc, core::scoring::hbond_lr_bb, core::scoring::methods::EnergyMethodOptions::hbond_options(), core::scoring::hbond_sc, core::scoring::hbond_sr_bb, core::pose::Pose::residue_type(), scorefxn_, core::select::residue_selector::selection_positions(), sidechain_sidechain(), sidechain_sidechain_, core::pose::Pose::total_residue(), and protocols::cyclic_peptide::TR().
Referenced by calculate(), and report().
|
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().
|
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().
|
inline |
Get the energy cutoff for counting a hydrogen bond.
Defaults to -0.25.
References hbond_energy_cutoff_.
Referenced by configure_from_filter_tag().
|
overridevirtual |
Return text indicating what we're measuring.
Implements core::simple_metrics::RealMetric.
|
overridevirtual |
|
static |
Name of the class for creator.
Referenced by protocols::cyclic_peptide::PeptideInternalHbondsMetricCreator::keyname(), name(), provide_citation_info(), and provide_xml_schema().
|
overridevirtual |
called by parse_my_tag – should not be used directly
Implements core::simple_metrics::RealMetric.
References configure_from_filter_tag().
|
overridevirtual |
Provide the citation.
Reimplemented from core::simple_metrics::SimpleMetric.
References name_static(), residue_selector_, and scorefxn_.
|
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().
|
static |
Provide a description of the XML interface.
References name_static(), provide_shared_xml_schema_elements(), and core::simple_metrics::xsd_simple_metric_type_definition_w_attributes().
Referenced by protocols::cyclic_peptide::PeptideInternalHbondsMetricCreator::provide_xml_schema().
| 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().
|
inline |
Get the scorefunction for selecting the peptide. If this nullptr, whole pose is counted.
References residue_selector_.
|
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().
|
inline |
Get whether we're counting sidechain-sidechain hbonds:
References sidechain_sidechain_.
Referenced by configure_from_filter_tag(), and count_hbonds().
|
friend |
|
private |
Are we counting backbone-backbone hydrogen bonds? Default true.
Referenced by backbone_backbone(), count_hbonds(), and set_hbond_types().
|
private |
Are we counting backbone-sidechain hydrogen bonds? Default false.
Referenced by backbone_sidechain(), count_hbonds(), and set_hbond_types().
|
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().
|
private |
The energy cutoff for counting a hydrogen bond. Defaults to -0.25.
Referenced by hbond_energy_cutoff(), and set_hbond_energy_cutoff().
|
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().
|
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().
|
private |
Are we counting sidechain-sidechain hydrogen bonds? Default false.
Referenced by count_hbonds(), set_hbond_types(), and sidechain_sidechain().
1.8.7