Rosetta 3.4
Public Member Functions | Static Public Attributes
core::pack::interaction_graph::DotSphere Class Reference

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>

Collaboration diagram for core::pack::interaction_graph::DotSphere:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DotSphere ()
 default constructor, initializes all dot counts to zero
 ~DotSphere ()
 DotSphere (DotSphere const &rhs)
 copy constructor
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.
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.
void count_num_covered () const
 iterates across all dots and stores the number with a non-zero coverage count for later use
core::Size get_num_uncovered () const
 returns the total number of dots on this atom whose coverage count is 0
core::Size get_num_covered () const
 returns the total number of dots on this atom with a non-zero coverage count
DotSphere const & operator-= (DotSphere const &rhs)
 decrements the coverage count for this sphere by the coverage count of the rhs sphere
DotSphere const & operator+= (DotSphere const &rhs)
 increments the coverage count for this sphere by the coverage count of the rhs sphere
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.
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.
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.
void invert_to_compact_array (utility::vector1< ObjexxFCL::ubyte > &inv_compact) const

Static Public Attributes

static core::Size const NUM_DOTS_TOTAL = 162

Detailed Description

Represents the sphere of dots on the vdW surface of an atom, for use in the LeGrand and Merz method of calculating SASA.

DotSphere

Detailed:
For every atom in a protein, the vdW surface is patterned with dots. Each dot has to keep track of how many other residues are "covering" this dot. So, that's 1 character for each dot. Each character is the count of the number of residues overlapping with this dot. An assumption we're making here is that a single atom (or really, dot) will never be covered by more than 255 residues.

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.


Constructor & Destructor Documentation

core::pack::interaction_graph::DotSphere::DotSphere ( )

default constructor, initializes all dot counts to zero

DotSphere::DotSphere

References zero().

core::pack::interaction_graph::DotSphere::~DotSphere ( )
core::pack::interaction_graph::DotSphere::DotSphere ( DotSphere const &  rhs)

copy constructor

DotSphere::DotSphere

Detailed:
memcpy is much faster than the FArray operator =

Member Function Documentation

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

DotSphere::count_num_covered

Detailed:
both num_covered_ and num_covered_current_ are declared mutable so that they may be modified in this const method

References 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.

DotSphere::get_dot_covered

References 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

DotSphere::get_num_covered

Detailed:
if the coverage count has not been modified since the last time the number of covered dots was counted, then the method uses the cached result

References count_num_covered().

Size core::pack::interaction_graph::DotSphere::get_num_uncovered ( ) const

returns the total number of dots on this atom whose coverage count is 0

DotSphere::get_num_uncovered

Detailed:
if the coverage count has not been modified since the last time the number of covered dots was counted, then the method uses the cached result.

References count_num_covered(), and NUM_DOTS_TOTAL.

core::Size core::pack::interaction_graph::DotSphere::get_total_dots ( ) const [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.

DotSphere::increment_count

Detailed:
Each bit in this ubyte array corresponds to a single dot on the surface of this sphere. Dot coverage counts are incremented for dots whose corresponding bits in the ubyte array are '1'. dots_coverage_count_ is C-style array of unsigned chars. So, index 0 returns the first char (or one byte), index 20*8+7, or 167, is the last char/byte.
Parameters:
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.
void core::pack::interaction_graph::DotSphere::invert_to_compact_array ( utility::vector1< ObjexxFCL::ubyte > &  inv_compact) const
bool core::pack::interaction_graph::DotSphere::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.

DotSphere::operator!=

DotSphere const & core::pack::interaction_graph::DotSphere::operator+= ( DotSphere const &  rhs)

increments the coverage count for this sphere by the coverage count of the rhs sphere

DotSphere::operator +=

DotSphere const & core::pack::interaction_graph::DotSphere::operator-= ( DotSphere const &  rhs)

decrements the coverage count for this sphere by the coverage count of the rhs sphere

DotSphere::operator -=

DotSphere const & core::pack::interaction_graph::DotSphere::operator= ( DotSphere const &  rhs)

DotSphere::operator=

= assignment operator

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.

DotSphere::print

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

void core::pack::interaction_graph::DotSphere::zero ( )

DotSphere::zero

Detailed:
sets the dot coverage counts to zero for all dots memset is fast -- a lot of time is spent in this function so I'm using c-style arrays instead of the FArrays

Referenced by DotSphere().


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines