Rosetta
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::simple_metrics::per_residue_metrics::PerResidueClashMetric Class Reference

A SimpleMetric that calculates the total number of atom-atom clashes from a residue in a residue selector to all other residues defined in a second residue selector using the LJ radius of each atom. More...

#include <PerResidueClashMetric.hh>

Inheritance diagram for core::simple_metrics::per_residue_metrics::PerResidueClashMetric:
Inheritance graph
[legend]

Public Member Functions

 PerResidueClashMetric ()
 Constructors ///. More...
 
 PerResidueClashMetric (select::residue_selector::ResidueSelectorCOP inner_selector, select::residue_selector::ResidueSelectorCOP outer_selector)
 Constructor with other residue selector set. The other selector is what we use to calculate clashes TO Default is to calculate clashes of each residue to ALL OTHER residues (including those in the primary selector) More...
 
 PerResidueClashMetric (PerResidueClashMetric const &src)
 Copy constructor (not needed unless you need deep copies) More...
 
 ~PerResidueClashMetric () override
 Destructor (important for properly forward-declaring smart-pointer members) More...
 
std::map< core::Size, core::Realcalculate (core::pose::Pose const &pose) const override
 Metric Methods ///. More...
 
void set_secondary_residue_selector (core::select::residue_selector::ResidueSelectorCOP selector)
 Set the Residue Selector to use for TO other residues. More...
 
void set_use_hydrogens (bool use_hydrogens)
 Should we calculate only heavy-heavy atom clashes Default True. More...
 
void set_use_soft_clash (bool soft_clash_check)
 When we calculate atom-atom distances using LJ distances, Default True. More...
 
void set_soft_dampening (core::Real dampening)
 Set the dampening of the LJ to use for soft-clash. Default=.33. More...
 
bool is_clashing (core::pose::Pose const &pose, core::Size resA, core::Size atomA, core::Size resB, core::Size atomB) const
 Are these atoms clashing using soft or hard definition? More...
 
std::string name () const override
 Name of the class. More...
 
std::string metric () const override
 Name of the metric. 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...
 
core::simple_metrics::SimpleMetricOP clone () const override
 
- Public Member Functions inherited from core::simple_metrics::PerResidueRealMetric
 PerResidueRealMetric ()
 
 ~PerResidueRealMetric () override
 
 PerResidueRealMetric (PerResidueRealMetric const &other)
 
PerResidueRealMetricoperator= (PerResidueRealMetric 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...
 
void set_residue_selector (select::residue_selector::ResidueSelectorCOP selector)
 Set a ResidueSelector for which we will calculate values over. More...
 
void set_output_as_pdb_nums (bool output_as_pdb_nums)
 Set to output in PDB numbering instead of Rosetta during the Apply function, which adds the data to pose as extra scores. More...
 
std::map< core::Size, core::Realcached_calculate (pose::Pose const &pose, bool use_cache, std::string prefix="", std::string suffix="", bool fail_on_missing_cache=true, bool use_ref_pose_for_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 submetric names that this Metric will calculate. More...
 
select::residue_selector::ResidueSelectorCOP get_selector () const
 Get the set residue selector of this class. More...
 
virtual void parse_per_residue_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data)
 Parse the base class tag. Keep required interface for parse_my_tag. More...
 
virtual void apply (std::string const &out_label, pose::Pose &pose, bool override_existing_data=false) const=0
 Calculate the metric and add it to the Score, which is output into a scorefile - labeled as label Must be implemented by derived classes. More...
 
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...
 
- 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...
 
virtual void provide_citation_info (basic::citation_manager::CitationCollectionList &) const
 Provide citations to the passed CitationCollectionList Subclasses should add the info for themselves and any other classes they use. 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)
 
