Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator Class Reference

#include <SHOBuriedUnsatisfiedPolarsCalculator.hh>

Inheritance diagram for protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator:
Inheritance graph
[legend]

Public Member Functions

 SHOBuriedUnsatisfiedPolarsCalculator (core::Real sho_cutoff, std::string const &tgt_amino, std::string const &tgt_atom, core::scoring::ScoreFunctionCOP sfxn)
 constructs the calculator for a target atom in residues of a target amino acid type More...
 
 SHOBuriedUnsatisfiedPolarsCalculator (core::Real sho_cutoff, utility::vector1< core::Size > const &tgt_res_idxs, core::scoring::ScoreFunctionCOP sfxn)
 constructs the calculator for a target residue More...
 
core::pose::metrics::PoseMetricCalculatorOP clone () const override
 clones this calculator More...
 
utility::vector1
< core::id::AtomID > const & 
burunsat_atoms ()
 returns the set of target atoms classified as "buried unsatisfied" More...
 
utility::vector1
< core::id::AtomID > const & 
other_atoms ()
 returns the set of target atoms classified as "other" More...
 
void print_all_info (core::pose::Pose const &ps) const
 prints all information in this calculator More...
 
core::Real hbond_energy (core::id::AtomID aid, core::pose::Pose const &ps) const
 returns the total H-bond energy of an atom More...
 
void recompute_and_print (core::pose::Pose const &ps)
 recomputes all data from scratch and prints it to screen More...
 
- Public Member Functions inherited from core::pose::metrics::StructureDependentCalculator
 StructureDependentCalculator ()
 
void notify_structure_change () override
 
void get (std::string const &key, basic::MetricValueBase &val, Pose const &this_pose) override
 
std::string get (std::string const &key, Pose const &this_pose) override
 
- Public Member Functions inherited from core::pose::metrics::PoseMetricCalculator
 PoseMetricCalculator ()
 
virtual void notify_energy_change ()
 

Protected Member Functions

void lookup (std::string const &key, basic::MetricValueBase *valptr) const override
 outputs a quantity's value that is cached in the calculator More...
 
std::string print (std::string const &key) const override
 returns the string representation of a quantity's value that is cached in the calculator More...
 
void recompute (core::pose::Pose const &ps) override
 finds buried unsatisfied atoms by building all needed data structures from scratch More...
 

Private Types

enum  SearchTyp { ANY_AA__TGT_ATOM, TGT_AA__TGT_ATOM, ALL_ATOMS, TGT_RES }
 identifiers for the allowed types of search More...
 

Private Member Functions

void partition (core::pose::Pose const &ps)
 partitions target atoms into "buried unsatisfied" and "other" More...
 
void residue_partition (core::pose::Pose const &ps, core::Size tgtidx)
 partitions a target residue's atoms into "buried unsatisfied" and "other" More...
 
void print_sho_energies (core::pose::Pose const &ps)
 prints on screen the SHO energies of all atoms in a pose More...
 
void assign_atom (core::id::AtomID aid)
 assigns an atom to either the "buried unsatisfied" class or the "other" class More...
 
bool is_buried (core::id::AtomID aid)
 is aid buried? More...
 
bool is_unsat (core::id::AtomID aid) const
 is aid unsatisfied? More...
 
void print_atom_subset (utility::vector1< core::id::AtomID > const &subset, core::pose::Pose const &ps) const
 prints info on a subset of atoms More...
 
core::Real get_average_energy (utility::vector1< core::id::AtomID > const &subset, std::map< core::id::AtomID, core::Real > &sho_energies) const
 returns the average SHO energy of a subset of atoms More...
 
void print_atom_info (core::id::AtomID aid, core::pose::Pose const &ps) const
 prints an atom's identifier on screen More...
 

Private Attributes

SearchTyp search_typ_
 selected type of search More...
 
core::scoring::geometric_solvation::ExactOccludedHbondSolEnergyOP sho_meth_
 SHO energy calculator. More...
 
core::Real sho_cutoff_
 maximum SHO energy value for a polar group to be considered as exposed (i.e., not buried) More...
 
utility::vector1< core::Sizetgt_res_idxs_
 target residue indexes More...
 
std::string tgt_amino_
 target amino acid type More...
 
std::string tgt_atom_
 target atom type More...
 
core::scoring::hbonds::HBondSetCOP hbond_set_
 stores H-bond info for the entire pose More...
 
std::map< core::id::AtomID,
core::Real
sho_energies_
 stores the SHO energies of all polar atoms in the pose More...
 
utility::vector1
< core::id::AtomID
burunsat_atoms_
 set of buried unsatisfied atoms More...
 
