![]() |
Rosetta Core
2014.16.56682
|
LeGrand SASA approximation method Used by SasaCalc but can be used by itself. More...
#include <LeGrandSasa.hh>
Public Member Functions | |
| LeGrandSasa (Real probe_radius, SasaRadii radii_set) | |
| virtual | ~LeGrandSasa () |
| virtual Real | calculate (const pose::Pose &pose, const id::AtomID_Map< bool > &atom_subset, id::AtomID_Map< Real > &atom_sasa, utility::vector1< Real > &rsd_sasa) |
| Calculate Sasa. Atoms not calculated have -1 sasa. This is carried over for compatability purposes. More... | |
| virtual std::string | get_name () const |
| ObjexxFCL::FArray2D_int const & | get_angles () const |
| 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... | |
| ObjexxFCL::FArray2D_ubyte const & | get_masks () const |
| 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... | |
| void | get_overlap (Real const radius_a, Real const radius_b, Real const distance_ijxyz, int °ree_of_overlap) const |
| void | get_orientation (Vector const &a_xyz, Vector const &b_xyz, int &phi_index, int &theta_index, Real distance_ijxyz) const |
| 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_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) const |
| Gets the orientation of a to b (i to j, see below). Does this by calculating two angles, aphi and theta. (j) More... | |
| void | calc_atom_masks (conformation::Residue const &irsd, conformation::Residue const &jrsd, Real const probe_radius, Real const cutoff_distance, utility::vector1< Real > const &radii, id::AtomID_Map< bool > const &atom_subset, id::AtomID_Map< utility::vector1< ObjexxFCL::ubyte > > &atom_mask) const |
Public Member Functions inherited from core::scoring::sasa::SasaMethod | |
| SasaMethod (Real probe_radius, SasaRadii radii_set) | |
| virtual | ~SasaMethod () |
| void | set_include_probe_radius_in_calc (bool include_probe_radius) |
| Include the probe radius in calc. Typical for SASA. More... | |
| void | set_probe_radius (Real probe_radius) |
| Set the probe radius. Typical value is that of water at 1.4 A. More... | |
| void | set_radii_set (SasaRadii radii_set) |
| Set the radii type. More... | |
| void | set_use_big_polar_hydrogen (bool big_polar_h) |
| Legacy option to increase polar hydrogen radii to 1.08A. Supported for now. More... | |
Private Member Functions | |
| void | init () |
| Initialize the class - allows alternate constructors, copy constructors, etc. More... | |
| void | read_angles () |
| Read angles db file into private FArray. More... | |
| void | read_masks () |
| Read masks db file into private FArray. More... | |
| void | print_dot_bit_string (utility::vector1< ObjexxFCL::ubyte > &values) const |
| helper method to try to confirm that the dots are being overlapped and bits are being set correctly (ronj). More... | |
Private Attributes | |
| int | num_bytes_ |
| int | num_phi_ |
| int | num_theta_ |
| int | num_overlaps_ |
| int | num_orientations_ |
| int | maskbits_ |
| ObjexxFCL::FArray2D< int > | angles_ |
| ObjexxFCL::FArray2D < ObjexxFCL::ubyte > | masks_ |
Additional Inherited Members | |
Protected Attributes inherited from core::scoring::sasa::SasaMethod | |
| Real | probe_radius_ |
| SasaRadii | radii_set_ |
| bool | include_probe_radius_ |
| bool | use_big_polar_H_ |
LeGrand SASA approximation method Used by SasaCalc but can be used by itself.
LeGrand S, Merz KM. Rapid approximation to molecular surface area via the use of Boolean logic and look-up tables. J Comput Chem 1993;14:349-352.
Fortran Implementation: Jerry Tsai C++ Translation: Jeff Gray Cleanup/Bugfixes/OOP: Jared Adolf-Bryfogle
References init().
|
virtual |
| void core::scoring::sasa::LeGrandSasa::calc_atom_masks | ( | conformation::Residue const & | irsd, |
| conformation::Residue const & | jrsd, | ||
| Real const | probe_radius, | ||
| Real const | cutoff_distance, | ||
| utility::vector1< Real > const & | radii, | ||
| id::AtomID_Map< bool > const & | atom_subset, | ||
| id::AtomID_Map< utility::vector1< ObjexxFCL::ubyte > > & | atom_mask | ||
| ) | const |
References angles_, core::conformation::Residue::atom(), core::conformation::Residue::atom_name(), core::conformation::Residue::atom_type(), get_orientation(), get_overlap(), core::chemical::AtomType::is_h2o(), masks_, core::conformation::Residue::name3(), core::conformation::Residue::natoms(), core::conformation::Residue::nbr_atom(), core::conformation::Residue::nbr_radius(), num_bytes_, core::conformation::Residue::seqpos(), core::scoring::TR, and xyz.
Referenced by calculate().
|
virtual |
Calculate Sasa. Atoms not calculated have -1 sasa. This is carried over for compatability purposes.
Implements core::scoring::sasa::SasaMethod.
References core::io::serialization::at(), core::conformation::Residue::atom_type_set(), core::scoring::bit_count, calc_atom_masks(), core::id::AtomID_Map< T >::clear(), core::chemical::AtomTypeSet::extra_parameter_index(), core::scoring::sasa::get_sasa_radii_parameter_name(), core::scoring::sasa::SasaMethod::include_probe_radius_, core::pose::initialize_atomid_map(), core::chemical::AtomType::is_polar_hydrogen(), core::scoring::sasa::LJ, maskbits_, max_radius, core::chemical::AtomTypeSet::n_atomtypes(), core::chemical::AtomType::name(), num_bytes_, numeric::constants::d::pi, print_dot_bit_string(), core::scoring::sasa::SasaMethod::probe_radius_, core::scoring::sasa::SasaMethod::radii_set_, core::pose::Pose::residue(), core::pose::Pose::total_residue(), core::scoring::TR, and core::scoring::sasa::SasaMethod::use_big_polar_H_.
| void core::scoring::sasa::LeGrandSasa::get_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 | ||
| ) | const |
Gets the orientation of a to b (i to j, see below). Does this by calculating two angles, aphi and theta. (j)
References num_phi_, num_theta_, pi_2, numeric::sin_cos_range(), and sin_cos_range().
| ObjexxFCL::FArray2D_int const & core::scoring::sasa::LeGrandSasa::get_angles | ( | ) | const |
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_.
| ObjexxFCL::FArray2D_ubyte const & core::scoring::sasa::LeGrandSasa::get_masks | ( | ) | const |
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)
References masks_.
|
virtual |
Implements core::scoring::sasa::SasaMethod.
| void core::scoring::sasa::LeGrandSasa::get_orientation | ( | Vector const & | a_xyz, |
| Vector const & | b_xyz, | ||
| int & | phi_index, | ||
| int & | theta_index, | ||
| Real | distance_ijxyz | ||
| ) | const |
Gets the orientation of a to b (i to j, see below). Does this by calculating two angles, aphi and theta. (j)
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().
Referenced by calc_atom_masks().
| void core::scoring::sasa::LeGrandSasa::get_overlap | ( | Real const | radius_a, |
| Real const | radius_b, | ||
| Real const | distance_ijxyz, | ||
| int & | degree_of_overlap | ||
| ) | const |
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, utility::exit(), and core::scoring::TR.
Referenced by calc_atom_masks().
|
private |
Initialize the class - allows alternate constructors, copy constructors, etc.
References angles_, maskbits_, masks_, num_bytes_, num_orientations_, num_overlaps_, num_phi_, num_theta_, read_angles(), and read_masks().
Referenced by LeGrandSasa().
|
private |
helper method to try to confirm that the dots are being overlapped and bits are being set correctly (ronj).
helper method I was using to try to confirm that the dots are being overlapped and bits are being set correctly (ronj).
References num_bytes_, and core::scoring::TR.
Referenced by calculate().
|
private |
Read angles db file into private FArray.
References angles_, utility::io::izstream::close(), basic::database::full_name(), num_phi_, num_theta_, and skip.
Referenced by init().
|
private |
Read masks db file into private FArray.
References utility::io::izstream::close(), basic::database::full_name(), masks_, num_bytes_, num_orientations_, num_overlaps_, and skip.
Referenced by init().
|
private |
Referenced by calc_atom_masks(), get_angles(), init(), and read_angles().
|
private |
Referenced by calculate(), and init().
|
private |
Referenced by calc_atom_masks(), get_masks(), init(), and read_masks().
|
private |
Referenced by calc_atom_masks(), calculate(), init(), print_dot_bit_string(), and read_masks().
|
private |
Referenced by init(), and read_masks().
|
private |
Referenced by init(), and read_masks().
|
private |
Referenced by get_2way_orientation(), get_orientation(), init(), and read_angles().
|
private |
Referenced by get_2way_orientation(), get_orientation(), init(), and read_angles().
1.8.7