Rosetta
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
core::pack::interaction_graph::SurfacePotential Class Reference

With the traditional scoring hierarchy, classes like this one are created and accessed via the ScoringManager, which is itself a Singleton class. These "potential" classes are only created and initialized when the use of the EnergyMethod these classes correspond is encountered. No point in reading database files for a term if that term is not being used in some score function. However, the surface energy is used when users specify they want to use it on the command line - NOT via a score function. The score/energy is done within an interaction graph. One might ask why I just don't put the logic for reading in the database file to the interaction graph init methods. However, there will be cases where I will want to just score a protein (and not do any design) where I will want the database file to be read in. Scoring doesn't use interaction graphs, so if the code for that was located there, these values would not be read in. Instead, I've decided to implement this as its own separate class. It uses the Singleton design pattern so the database will only get read in once during a run. More...

#include <SurfacePotential.hh>

Inheritance diagram for core::pack::interaction_graph::SurfacePotential:
Inheritance graph
[legend]

Public Member Functions

Real average_residue_hASA (chemical::AA aa_type, Size num_nbs)
 Returns the average surface energy for the given residue type and number of neighbors. More...
 
Real hASA_patch_energy (Real patch_area, Size num_nbs)
 Returns the energy for a given patch size. The calling function must ensure that an out-of-bounds error will not occur. More...
 
void compute_residue_surface_energy (conformation::Residue const &rsd, pose::Pose const &pose, scoring::EnergyMap &emap, Size resid, utility::vector1< Size > num_neighbors_)
 Calculates the surface energy for a single residue within a Pose object. Used only by the RotamerSet_::compute_one_body_energy_maps function (which, in turn, is only used by the optE protocol). Nowhere else in mini is this function used. More...
 
void compute_pose_surface_energy (pose::Pose const &pose, Real &surface_energy_)
 helper method for computing surface score. in the optE protocol we don't care about the total vs. residue level surface scores. so just call that function but discard the values for those variables. More...
 
void compute_pose_surface_energy (pose::Pose const &pose, Real &total_surface_energy_, utility::vector1< Real > &residue_surface_energy_)
 
core::Real hpatch_score (core::Real patch_area)
 Returns the score for a given patch size. The calling function must ensure that an out-of-bounds error will not occur. More...
 
Real compute_pose_hpatch_score (pose::Pose const &pose)
 return the hpatch score for an entire pose More...
 
void compute_pose_hpatch_score (pose::Pose const &pose, Real &total_hpatch_energy_, std::map< core::Size, std::pair< core::Real, core::Real > > &patch_scores_, std::map< core::Size, utility::vector1< id::AtomID > > &atoms_in_patches_)
 Uses the src/core/pack/interaction_graph/RotamerDots classes to determine exact SASAs and then uses a graph-based approach to find all the exposed hydrophobic patches on the surface of the pose. Uses the scores in the file scoring/score_functions/SurfacePotential/hpatch_score.txt to assign a score to each patch and puts the score into the passed in Real. More...
 

Static Public Attributes

static const core::Size MAX_HPATCH_AREA = 1000
 
static const core::Real MAX_HPATCH_SCORE = 100.0
 
static const core::Size HPATCH_SCORE_BIN_SIZE = 50
 

Private Member Functions

 SurfacePotential ()
 private constructor More...
 
void read_average_res_hASA_database_file ()
 Reads in the database file which contains average residue hydrophobic accessible surface areas. More...
 
void read_hASA_score_database_file ()
 Reads in the database file which contains the scores for a distribution of patch sizes. More...
 
void read_hpatch_score_database_file ()
 Reads in the database file for the hpatch score, yet another version of the surface energy. More...
 

Private Attributes

utility::vector1< utility::vector1< Real > > res_to_average_hASA_
 
std::vector< utility::vector1< Real > > hASA_to_score_
 
std::vector< core::Realpatcharea_to_score_
 

Static Private Attributes

static const core::Size MAX_PATCH_SURFACE_AREA = 1200
 
static const core::Real MAX_SURFACE_ENERGY = 25.0
 
static const core::Size SURFACE_EXPOSED_CUTOFF = 20
 
static const core::Real INTERACTION_RADIUS = 10.0
 
static const core::Size SURFACE_SCORE_BIN_SIZE = 25
 
static const core::Size BURIED_RESIDUE_NO_HSASA_CUTOFF = 24
 

Friends

class utility::SingletonBase< SurfacePotential >
 

Detailed Description