core::Size num_burunsat_atoms_
 number of buried unsatisfied atoms More...
 
utility::vector1
< core::id::AtomID
other_atoms_
 set of atoms that are NOT buried unsatisfied More...
 
core::Size num_other_atoms_
 number of atoms that are NOT buried unsatisfied More...
 
core::scoring::ScoreFunctionCOP sfxn_
 score function used to (previously) score the pose More...
 

Member Enumeration Documentation

identifiers for the allowed types of search

Enumerator
ANY_AA__TGT_ATOM 
TGT_AA__TGT_ATOM 
ALL_ATOMS 
TGT_RES 

Constructor & Destructor Documentation

protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::SHOBuriedUnsatisfiedPolarsCalculator ( core::Real  sho_cutoff,
std::string const &  tgt_amino,
std::string const &  tgt_atom,
core::scoring::ScoreFunctionCOP  sfxn 
)

constructs the calculator for a target atom in residues of a target amino acid type

constructs the calculator for a target atom in residues of a target amino acid type.

[in] sho_cutoff maximum SHO energy value for a polar group to be considered as exposed (i.e., not buried). It must be expressed in original SHO units. [in] tgt_amino target amino acid type [in] tgt_atom target atom name [in] sfxn score function used to (previously) score the pose

The SHO method is initialized as in ExactOccludedHbondSolEnergyCreator::create_energy_method() for consistency with any scoring functions using SHO.

References ANY_AA__TGT_ATOM, search_typ_, TGT_AA__TGT_ATOM, and tgt_amino_.

Referenced by clone().

protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::SHOBuriedUnsatisfiedPolarsCalculator ( core::Real  sho_cutoff,
utility::vector1< core::Size > const &  tgt_res_idxs,
core::scoring::ScoreFunctionCOP  sfxn 
)

constructs the calculator for a target residue

constructs the calculator for a target residue set.

[in] sho_cutoff maximum SHO energy value for a polar group to be considered as exposed (i.e., not buried). It must be expressed in original SHO units. [in] tgt_res_idxs set of target residue indexes. An empty set means "all residues". [in] sfxn score function used to (previously) score the pose

The SHO method is initialized as in ExactOccludedHbondSolEnergyCreator::create_energy_method() for consistency with any scoring functions using SHO.

References ALL_ATOMS, search_typ_, TGT_RES, and tgt_res_idxs_.

Member Function Documentation

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::assign_atom ( core::id::AtomID  aid)
private

assigns an atom to either the "buried unsatisfied" class or the "other" class

Parameters
[in]aidthe atom

References burunsat_atoms_, is_buried(), is_unsat(), and other_atoms_.

Referenced by partition(), and residue_partition().

utility::vector1<core::id::AtomID> const& protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::burunsat_atoms ( )
inline

returns the set of target atoms classified as "buried unsatisfied"

References burunsat_atoms_.

core::pose::metrics::PoseMetricCalculatorOP protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::clone ( ) const
overridevirtual

clones this calculator

members sho_meth_ and sfxn_ of the clone will point, respectively, to the same objects as members sho_meth_ and sfxn_ of this calculator.

Implements core::pose::metrics::PoseMetricCalculator.

References SHOBuriedUnsatisfiedPolarsCalculator().

core::Real protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::get_average_energy ( utility::vector1< core::id::AtomID > const &  subset,
std::map< core::id::AtomID, core::Real > &  sho_energies 
) const
private

returns the average SHO energy of a subset of atoms

Real protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::hbond_energy ( core::id::AtomID  aid,
core::pose::Pose const &  ps 
) const

returns the total H-bond energy of an atom

returns the total H-bond energy of an atom.

Parameters
[in]aidAtomID of the atom
[in]pspose to which the atom belongs

the total H-bond energy of the atom is defined as half the sum of the weighted energies of the H-bonds that it forms.

References core::conformation::Residue::atom_base(), core::scoring::hbonds::HBEvalTuple::eval_type(), core::scoring::hbonds::get_hbond_weight_type(), core::scoring::hbond_bb_sc, core::scoring::hbond_lr_bb, core::scoring::hbond_sc, hbond_set_, core::scoring::hbond_sr_bb, core::scoring::hbonds::hbw_LR_BB, core::scoring::hbonds::hbw_LR_BB_SC, core::scoring::hbonds::hbw_NONE, core::scoring::hbonds::hbw_SC, core::scoring::hbonds::hbw_SR_BB, core::scoring::hbonds::hbw_SR_BB_SC, core::chemical::element::N, core::pose::Pose::residue(), and sfxn_.