- Static Public Member Functions inherited from core::simple_metrics::PerResidueRealMetric
static void add_schema (utility::tag::XMLSchemaComplexTypeGeneratorOP complex_schema)
 Add options to the schema from this base class. 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::Real lj_radius_to_zero_e_radius (core::Real num) const
 Return the radius at which the energy is 0 (IE where energy goes from attraction to repulsion). More...
 

Private Attributes

bool use_soft_clash_ = true
 
bool use_hydrogens_ = false
 
core::Real soft_clash_dampening_ = .33
 
core::select::residue_selector::ResidueSelectorCOP selector2_ = nullptr
 
core::Real lj_n_ = pow( 2, 1.0/6 )
 

Detailed Description

A SimpleMetric that calculates the total number of atom-atom clashes from a residue in a residue selector to all other residues defined in a second residue selector using the LJ radius of each atom.

Can use a soft radius, which reduces it by 33%.

Does NOT calculate INTRA-RESIDUE clashes! Default is to calculate clashes of each residue to ALL OTHER residues (including those in the primary selector) Set a secondary selector if you want other behavior

We use a SCORED pose to only calculate energies if fa_rep between a pair of residues under consideration is NOT 0 This is in order to speed up the calculation.

INTRA-residue clashes can be done through the PUBLIC is_clashing method to calculate atomic-clashes.

Constructor & Destructor Documentation

◆ PerResidueClashMetric() [1/3]

core::simple_metrics::per_residue_metrics::PerResidueClashMetric::PerResidueClashMetric ( )

Constructors ///.

Default constructor

Referenced by clone().

◆ PerResidueClashMetric() [2/3]

core::simple_metrics::per_residue_metrics::PerResidueClashMetric::PerResidueClashMetric ( select::residue_selector::ResidueSelectorCOP  inner_selector,
select::residue_selector::ResidueSelectorCOP  outer_selector 
)

Constructor with other residue selector set. The other selector is what we use to calculate clashes TO Default is to calculate clashes of each residue to ALL OTHER residues (including those in the primary selector)

References core::simple_metrics::PerResidueRealMetric::set_residue_selector(), and set_secondary_residue_selector().

◆ PerResidueClashMetric() [3/3]

core::simple_metrics::per_residue_metrics::PerResidueClashMetric::PerResidueClashMetric ( PerResidueClashMetric const &  src)
default

Copy constructor (not needed unless you need deep copies)

Copy constructor.

◆ ~PerResidueClashMetric()

core::simple_metrics::per_residue_metrics::PerResidueClashMetric::~PerResidueClashMetric ( )
override

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

Member Function Documentation

◆ calculate()

std::map< core::Size, core::Real > core::simple_metrics::per_residue_metrics::PerResidueClashMetric::calculate ( core::pose::Pose const &  pose) const
overridevirtual

Metric Methods ///.

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. Defined in PerResidueRealMetric

Calculate the metric. This map is Rosetta Resnum->value and includes only those residues selected.

Return by value as this function can not STORE the result, it only calculates. Store the result in the pose by using the apply method, which calls this method and stores the result in the pose as ExtraScoreValues.

Implements core::simple_metrics::PerResidueRealMetric.

References core::select::residue_selector::TrueResidueSelector::apply(), core::simple_metrics::PerResidueRealMetric::apply(), core::conformation::Residue::atom_type(), core::pose::Pose::conformation(), core::chemical::AtomType::element(), core::pose::Pose::energies(), core::scoring::Energies::energies_updated(), core::scoring::Energies::energy_graph(), core::scoring::fa_rep, core::scoring::EnergyEdge::fill_energy_map(), core::scoring::EnergyGraph::find_energy_edge(), core::select::get_residues_from_subset(), core::simple_metrics::PerResidueRealMetric::get_selector(), core::conformation::Conformation::is_bonded(), is_clashing(), core::chemical::AtomType::is_virtual(), core::chemical::ResidueType::is_virtual_residue(), core::pose::Pose::residue(), core::pose::Pose::residue_type(), selector2_, soft_clash_dampening_, TR(), use_hydrogens_, and core::scoring::Energies::weights().

