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

#include <SurfacePotential.hh>

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 Member Functions

static SurfacePotentialget_instance ()
 static function to get the instance of ( pointer to) this singleton class 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...
 

Static Private Member Functions

static SurfacePotentialcreate_singleton_instance ()
 private singleton creation function to be used with utility::thread::threadsafe_singleton 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 SurfacePotentialinstance_
 static data member holding pointer to the singleton class itself More...
 
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
 

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

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().

Referenced by create_singleton_instance().

Member Function Documentation

Real core::pack::interaction_graph::SurfacePotential::average_residue_hASA ( chemical::AA  aa_type,
Size  num_nbs 
)
Real core::pack::interaction_graph::SurfacePotential::compute_pose_hpatch_score ( pose::Pose const &  pose)

return the hpatch score for an entire pose

Referenced by core::pack::interaction_graph::HPatchEnergy::finalize_total_energy().

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.

compute_pose_hpatch_score

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(), numeric::xyzVector< class >::distance_squared(), core::graph::DisjointSets::ds_find(), core::graph::DisjointSets::ds_union(), core::chemical::AtomType::element(), hpatch_score(), core::pose::initialize_atomid_map(), core::conformation::Residue::is_protein(), MAX_HPATCH_AREA, MAX_HPATCH_SCORE, core::chemical::ResidueType::nheavyatoms(), core::conformation::Residue::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(), score, core::conformation::Residue::seqpos(), core::graph::DisjointSets::sets(), core::pose::Pose::total_residue(), core::pack::interaction_graph::TR, and utility::trim().

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

Referenced by core::pack::interaction_graph::SurfaceEnergy::finalize_total_energy().

void core::pack::interaction_graph::SurfacePotential::compute_pose_surface_energy ( pose::Pose const &  pose,
Real total_surface_energy_,
utility::vector1< Real > &  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_ 
)
SurfacePotential * core::pack::interaction_graph::SurfacePotential::create_singleton_instance ( )
staticprivate

private singleton creation function to be used with utility::thread::threadsafe_singleton

References SurfacePotential().

Referenced by get_instance().

SurfacePotential * core::pack::interaction_graph::SurfacePotential::get_instance ( )
static
Real core::pack::interaction_graph::SurfacePotential::hASA_patch_energy ( Real  patch_area,
Size  num_nbs 
)
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.

SurfacePotential::hpatch_score

References HPATCH_SCORE_BIN_SIZE, MAX_HPATCH_AREA, and patcharea_to_score_.

Referenced by core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::calculate_alt_state_hpatch_score(), and compute_pose_hpatch_score().

void core::pack::interaction_graph::SurfacePotential::read_average_res_hASA_database_file ( )
private
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.

Detailed:
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 utility::io::izstream::eof(), hASA_to_score_, basic::database::open(), score, and core::pack::interaction_graph::TR.

Referenced by SurfacePotential().

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.

Detailed:
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 utility::io::izstream::eof(), basic::database::open(), patcharea_to_score_, score, and core::pack::interaction_graph::TR.

Referenced by SurfacePotential().

Member Data Documentation

const core::Size core::pack::interaction_graph::SurfacePotential::BURIED_RESIDUE_NO_HSASA_CUTOFF = 24
staticprivate
std::vector< utility::vector1 < Real > > core::pack::interaction_graph::SurfacePotential::hASA_to_score_
private
const core::Size core::pack::interaction_graph::SurfacePotential::HPATCH_SCORE_BIN_SIZE = 50
static

Referenced by hpatch_score().

SurfacePotential * core::pack::interaction_graph::SurfacePotential::instance_
staticprivate

static data member holding pointer to the singleton class itself

set initial value as no instance

Referenced by get_instance().

const core::Real core::pack::interaction_graph::SurfacePotential::INTERACTION_RADIUS = 10.0
staticprivate
const core::Size core::pack::interaction_graph::SurfacePotential::MAX_HPATCH_AREA = 1000
static
const core::Real core::pack::interaction_graph::SurfacePotential::MAX_HPATCH_SCORE = 100.0
static
const core::Size core::pack::interaction_graph::SurfacePotential::MAX_PATCH_SURFACE_AREA = 1200
staticprivate
const core::Real core::pack::interaction_graph::SurfacePotential::MAX_SURFACE_ENERGY = 25.0
staticprivate
std::vector< core::Real > core::pack::interaction_graph::SurfacePotential::patcharea_to_score_
private
utility::vector1< utility::vector1 < Real > > core::pack::interaction_graph::SurfacePotential::res_to_average_hASA_
private
const core::Size core::pack::interaction_graph::SurfacePotential::SURFACE_EXPOSED_CUTOFF = 20
staticprivate
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: