Rosetta Protocols  2015.22
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
protocols::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator Class Reference

#include <SHOBuriedUnsatisfiedPolarsCalculator.hh>

Public Member Functions

 SHOBuriedUnsatisfiedPolarsCalculator (Real sho_cutoff, std::string tgt_amino, std::string tgt_atom, core::scoring::ScoreFunctionCOP sfxn)
 constructs the calculator for a target atom in residues of a target amino acid type More...
 
 SHOBuriedUnsatisfiedPolarsCalculator (Real sho_cutoff, utility::vector1< Size > const &tgt_res_idxs, core::scoring::ScoreFunctionCOP sfxn)
 constructs the calculator for a target residue More...
 
core::pose::metrics::PoseMetricCalculatorOP clone () const
 clones this calculator More...
 
utility::vector1< AtomID > const & burunsat_atoms ()
 returns the set of target atoms classified as "buried unsatisfied" More...
 
utility::vector1< 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...
 
Real hbond_energy (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 ()
 
void get (std::string const &key, basic::MetricValueBase &val, Pose const &this_pose)
 
std::string get (std::string const &key, Pose const &this_pose)
 

Protected Member Functions

void lookup (std::string const &key, basic::MetricValueBase *valptr) const
 outputs a quantity's value that is cached in the calculator More...
 
std::string print (std::string const &key) const
 returns the string representation of a quantity's value that is cached in the calculator More...
 
void recompute (core::pose::Pose const &ps)
 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, 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 (AtomID aid)
 assigns an atom to either the "buried unsatisfied" class or the "other" class More...
 
bool is_buried (AtomID aid)
 is aid buried? More...
 
bool is_unsat (AtomID aid) const
 is aid unsatisfied? More...
 
void print_atom_subset (utility::vector1< AtomID > const &subset, core::pose::Pose const &ps) const
 prints info on a subset of atoms More...
 
Real get_average_energy (utility::vector1< AtomID > const &subset, std::map< AtomID, Real > &sho_energies) const
 returns the average SHO energy of a subset of atoms More...
 
void print_atom_info (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< 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::HBondSet hbond_set_
 stores H-bond info for the entire pose More...
 
std::map< AtomID, Realsho_energies_
 stores the SHO energies of all polar atoms in the pose More...
 
utility::vector1< AtomIDburunsat_atoms_
 set of buried unsatisfied atoms More...
 
Size num_burunsat_atoms_
 number of buried unsatisfied atoms More...
 
utility::vector1< AtomIDother_atoms_
 set of atoms that are NOT buried unsatisfied More...
 
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::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::SHOBuriedUnsatisfiedPolarsCalculator ( core::Real  sho_cutoff,
std::string  tgt_amino,
std::string  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). [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, create_ExactSHOEnergy_from_cmdline(), search_typ_, TGT_AA__TGT_ATOM, and tgt_amino_.

Referenced by clone().

protocols::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::SHOBuriedUnsatisfiedPolarsCalculator ( Real  sho_cutoff,
utility::vector1< 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). [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, create_ExactSHOEnergy_from_cmdline(), search_typ_, TGT_RES, and tgt_res_idxs_.

Member Function Documentation

void protocols::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::assign_atom ( 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<AtomID> const& protocols::toolbox::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::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::clone ( ) const

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.

References SHOBuriedUnsatisfiedPolarsCalculator().

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

returns the average SHO energy of a subset of atoms

Real protocols::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::hbond_energy ( AtomID  aid,
core::pose::Pose const &  ps 
) const
bool protocols::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::is_buried ( 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::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::is_unsat ( AtomID  aid) const
private

is aid unsatisfied?

is atom aid unsatisfied?

Parameters
[in]aid

References hbond_set_, and core::scoring::hbonds::HBondSet::nhbonds().

Referenced by assign_atom().

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

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 basic::check_cast(), basic::Error(), num_burunsat_atoms_, and utility_exit.

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

returns the set of target atoms classified as "other"

References other_atoms_.

void protocols::toolbox::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(), aa_from_oneletter_code(), ALL_ATOMS, ANY_AA__TGT_ATOM, assign_atom(), core::conformation::Residue::atom_index(), core::conformation::Residue::has(), N, core::pose::Pose::residue(), residue_partition(), search_typ_, TGT_AA__TGT_ATOM, tgt_amino_, tgt_atom_, TGT_RES, tgt_res_idxs_, and core::pose::Pose::total_residue().

Referenced by recompute().

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

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 basic::Error(), num_burunsat_atoms_, utility::to_string(), and utility_exit.

void protocols::toolbox::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::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::print_atom_info ( 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::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::print_atom_subset ( utility::vector1< 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::scoring::geometric_solvation::LK_MATCHING_WEIGHT_EXACT, N, core::scoring::hbonds::HBondSet::nhbonds(), core::scoring::occ_sol_exact, print_atom_info(), sfxn_, and sho_energies_.

Referenced by print_all_info().

void protocols::toolbox::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 N, core::conformation::Residue::natoms(), print_atom_info(), core::pose::Pose::residue(), sho_energies_, and core::pose::Pose::total_residue().

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

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::scoring::hbonds::fill_hbond_set(), hbond_set_, core::conformation::Residue::Hpos_polar(), N, num_burunsat_atoms_, num_other_atoms_, other_atoms_, partition(), core::pose::Pose::residue(), sho_energies_, sho_meth_, and core::pose::Pose::total_residue().

Referenced by recompute_and_print().

void protocols::toolbox::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

References print_all_info(), and recompute().

void protocols::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::residue_partition ( core::pose::Pose const &  ps,
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<AtomID> protocols::toolbox::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::HBondSet protocols::toolbox::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().

Size protocols::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::num_burunsat_atoms_
private

number of buried unsatisfied atoms

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

Size protocols::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::num_other_atoms_
private

number of atoms that are NOT buried unsatisfied

Referenced by recompute().

utility::vector1<AtomID> protocols::toolbox::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::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::search_typ_
private

selected type of search

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

core::scoring::ScoreFunctionCOP protocols::toolbox::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::toolbox::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<AtomID, Real> protocols::toolbox::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::toolbox::pose_metric_calculators::SHOBuriedUnsatisfiedPolarsCalculator::sho_meth_
private

SHO energy calculator.

Referenced by recompute().

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

target amino acid type

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

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

target atom type

Referenced by partition(), and print_all_info().

utility::vector1<Size> protocols::toolbox::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: