![]() |
Rosetta Core
2014.16.56682
|
Represents the sphere of dots on the vdW surface of an atom, for use in the LeGrand and Merz method of calculating SASA. More...
#include <RotamerDots.hh>
Public Member Functions | |
| DotSphere () | |
| default constructor, initializes all dot counts to zero More... | |
| ~DotSphere () | |
| DotSphere (DotSphere const &rhs) | |
| copy constructor More... | |
| DotSphere const & | operator= (DotSphere const &rhs) |
| bool | operator!= (DotSphere const &rhs) |
| Comparison operator. Using this in debugging. When alternate state rotamer dots is not equal to current state rotamer dots, then I print some extra debugging information. But this could be useful for other purposes, too. Since RotamerDots objects contain DotSphere objects, to compare RD objects, this class needs its own comparison operator, too. More... | |
| void | zero () |
| core::Size | get_total_dots () const |
| void | increment_count (utility::vector1< ObjexxFCL::ubyte > const &) |
| increment the count for the dots using an input ubyte array. More... | |
| void | count_num_covered () const |
| iterates across all dots and stores the number with a non-zero coverage count for later use More... | |
| core::Size | get_num_uncovered () const |
| returns the total number of dots on this atom whose coverage count is 0 More... | |
| core::Size | get_num_covered () const |
| returns the total number of dots on this atom with a non-zero coverage count More... | |
| DotSphere const & | operator-= (DotSphere const &rhs) |
| decrements the coverage count for this sphere by the coverage count of the rhs sphere More... | |
| DotSphere const & | operator+= (DotSphere const &rhs) |
| increments the coverage count for this sphere by the coverage count of the rhs sphere More... | |
| void | print (std::ostream &os) const |
| Writes coverage counts to the output stream. if a dot is covered by 10 or more residues, prints 9 to the output stream instead. Useful for debugging. More... | |
| bool | get_dot_covered (core::Size dot_index) const |
| Returns a boolean indicating whether the given dot is covered. Note, this function takes in a 1-based dot-index and converts that to 0-based for the C-style array used by this class. More... | |
| void | write_to_compact_array (utility::vector1< ObjexxFCL::ubyte > &compact) const |
| note, this method results in loss of information; counts > 1 are truncated to 1. bitwise OR with 0000:0001 results in 0000:0001. More... | |
| void | invert_to_compact_array (utility::vector1< ObjexxFCL::ubyte > &inv_compact) const |
Static Public Attributes | |
| static core::Size const | NUM_DOTS_TOTAL = 162 |
Private Attributes | |
| unsigned char | dots_coverage_count_ [NUM_COUNTS_TO_ALLOCATE] |
| core::Size | num_covered_ |
| bool | num_covered_current_ |
Static Private Attributes | |
| static core::Size const | NUM_BYTES_IN_DOT_SPHERE_OVERLAP_ARRAYS = 21 |
| static core::Size const | NUM_COUNTS_TO_ALLOCATE = NUM_BYTES_IN_DOT_SPHERE_OVERLAP_ARRAYS * 8 |
Represents the sphere of dots on the vdW surface of an atom, for use in the LeGrand and Merz method of calculating SASA.
In this implementation of the LeGrand and Merz algorithm, we're going to be using 162 dots per atom. Turns out that you can distribute 162 dots evenly on the surface of a sphere.
This class is extremely simple. The RotamerDots class below does all the work of tying a particular residues atoms to DotSpheres. As a matter of fact, DotSphere doesn't even know what atom it's representing. It just has the one C-style array for the coverage count and that's it.
| core::pack::interaction_graph::DotSphere::DotSphere | ( | ) |
| core::pack::interaction_graph::DotSphere::~DotSphere | ( | ) |
| core::pack::interaction_graph::DotSphere::DotSphere | ( | DotSphere const & | rhs | ) |
copy constructor
References dots_coverage_count_, NUM_COUNTS_TO_ALLOCATE, num_covered_, and num_covered_current_.
| void core::pack::interaction_graph::DotSphere::count_num_covered | ( | ) | const |
iterates across all dots and stores the number with a non-zero coverage count for later use
References dots_coverage_count_, num_covered_, num_covered_current_, and NUM_DOTS_TOTAL.
Referenced by get_num_covered(), and get_num_uncovered().
| bool core::pack::interaction_graph::DotSphere::get_dot_covered | ( | core::Size | dot_index | ) | const |
Returns a boolean indicating whether the given dot is covered. Note, this function takes in a 1-based dot-index and converts that to 0-based for the C-style array used by this class.
References dots_coverage_count_, and NUM_DOTS_TOTAL.
| Size core::pack::interaction_graph::DotSphere::get_num_covered | ( | ) | const |
returns the total number of dots on this atom with a non-zero coverage count
References count_num_covered(), num_covered_, and num_covered_current_.
| Size core::pack::interaction_graph::DotSphere::get_num_uncovered | ( | ) | const |
returns the total number of dots on this atom whose coverage count is 0
References count_num_covered(), num_covered_, num_covered_current_, and NUM_DOTS_TOTAL.
|
inline |
References NUM_DOTS_TOTAL.
| void core::pack::interaction_graph::DotSphere::increment_count | ( | utility::vector1< ObjexxFCL::ubyte > const & | overlap_mask | ) |
increment the count for the dots using an input ubyte array.
| overlap_mask | - a utility::vector1 of size 21 that holds ObjexxFCL ubytes. overlap_mask[ bb ] will return a single ubyte which will determine whether the dots for that region of the vector should be incremented. Because it's a vector1 and this method uses a 0-based array, we have to remember to convert the array index to 1-based before looking at what's in overlap_mask. |
References dots_coverage_count_, NUM_BYTES_IN_DOT_SPHERE_OVERLAP_ARRAYS, and num_covered_current_.
| void core::pack::interaction_graph::DotSphere::invert_to_compact_array | ( | utility::vector1< ObjexxFCL::ubyte > & | inv_compact | ) | const |
References dots_coverage_count_, and NUM_BYTES_IN_DOT_SPHERE_OVERLAP_ARRAYS.
Comparison operator. Using this in debugging. When alternate state rotamer dots is not equal to current state rotamer dots, then I print some extra debugging information. But this could be useful for other purposes, too. Since RotamerDots objects contain DotSphere objects, to compare RD objects, this class needs its own comparison operator, too.
References dots_coverage_count_, NUM_BYTES_IN_DOT_SPHERE_OVERLAP_ARRAYS, num_covered_, and num_covered_current_.
increments the coverage count for this sphere by the coverage count of the rhs sphere
References dots_coverage_count_, NUM_COUNTS_TO_ALLOCATE, and num_covered_current_.
decrements the coverage count for this sphere by the coverage count of the rhs sphere
References dots_coverage_count_, NUM_COUNTS_TO_ALLOCATE, and num_covered_current_.
= assignment operator
References dots_coverage_count_, NUM_COUNTS_TO_ALLOCATE, num_covered_, and num_covered_current_.
| void core::pack::interaction_graph::DotSphere::print | ( | std::ostream & | os | ) | const |
Writes coverage counts to the output stream. if a dot is covered by 10 or more residues, prints 9 to the output stream instead. Useful for debugging.
References dots_coverage_count_, and NUM_COUNTS_TO_ALLOCATE.
Referenced by core::pack::interaction_graph::operator<<().
| void core::pack::interaction_graph::DotSphere::write_to_compact_array | ( | utility::vector1< ObjexxFCL::ubyte > & | compact | ) | const |
note, this method results in loss of information; counts > 1 are truncated to 1. bitwise OR with 0000:0001 results in 0000:0001.
DotSphere::write_to_compact_array
References dots_coverage_count_, and NUM_BYTES_IN_DOT_SPHERE_OVERLAP_ARRAYS.
| void core::pack::interaction_graph::DotSphere::zero | ( | ) |
References dots_coverage_count_, NUM_COUNTS_TO_ALLOCATE, num_covered_, and num_covered_current_.
Referenced by DotSphere().
|
private |
|
staticprivate |
Referenced by increment_count(), invert_to_compact_array(), operator!=(), and write_to_compact_array().
|
staticprivate |
Referenced by DotSphere(), operator+=(), operator-=(), operator=(), print(), and zero().
|
mutableprivate |
Referenced by count_num_covered(), DotSphere(), get_num_covered(), get_num_uncovered(), operator!=(), operator=(), and zero().
|
mutableprivate |
Referenced by count_num_covered(), DotSphere(), get_num_covered(), get_num_uncovered(), increment_count(), operator!=(), operator+=(), operator-=(), operator=(), and zero().
|
static |
Referenced by count_num_covered(), get_dot_covered(), get_num_uncovered(), and get_total_dots().
1.8.7