With the traditional scoring hierarchy, classes like this one are created and accessed via the ScoringManager, which is itself a Singleton class. These "potential" classes are only created and initialized when the use of the EnergyMethod these classes correspond is encountered. No point in reading database files for a term if that term is not being used in some score function. However, the surface energy is used when users specify they want to use it on the command line - NOT via a score function. The score/energy is done within an interaction graph. One might ask why I just don't put the logic for reading in the database file to the interaction graph init methods. However, there will be cases where I will want to just score a protein (and not do any design) where I will want the database file to be read in. Scoring doesn't use interaction graphs, so if the code for that was located there, these values would not be read in. Instead, I've decided to implement this as its own separate class. It uses the Singleton design pattern so the database will only get read in once during a run.

Constructor & Destructor Documentation

◆ SurfacePotential()

core::pack::interaction_graph::SurfacePotential::SurfacePotential ( )
private

private constructor

private constructor to guarantee the singleton

References read_average_res_hASA_database_file(), read_hASA_score_database_file(), and read_hpatch_score_database_file().

Member Function Documentation

◆ average_residue_hASA()

Real core::pack::interaction_graph::SurfacePotential::average_residue_hASA ( chemical::AA  aa_type,
Size  num_nbs 
)

Returns the average surface energy for the given residue type and number of neighbors.

References BURIED_RESIDUE_NO_HSASA_CUTOFF, core::chemical::num_canonical_aas, and res_to_average_hASA_.

Referenced by compute_pose_surface_energy(), and compute_residue_surface_energy().

◆ compute_pose_hpatch_score() [1/2]

Real core::pack::interaction_graph::SurfacePotential::compute_pose_hpatch_score ( pose::Pose const &  pose)

return the hpatch score for an entire pose

◆ compute_pose_hpatch_score() [2/2]

void core::pack::interaction_graph::SurfacePotential::compute_pose_hpatch_score ( pose::Pose const &  pose,
core::Real total_hpatch_score_,
std::map< core::Size, std::pair< core::Real, core::Real > > &  patch_scores_,
std::map< core::Size, utility::vector1< id::AtomID > > &  atoms_in_patches_ 
)

Uses the src/core/pack/interaction_graph/RotamerDots classes to determine exact SASAs and then uses a graph-based approach to find all the exposed hydrophobic patches on the surface of the pose. Uses the scores in the file scoring/score_functions/SurfacePotential/hpatch_score.txt to assign a score to each patch and puts the score into the passed in Real.

Note: If a Pose object has overlapping atoms anywhere, then this function will fail with the following error:

sin_cos_range ERROR: nan is outside of [-1,+1] sin and cos value legal range sin_cos_range ERROR: nan is outside of [-1,+1] sin and cos value legal range ERROR:: Exit from: src/numeric/trig.functions.hh line: 117

References core::conformation::Residue::atom_name(), core::chemical::ResidueType::atom_type(), core::id::AtomID::atomno(), core::conformation::Residue::clone(), core::pose::Pose::conformation(), core::chemical::AtomType::element(), hpatch_score(), core::pose::initialize_atomid_map(), core::conformation::Residue::is_protein(), MAX_HPATCH_AREA, MAX_HPATCH_SCORE, core::conformation::Residue::nheavyatoms(), core::chemical::ResidueType::nheavyatoms(), core::pose::Pose::pdb_info(), core::pose::pose_max_nbr_radius(), core::pack::interaction_graph::RotamerDots::probe_radius_, core::pose::Pose::residue(), core::conformation::residue_point_graph_from_conformation(), core::pose::Pose::residue_type(), core::id::AtomID_Map< T >::resize(), core::id::AtomID::rsd(), protocols::hybridization::score, core::conformation::Residue::seqpos(), core::pose::Pose::size(), and core::pack::interaction_graph::TR().

◆ compute_pose_surface_energy() [1/2]

void core::pack::interaction_graph::SurfacePotential::compute_pose_surface_energy ( pose::Pose const &  pose,
Real surface_energy_ 
)

helper method for computing surface score. in the optE protocol we don't care about the total vs. residue level surface scores. so just call that function but discard the values for those variables.

◆ compute_pose_surface_energy() [2/2]

void core::pack::interaction_graph::SurfacePotential::compute_pose_surface_energy ( pose::Pose const &  pose,
Real total_surface_energy_,
utility::vector1< Real > &  residue_surface_energy_ 
)

◆ compute_residue_surface_energy()

void core::pack::interaction_graph::SurfacePotential::compute_residue_surface_energy ( conformation::Residue const &  rsd,
pose::Pose const &  pose,
scoring::EnergyMap emap,
Size  resid,
utility::vector1< Size num_neighbors_ 
)

