Rosetta
|
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>
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::Real > | calculate (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 |
![]() | |
PerResidueRealMetric () | |
~PerResidueRealMetric () override | |
PerResidueRealMetric (PerResidueRealMetric const &other) | |
PerResidueRealMetric & | operator= (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::Real > | cached_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... | |
![]() | |
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... | |
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 void | add_schema (utility::tag::XMLSchemaComplexTypeGeneratorOP complex_schema) |
Add options to the schema from this base class. More... | |
![]() | |
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 ) |
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.
core::simple_metrics::per_residue_metrics::PerResidueClashMetric::PerResidueClashMetric | ( | ) |
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().
|
default |
Copy constructor (not needed unless you need deep copies)
Copy constructor.
|
override |
Destructor (important for properly forward-declaring smart-pointer members)
|
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().
|
overridevirtual |
Implements core::simple_metrics::PerResidueRealMetric.
References PerResidueClashMetric().
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 |
Are these atoms clashing using soft or hard definition?
References core::conformation::Residue::atom_name(), core::conformation::Residue::atom_type(), core::chemical::AtomType::lj_radius(), lj_radius_to_zero_e_radius(), core::pose::Pose::pdb_info(), core::pose::Pose::residue(), soft_clash_dampening_, TR(), use_soft_clash_, and core::conformation::Residue::xyz().
Referenced by calculate().
|
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().
|
overridevirtual |
Name of the metric.
Implements core::simple_metrics::PerResidueRealMetric.
|
overridevirtual |
|
static |
Name of the class for creator.
Referenced by core::simple_metrics::per_residue_metrics::PerResidueClashMetricCreator::keyname(), name(), and provide_xml_schema().
|
overridevirtual |
called by parse_my_tag – should not be used directly
Implements core::simple_metrics::PerResidueRealMetric.
References core::simple_metrics::SimpleMetric::parse_base_tag(), core::simple_metrics::PerResidueRealMetric::parse_per_residue_tag(), core::select::residue_selector::parse_residue_selector(), set_secondary_residue_selector(), set_soft_dampening(), set_use_hydrogens(), set_use_soft_clash(), soft_clash_dampening_, use_hydrogens_, and use_soft_clash_.
|
static |
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().
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().
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().
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().
|
private |
Referenced by lj_radius_to_zero_e_radius().
|
private |
Referenced by calculate(), and set_secondary_residue_selector().
|
private |
Referenced by calculate(), is_clashing(), parse_my_tag(), and set_soft_dampening().
|
private |
Referenced by calculate(), parse_my_tag(), and set_use_hydrogens().
|
private |
Referenced by is_clashing(), parse_my_tag(), and set_use_soft_clash().