◆ clone()

core::simple_metrics::SimpleMetricOP core::simple_metrics::per_residue_metrics::PerResidueClashMetric::clone ( ) const
overridevirtual

◆ is_clashing()

bool core::simple_metrics::per_residue_metrics::PerResidueClashMetric::is_clashing ( core::pose::Pose const &  pose,
core::Size  resA,
core::Size  atomA,
core::Size  resB,
core::Size  atomB 
) const

◆ lj_radius_to_zero_e_radius()

core::Real core::simple_metrics::per_residue_metrics::PerResidueClashMetric::lj_radius_to_zero_e_radius ( core::Real  num) const
private

Return the radius at which the energy is 0 (IE where energy goes from attraction to repulsion).

References lj_n_.

Referenced by is_clashing().

◆ metric()

std::string core::simple_metrics::per_residue_metrics::PerResidueClashMetric::metric ( ) const
overridevirtual

Name of the metric.

Implements core::simple_metrics::PerResidueRealMetric.

◆ name()

std::string core::simple_metrics::per_residue_metrics::PerResidueClashMetric::name ( ) const
overridevirtual

Name of the class.

Implements core::simple_metrics::PerResidueRealMetric.

References name_static().

◆ name_static()

std::string core::simple_metrics::per_residue_metrics::PerResidueClashMetric::name_static ( )
static

◆ parse_my_tag()

void core::simple_metrics::per_residue_metrics::PerResidueClashMetric::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap data 
)
overridevirtual

◆ provide_xml_schema()

void core::simple_metrics::per_residue_metrics::PerResidueClashMetric::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static

◆ set_secondary_residue_selector()

void core::simple_metrics::per_residue_metrics::PerResidueClashMetric::set_secondary_residue_selector ( core::select::residue_selector::ResidueSelectorCOP  selector)

Set the Residue Selector to use for TO other residues.

References selector2_.

Referenced by parse_my_tag(), and PerResidueClashMetric().

◆ set_soft_dampening()

void core::simple_metrics::per_residue_metrics::PerResidueClashMetric::set_soft_dampening ( core::Real  dampening)

Set the dampening of the LJ to use for soft-clash. Default=.33.

References soft_clash_dampening_.

Referenced by parse_my_tag().

◆ set_use_hydrogens()

void core::simple_metrics::per_residue_metrics::PerResidueClashMetric::set_use_hydrogens ( bool  use_hydrogens)

Should we calculate only heavy-heavy atom clashes Default True.

References use_hydrogens_.

Referenced by parse_my_tag().

◆ set_use_soft_clash()

void core::simple_metrics::per_residue_metrics::PerResidueClashMetric::set_use_soft_clash ( bool  soft_clash_check)

When we calculate atom-atom distances using LJ distances, Default True.

When we calculate atom-atom distances using LJ distances,.

clash if distance < (atomI_LJ + atomJ_LJ)*(1 - soft_clash)

References use_soft_clash_.

Referenced by parse_my_tag().

Member Data Documentation

◆ lj_n_

core::Real core::simple_metrics::per_residue_metrics::PerResidueClashMetric::lj_n_ = pow( 2, 1.0/6 )
private

◆ selector2_

core::select::residue_selector::ResidueSelectorCOP core::simple_metrics::per_residue_metrics::PerResidueClashMetric::selector2_ = nullptr
private

◆ soft_clash_dampening_

core::Real core::simple_metrics::per_residue_metrics::PerResidueClashMetric::soft_clash_dampening_ = .33
private

◆ use_hydrogens_

bool core::simple_metrics::per_residue_metrics::PerResidueClashMetric::use_hydrogens_ = false
private

◆ use_soft_clash_

bool core::simple_metrics::per_residue_metrics::PerResidueClashMetric::use_soft_clash_ = true
private

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