Referenced by print_atom_subset().

bool protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::is_buried ( core::id::AtomID  aid)
private

is aid buried?

is atom aid buried?

Parameters
[in]aid

References sho_cutoff_, and sho_energies_.

Referenced by assign_atom().

bool protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::is_unsat ( core::id::AtomID  aid) const
private

is aid unsatisfied?

is atom aid unsatisfied?

Parameters
[in]aid

References hbond_set_.

Referenced by assign_atom().

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::lookup ( std::string const &  key,
basic::MetricValueBase *  valptr 
) const
overrideprotectedvirtual

outputs a quantity's value that is cached in the calculator

Parameters
[in]keyidentifier of the quantity
[out]valptrstorage for the value

Implements core::pose::metrics::StructureDependentCalculator.

References num_burunsat_atoms_.

utility::vector1<core::id::AtomID> const& protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::other_atoms ( )
inline

returns the set of target atoms classified as "other"

References other_atoms_.

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::partition ( core::pose::Pose const &  ps)
private

partitions target atoms into "buried unsatisfied" and "other"

partitions target atoms into "buried unsatisfied" and "other".

[in] ps the pose at issue

At the end of this function burunsat_atoms_[i] will contain the identifier of the ith target atom for which functions is_buried() and is_unsat() are both true (i=1,...N, where N is the number of such atoms).

At the end of this function other_atoms_[i] will contain the identifier of the ith target atom for which either function is_buried() or function is_unsat() are false (i=1,...,M, where M is the number of such atoms)

In the above description, target atoms are assumed to be ordered by pose residue number under options ALL_ATOMS, TGT_AA__TGT_ATOM, and ANY_AA__TGT_ATOM, and by index in tgt_res_idxs_ under option TGT_RES.

References core::conformation::Residue::aa(), core::chemical::aa_from_oneletter_code(), ALL_ATOMS, ANY_AA__TGT_ATOM, assign_atom(), core::conformation::Residue::atom_index(), core::conformation::Residue::has(), core::chemical::element::N, core::pose::Pose::residue(), residue_partition(), search_typ_, core::pose::Pose::size(), TGT_AA__TGT_ATOM, tgt_amino_, tgt_atom_, TGT_RES, and tgt_res_idxs_.

Referenced by recompute().

std::string protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::print ( std::string const &  key) const
overrideprotectedvirtual

returns the string representation of a quantity's value that is cached in the calculator

Parameters
[in]keyidentifier of the quantity

Implements core::pose::metrics::StructureDependentCalculator.

References num_burunsat_atoms_, and core::id::to_string().

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::print_all_info ( core::pose::Pose const &  ps) const

prints all information in this calculator

[in] ps the pose at issue

References ALL_ATOMS, burunsat_atoms_, other_atoms_, print_atom_subset(), search_typ_, sho_cutoff_, tgt_amino_, tgt_atom_, and tgt_res_idxs_.

Referenced by recompute_and_print().

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::print_atom_info ( core::id::AtomID  aid,
core::pose::Pose const &  ps 
) const
private

prints an atom's identifier on screen

Parameters
[in]aidAtomID of the atom
[in]pspose containing the atom

References core::id::AtomID::atomno(), core::pose::Pose::pdb_info(), core::pose::Pose::residue(), and core::id::AtomID::rsd().

Referenced by print_atom_subset(), and print_sho_energies().

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::print_atom_subset ( utility::vector1< core::id::AtomID > const &  subset,
core::pose::Pose const &  ps 
) const
private

prints info on a subset of atoms

prints on screen info about the SHO energy and the hydrogen bonds of each atom in a subset (i.e., either the "buried unsatisfied" atoms or the "other" atoms).

Parameters
[in]subsetthe subset of atoms
[in]psthe pose containing the subset of atoms

The ith output line contains the identifier of the ith atom in the subset followed by its SHO energy and hydrogen bond info (i=1,...,N, where N is the number of atoms in the subset).

References hbond_energy(), hbond_set_, core::chemical::element::N, core::scoring::occ_sol_exact, print_atom_info(), sfxn_, and sho_energies_.

Referenced by print_all_info().

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::print_sho_energies ( core::pose::Pose const &  ps)
private

prints on screen the SHO energies of all atoms in a pose

Parameters
[in]ps the pose

The output can be seen as a sequence of N blocks, where N is the number of residues in the pose. Block i contains the energies of residue i (i=1,...N). Within block i, line j contains the energy of atom j (j=1,...,M(i), where M(i) is the number of atoms in residue i). Each energy is preceded by the atom's identifier.

