![]() |
Rosetta Core
2014.35
|
Classes | |
class | LeGrandSasa |
LeGrand SASA approximation method Used by SasaCalc but can be used by itself. More... | |
class | SasaCalc |
Main interface to sasa calculations outside of pose metrics. More... | |
class | SasaMethod |
Abstract base class for SasaMethods. Feel free to edit as needed. More... | |
Enumerations | |
enum | SasaRadii { LJ = 1, legacy, naccess, reduce, chothia =naccess, SasaRadii_total = reduce } |
Type of Radii to use. More... | |
enum | SasaMethodEnum { LeGrand = 1, SasaMethodType_total = LeGrand } |
Functions | |
SasaMethodOP | create_sasa_method (SasaMethodEnum method, core::Real probe_radius, SasaRadii radii_set) |
Very (very) basic implementation until I understand the regular implementation used by constraints/features/etc. Also used for me to debug everything else before creating the real factory. More... | |
std::pair< Real, Real > | get_sc_bb_sasa (const pose::Pose &pose, const id::AtomID_Map< Real > &atom_sasa) |
Calculate the sidechain and backbone sasa from atom sasa. More... | |
std::pair< utility::vector1 < Real >, utility::vector1 < Real > > | get_sc_bb_sasa_per_res (const pose::Pose &pose, const id::AtomID_Map< Real > &atom_sasa) |
SasaMethodEnum | get_sasa_method_from_string (std::string method) |
Gets sasa enum from string passed by options system. More... | |
std::string | get_sasa_radii_parameter_name (SasaRadii radii_set) |
Get string name of SASA radii used to obtain extra parameter index from atom_type_set. More... | |
SasaRadii | get_sasa_radii_set_from_string (std::string radii_set) |
Gets sasa radii enum from string passed by options system. More... | |
ObjexxFCL::FArray2D_int | angles (num_phi, num_theta) |
ObjexxFCL::FArray2D_ubyte | masks (num_bytes, num_overlaps *num_orientations) |
ObjexxFCL::FArray2D_ubyte const & | get_legrand_sasa_masks () |
Returns const access to the masks FArray, which contains the information in the SASA database file sampling/SASA-masks.dat. Adding this in so that the values in the SASA database files can be used in SASA-based scores. (ronj) More... | |
ObjexxFCL::FArray2D_int const & | get_legrand_sasa_angles () |
Returns const access to the angles FArray, which contains the information in the SASA database file sampling/SASA-angles.dat. Adding this in so that the values in the SASA database files can be used in SASA-based scores. (ronj) More... | |
void | input_legrand_sasa_dats () |
Reads in the SASA database files sampling/SASA-angles.dat and sampling/SASA-masks.dat into FArrays above. More... | |
void | get_legrand_atomic_overlap (Real const radius_a, Real const radius_b, Real const distance_ijxyz, int °ree_of_overlap) |
void | get_legrand_orientation (Vector const &a_xyz, Vector const &b_xyz, int &phi_index, int &theta_index, Real distance_ijxyz) |
Gets the orientation of a to b (i to j, see below). Does this by calculating two angles, aphi and theta. (j) More... | |
void | get_legrand_2way_orientation (Vector const &a_xyz, Vector const &b_xyz, int &phi_a2b_index, int &theta_a2b_index, int &phi_b2a_index, int &theta_b2a_index, Real distance_ijxyz) |
Gets the orientation of a to b (i to j, see below). Does this by calculating two angles, aphi and theta. (j) More... | |
Variables | |
int const | num_bytes = 21 |
int const | num_phi = 64 |
int const | num_theta = 64 |
int const | num_overlaps = 100 |
int const | num_orientations = 162 |
Type of Radii to use.
LJ: Refers to Leonard Jones radii - Rosetta uses radii at the minimum of the potential (sigma2). Legacy: Refers to radii optimized for a no longer in use term, but some protocols have been optimized to use it. naccess: Refers to radii used in the program naccess. Originally derived from Chothia. Do not use for all-atom SASA as hydrogens are implicitly included. 'The Nature of the Accessible and Buried Surfaces in Proteins' J. Mol. Biol. (1976) 105, 1-14 reduce: Radii used by the program reduce. Hydrogens are explicitly included in the radii.
Enumerator | |
---|---|
LJ | |
legacy | |
naccess | |
reduce | |
chothia | |
SasaRadii_total |
ObjexxFCL::FArray2D_int core::scoring::sasa::angles | ( | num_phi | , |
num_theta | |||
) |
Referenced by get_legrand_sasa_angles(), and input_legrand_sasa_dats().
SasaMethodOP core::scoring::sasa::create_sasa_method | ( | SasaMethodEnum | , |
core::Real | probe_radius, | ||
SasaRadii | radii_set | ||
) |
Very (very) basic implementation until I understand the regular implementation used by constraints/features/etc. Also used for me to debug everything else before creating the real factory.
Referenced by core::scoring::sasa::SasaCalc::setup_sasa_method().
void core::scoring::sasa::get_legrand_2way_orientation | ( | Vector const & | a_xyz, |
Vector const & | b_xyz, | ||
int & | phi_a2b_index, | ||
int & | theta_a2b_index, | ||
int & | phi_b2a_index, | ||
int & | theta_b2a_index, | ||
Real | distance_ijxyz | ||
) |
Gets the orientation of a to b (i to j, see below). Does this by calculating two angles, aphi and theta. (j)
sasa.cc::get_2way_orientation
References num_phi, num_theta, pi_2, numeric::sin_cos_range(), and sin_cos_range().
Referenced by core::pack::interaction_graph::RotamerDots::get_atom_atom_coverage(), core::pack::interaction_graph::InvRotamerDots::overlap_exposed(), and core::pack::interaction_graph::InvRotamerDots::write_circle_intersection_mask_to_kinemage().
void core::scoring::sasa::get_legrand_atomic_overlap | ( | Real const | radius_a, |
Real const | radius_b, | ||
Real const | distance_ijxyz, | ||
int & | degree_of_overlap | ||
) |
sasa.cc::get_overlap
The function gets passed in the sasa radius of atom i (plus the probe radius), the sasa radius of atom j (plus the probe radius), the distance between the atom centers, and a reference to the degree of overlap (represented as an int). The degree of overlap that's returned can be thought of as how much of atom a is covered by atom b. A value of 100 means that atom a is completely covered up by atom b. A value of 1 means that not much of the surface of 'a' is covered up by 'b'. The law of cosines relates the cosine of one angle of a triangle to the lengths of its sides. More specifically, c^2 = a^2 + b^2 - 2*a*b*cos theta, where theta is the angle between sides a and b. For the function we want to compute the angle of the cone of intersection between spheres 'a' and 'b'. Let the radius of atom a be ri, and the radius of atom b be rq, and the distance between atom centers be riq. Let the angle between ri and riq be theta_iq. The cosine of theta_iq will be equivalent to ( ri^2 + riq^2 - rq^2 ) / 2 * ri * riq
getting overlap from a to b (or i to j, as the atoms are referred to in calc_per_atom_sasa below). this returns the degree of overlap between two atoms adapted from erics code in area.c GetD2 and returns value from 1 to 100. This calculation is based on the law of cosines. See LeGrand and Merz, Journal of Computational Chemistry 14(3):349-52 (1993). Note that equation (4) is wrong, the denominator should be 2*ri*riq instead of 2*ri*rq (j)
The function gets passed in the sasa radius of atom i (plus the probe radius), the sasa radius of atom j (plus the probe radius), the distance between the atom centers, and a reference to the degree of overlap (represented as an int). The degree of overlap that's returned can be thought of as how much of atom a is covered by atom b. A value of 100 means that atom a is completely covered up by atom b. A value of 1 means that not much of the surface of 'a' is covered up by 'b'. The law of cosines relates the cosine of one angle of a triangle to the lengths of its sides. More specifically, c^2 = a^2 + b^2 - 2*a*b*cos theta, where theta is the angle between sides a and b. For the function we want to compute the angle of the cone of intersection between spheres 'a' and 'b'. Let the radius of atom a be ri, and the radius of atom b be rq, and the distance between atom centers be riq. Let the angle between ri and riq be theta_iq. The cosine of theta_iq will be equivalent to ( ri^2 + riq^2 - rq^2 ) / 2 * ri * riq
References epsilon, and utility::exit().
Referenced by core::pack::interaction_graph::RotamerDots::get_atom_atom_coverage(), core::pack::interaction_graph::HPatchNode< V, E, G >::initialize_atom_atom_overlap_cache(), core::pack::interaction_graph::HPatchBackgroundNode< V, E, G >::initialize_atom_atom_overlaps(), core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::initialize_bg_bg_atom_atom_overlaps(), core::pack::interaction_graph::InvRotamerDots::overlap_exposed(), and core::pack::interaction_graph::InvRotamerDots::write_circle_intersection_mask_to_kinemage().
void core::scoring::sasa::get_legrand_orientation | ( | Vector const & | a_xyz, |
Vector const & | b_xyz, | ||
int & | phi_index, | ||
int & | theta_index, | ||
Real | distance_ijxyz | ||
) |
Gets the orientation of a to b (i to j, see below). Does this by calculating two angles, aphi and theta. (j)
sasa.cc::get_orientation
ronj Then, once we have the true phi and theta, we need to translate this into an index (or offset) for the correct ronj value in the database file. There are 64 phi angle bin and 64 theta bins in the database file sampling/SASA-angles.dat. ronj We need to convert the phi and theta into indexes for this file by multiplying them by num_phi / 2*pi. ronj Note: I think phi and theta have been reversed in the function below. The code below uses the following: ronj phi = arccos( z ) ronj theta = arctan( y / x )
ronj After a couple of weeks trying to write tests for this function, I have been unsuccessful in figuring out why ronj it's doing what it does. Despite using the wrong equations, it seems to work. Comparing the total residue ronj SASA values calculated by calc_per_atom_sasa() below results in a correlation of 0.98 against what the program ronj NACCESS finds for the same residues. This test was done on a small 110aa protein. I also looked at the per-atom ronj total SASA and the correlation for all atoms (mini v. NACCESS) was approximately 0.94. I'm using exactly the same ronj van der Waals radii for both programs so I feel like the correlations should be 1.0. Explanations for the ronj differences can be 1) this method is doing something wrong in calculating the closest surface point, 2) this ronj method is correct but the masks that are in the database are not aligned to the surface points correctly, 3) the ronj differences are solely due to the different way that the two program calculate surface area.
To get the spherical, polar coordinates of a cartesian point x,y,z, use these equations: r = sqrt( x^2 + y^2 + z^2 ) theta = arccos( z / r ) phi = arctan( y / x )
Then, once we have the true phi and theta, we need to translate this into an index (or offset) for the correct value in the database file. There are 64 phi angle bin and 64 theta bins in the database file sampling/SASA-angles.dat. We need to convert the phi and theta into indexes for this file by multiplying them by num_phi / 2*pi. Note: I think phi and theta have been reversed in the function below. The code below uses the following: phi = arccos( z ) theta = arctan( y / x )
After a couple of weeks trying to write tests for this function, I have been unsuccessful in figuring out why it's doing what it does. Despite using the wrong equations, it seems to work. Comparing the total residue SASA values calculated by calc_per_atom_sasa() below results in a correlation of 0.98 against what the program NACCESS finds for the same residues. This test was done on a small 110aa protein. I also looked at the per-atom total SASA and the correlation for all atoms (mini v. NACCESS) was approximately 0.94. I'm using exactly the same van der Waals radii for both programs so I feel like the correlations should be 1.0. Explanations for the differences can be 1) this method is doing something wrong in calculating the closest surface point, 2) this method is correct but the masks that are in the database are not aligned to the surface points correctly, 3) the differences are solely due to the different way that the two program calculate surface area. (ronj)
References num_phi, num_theta, pi_2, numeric::sin_cos_range(), and sin_cos_range().
ObjexxFCL::FArray2D_int const & core::scoring::sasa::get_legrand_sasa_angles | ( | ) |
Returns const access to the angles FArray, which contains the information in the SASA database file sampling/SASA-angles.dat. Adding this in so that the values in the SASA database files can be used in SASA-based scores. (ronj)
Return total SASA for side chains. : Uses Naccess radii by default for all atom. Not for general use. Values returned used to generate SVM for ProQ/ProQ2.
get_angles
Returns const access to the angles FArray, which contains the information in the SASA database file sampling/SASA-angles.dat. Adding this in so that the values in the SASA database files can be used in SASA-based scores. (ronj)
References angles(), and input_legrand_sasa_dats().
Referenced by core::pack::interaction_graph::RotamerDots::initialize_sasa_arrays().
ObjexxFCL::FArray2D_ubyte const & core::scoring::sasa::get_legrand_sasa_masks | ( | ) |
Returns const access to the masks FArray, which contains the information in the SASA database file sampling/SASA-masks.dat. Adding this in so that the values in the SASA database files can be used in SASA-based scores. (ronj)
get_masks
References input_legrand_sasa_dats(), and masks().
Referenced by core::pack::interaction_graph::RotamerDots::initialize_sasa_arrays().
SasaMethodEnum core::scoring::sasa::get_sasa_method_from_string | ( | std::string | method | ) |
Gets sasa enum from string passed by options system.
Enum Management. Can go in separate file if it gets large.
References LeGrand.
Referenced by core::scoring::sasa::SasaCalc::set_defaults().
std::string core::scoring::sasa::get_sasa_radii_parameter_name | ( | SasaRadii | radii_set | ) |
Get string name of SASA radii used to obtain extra parameter index from atom_type_set.
References chothia, legacy, LJ, naccess, reduce, and SasaRadii_total.
Referenced by core::scoring::sasa::LeGrandSasa::calculate().
SasaRadii core::scoring::sasa::get_sasa_radii_set_from_string | ( | std::string | radii_set | ) |
std::pair< Real, Real > core::scoring::sasa::get_sc_bb_sasa | ( | const pose::Pose & | pose, |
const id::AtomID_Map< Real > & | atom_sasa | ||
) |
Calculate the sidechain and backbone sasa from atom sasa.
Convenience Functions
References core::chemical::ResidueType::all_bb_atoms(), core::chemical::ResidueType::all_sc_atoms(), core::id::AtomID_Map< T >::n_residue(), and core::pose::Pose::residue_type().
std::pair< utility::vector1< Real >, utility::vector1< Real > > core::scoring::sasa::get_sc_bb_sasa_per_res | ( | const pose::Pose & | pose, |
const id::AtomID_Map< Real > & | atom_sasa | ||
) |
void core::scoring::sasa::input_legrand_sasa_dats | ( | ) |
Reads in the SASA database files sampling/SASA-angles.dat and sampling/SASA-masks.dat into FArrays above.
sasa.cc::input_sasa_dats
References angles(), utility::io::izstream::close(), basic::database::full_name(), core::init::init(), masks(), num_bytes, num_orientations, num_overlaps, num_phi, num_theta, and skip.
Referenced by get_legrand_sasa_angles(), and get_legrand_sasa_masks().
ObjexxFCL::FArray2D_ubyte core::scoring::sasa::masks | ( | num_bytes | , |
num_overlaps * | num_orientations | ||
) |
Referenced by get_legrand_sasa_masks(), and input_legrand_sasa_dats().
int const core::scoring::sasa::num_bytes = 21 |
Referenced by input_legrand_sasa_dats().
int const core::scoring::sasa::num_orientations = 162 |
Referenced by input_legrand_sasa_dats().
int const core::scoring::sasa::num_overlaps = 100 |
Referenced by input_legrand_sasa_dats().
int const core::scoring::sasa::num_phi = 64 |
Referenced by get_legrand_2way_orientation(), get_legrand_orientation(), and input_legrand_sasa_dats().
int const core::scoring::sasa::num_theta = 64 |
Referenced by get_legrand_2way_orientation(), get_legrand_orientation(), and input_legrand_sasa_dats().