◆ hASA_patch_energy()

Real core::pack::interaction_graph::SurfacePotential::hASA_patch_energy ( Real  patch_area,
Size  num_nbs 
)

Returns the energy for a given patch size. The calling function must ensure that an out-of-bounds error will not occur.

References hASA_to_score_, MAX_PATCH_SURFACE_AREA, and SURFACE_SCORE_BIN_SIZE.

Referenced by compute_pose_surface_energy(), and compute_residue_surface_energy().

◆ hpatch_score()

Real core::pack::interaction_graph::SurfacePotential::hpatch_score ( core::Real  patch_area)

Returns the score for a given patch size. The calling function must ensure that an out-of-bounds error will not occur.

References HPATCH_SCORE_BIN_SIZE, MAX_HPATCH_AREA, and patcharea_to_score_.

Referenced by compute_pose_hpatch_score().

◆ read_average_res_hASA_database_file()

void core::pack::interaction_graph::SurfacePotential::read_average_res_hASA_database_file ( )
private

Reads in the database file which contains average residue hydrophobic accessible surface areas.

References core::chemical::aa_from_name(), core::chemical::name_from_aa(), core::chemical::num_canonical_aas, res_to_average_hASA_, and core::pack::interaction_graph::TR().

Referenced by SurfacePotential().

◆ read_hASA_score_database_file()

void core::pack::interaction_graph::SurfacePotential::read_hASA_score_database_file ( )
private

Reads in the database file which contains the scores for a distribution of patch sizes.

Not assuming any particular length to the database file so that if I want to increase the maximum of the distribution or shrink it, the vector will dynamically resize to what it needs to be.

References hASA_to_score_, protocols::hybridization::score, and core::pack::interaction_graph::TR().

Referenced by SurfacePotential().

◆ read_hpatch_score_database_file()

void core::pack::interaction_graph::SurfacePotential::read_hpatch_score_database_file ( )
private

Reads in the database file for the hpatch score, yet another version of the surface energy.

Not assuming any particular length to the database file so that if I want to increase the maximum of the distribution or shrink it, the vector will dynamically resize to what it needs to be.

References patcharea_to_score_, protocols::hybridization::score, and core::pack::interaction_graph::TR().

Referenced by SurfacePotential().

Friends And Related Function Documentation

◆ utility::SingletonBase< SurfacePotential >

friend class utility::SingletonBase< SurfacePotential >
friend

Member Data Documentation

◆ BURIED_RESIDUE_NO_HSASA_CUTOFF

const core::Size core::pack::interaction_graph::SurfacePotential::BURIED_RESIDUE_NO_HSASA_CUTOFF = 24
staticprivate

◆ hASA_to_score_

std::vector< utility::vector1 < Real > > core::pack::interaction_graph::SurfacePotential::hASA_to_score_
private

◆ HPATCH_SCORE_BIN_SIZE

const core::Size core::pack::interaction_graph::SurfacePotential::HPATCH_SCORE_BIN_SIZE = 50
static

Referenced by hpatch_score().

◆ INTERACTION_RADIUS

const core::Real core::pack::interaction_graph::SurfacePotential::INTERACTION_RADIUS = 10.0
staticprivate

◆ MAX_HPATCH_AREA

const core::Size core::pack::interaction_graph::SurfacePotential::MAX_HPATCH_AREA = 1000
static

◆ MAX_HPATCH_SCORE

const core::Real core::pack::interaction_graph::SurfacePotential::MAX_HPATCH_SCORE = 100.0
static

◆ MAX_PATCH_SURFACE_AREA

const core::Size core::pack::interaction_graph::SurfacePotential::MAX_PATCH_SURFACE_AREA = 1200
staticprivate

◆ MAX_SURFACE_ENERGY

const core::Real core::pack::interaction_graph::SurfacePotential::MAX_SURFACE_ENERGY = 25.0
staticprivate

◆ patcharea_to_score_

std::vector< core::Real > core::pack::interaction_graph::SurfacePotential::patcharea_to_score_
private

◆ res_to_average_hASA_

utility::vector1< utility::vector1 < Real > > core::pack::interaction_graph::SurfacePotential::res_to_average_hASA_
private

◆ SURFACE_EXPOSED_CUTOFF

const core::Size core::pack::interaction_graph::SurfacePotential::SURFACE_EXPOSED_CUTOFF = 20
staticprivate

◆ SURFACE_SCORE_BIN_SIZE

const core::Size core::pack::interaction_graph::SurfacePotential::SURFACE_SCORE_BIN_SIZE = 25
staticprivate

Referenced by hASA_patch_energy().


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