References core::chemical::element::N, core::conformation::Residue::natoms(), print_atom_info(), core::pose::Pose::residue(), sho_energies_, and core::pose::Pose::size().

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::recompute ( core::pose::Pose const &  ps)
overrideprotectedvirtual

finds buried unsatisfied atoms by building all needed data structures from scratch

finds buried unsatisfied atoms by building all needed data structures from scratch.

Parameters
[in]pspose for which the data are to be computed

Implements core::pose::metrics::StructureDependentCalculator.

References core::conformation::Residue::accpt_pos(), burunsat_atoms_, core::conformation::Residue::Hpos_polar(), core::chemical::element::N, num_burunsat_atoms_, num_other_atoms_, other_atoms_, partition(), core::pose::Pose::residue(), sho_energies_, sho_meth_, and core::pose::Pose::size().

Referenced by recompute_and_print().

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::recompute_and_print ( core::pose::Pose const &  ps)

recomputes all data from scratch and prints it to screen

Parameters
[in]pspose for which the data are to be computed

the pose must already have been scored by the score function pointed to by sfxn_.

References hbond_set_, print_all_info(), recompute(), and sho_meth_.

void protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::residue_partition ( core::pose::Pose const &  ps,
core::Size  tgtidx 
)
private

partitions a target residue's atoms into "buried unsatisfied" and "other"

partitions a target residue's polar atoms into "buried unsatisfied" and "other"

[in] ps the pose at issue [in] tgtidx pose index of the target residue

At the end of this function, burunsat_atoms_[B+i] will contain the ith polar atom in the target residue for which functions is_buried() and is_unsat() are both true (i=1,...N, where N is the number of such atoms; B is the size of burunsat_atoms_ before this function is called).

At the end of this function, other_atoms_[P+i] will contain the ith polar atom in the target residue for which either function is_buried() or function is_unsat() are false (i=1,...M, where M is the number of such atoms; P is the size of other_atoms_ before this function is called).

As to the ordering of atoms, donors are assumed to precede acceptors, donors follow the order specified by Hpos_polar(), and acceptors follow the order specified by accpt_pos().

References core::conformation::Residue::accpt_pos(), assign_atom(), core::conformation::Residue::Hpos_polar(), and core::pose::Pose::residue().

Referenced by partition().

Member Data Documentation

utility::vector1<core::id::AtomID> protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::burunsat_atoms_
private

set of buried unsatisfied atoms

Referenced by assign_atom(), burunsat_atoms(), print_all_info(), and recompute().

core::scoring::hbonds::HBondSetCOP protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::hbond_set_
private

stores H-bond info for the entire pose

Referenced by hbond_energy(), is_unsat(), print_atom_subset(), and recompute_and_print().

core::Size protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::num_burunsat_atoms_
private

number of buried unsatisfied atoms

Referenced by lookup(), print(), and recompute().

core::Size protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::num_other_atoms_
private

number of atoms that are NOT buried unsatisfied

Referenced by recompute().

utility::vector1<core::id::AtomID> protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::other_atoms_
private

set of atoms that are NOT buried unsatisfied

Referenced by assign_atom(), other_atoms(), print_all_info(), and recompute().

SearchTyp protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::search_typ_
private

selected type of search

Referenced by partition(), print_all_info(), and SHOBuriedUnsatisfiedPolarsCalculator().

core::scoring::ScoreFunctionCOP protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::sfxn_
private

score function used to (previously) score the pose

Referenced by hbond_energy(), and print_atom_subset().

core::Real protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::sho_cutoff_
private

maximum SHO energy value for a polar group to be considered as exposed (i.e., not buried)

Referenced by is_buried(), and print_all_info().

std::map<core::id::AtomID, core::Real> protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::sho_energies_
private

stores the SHO energies of all polar atoms in the pose

Referenced by is_buried(), print_atom_subset(), print_sho_energies(), and recompute().

core::scoring::geometric_solvation::ExactOccludedHbondSolEnergyOP protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::sho_meth_
private

SHO energy calculator.

Referenced by recompute(), and recompute_and_print().

std::string protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::tgt_amino_
private

target amino acid type

Referenced by partition(), print_all_info(), and SHOBuriedUnsatisfiedPolarsCalculator().

std::string protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::tgt_atom_
private

target atom type

Referenced by partition(), and print_all_info().

utility::vector1<core::Size> protocols::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::tgt_res_idxs_
private

target residue indexes

Referenced by partition(), print_all_info(), and SHOBuriedUnsatisfiedPolarsCalculator().


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