Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G > Class Template Reference

Defines a BackgroundResidue node which will contribute to changes in surface energy due to state changes on neighboring nodes, and not because of state changes to it. More...

#include <SurfaceInteractionGraph.hh>

Inheritance diagram for core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >:
Inheritance graph
[legend]
Collaboration diagram for core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >:
Collaboration graph
[legend]

Public Types

typedef BackgroundNode< V, E, Gparent
 
- Public Types inherited from core::pack::interaction_graph::BackgroundNode< V, E, G >
typedef std::list
< BackgroundToFirstClassEdge
< V, E, G > * >::iterator 
BackgroundEdgeListIter
 
typedef std::list
< BackgroundToFirstClassEdge
< V, E, G > * > 
BackgroundEdgeList
 
typedef std::vector
< BackgroundToFirstClassEdge
< V, E, G > * > 
BackgroundEdgeVector
 
typedef std::vector
< BackgroundToFirstClassEdge
< V, E, G > * >::iterator 
BackgroundEdgeVectorIter
 
typedef std::vector
< FirstClassNode< V, E, G > * > 
FirstClassNodeVector
 

Public Member Functions

 SurfaceBackgroundNode (AdditionalBackgroundNodesInteractionGraph< V, E, G > *owner, int node_index)
 main constructor. No default constructor, copy constructor or assignment operator More...
 
virtual ~SurfaceBackgroundNode ()
 destructor - no dynamicly allocated memory to manage -> empty More...
 
bool detect_neighborship (SurfaceNode< V, E, G > *node) const
 returns true if this background residue neighbors with any rotamer of a SurfaceNode More...
 
Real project_surface_deltaE_for_substitution (SurfaceNode< V, E, G > *fc_node_changing, int changing_nodes_curr_state, int changing_nodes_alt_state)
 returns the change in surface induced by a SurfaceNode undergoing a state substitution. More...
 
void acknowledge_substitution_surface ()
 bookkeeping to reflect a SurfaceNode's state substitution. More...
 
Real get_surface_score () const
 returns the surface score under the current state assignment More...
 
virtual void prepare_for_simulated_annealing ()
 Sets the hASA of surface exposed hydrophobic neighbors using the pose's neighbor graph. There's no need for BGNodes to keep track of which Nodes are really neighbors (energy graph vs neighbor graph) because they never broadcast changes to their neighboring Nodes. More...
 
void print () const
 used only for debugging More...
 
virtual unsigned int count_static_memory () const
 
virtual unsigned int count_dynamic_memory () const
 
conformation::Residue const & wt_residue_for_node () const
 
bool is_surface_exposed () const
 Returns the value of surface_exposed_ which gets set during the SIG initialize() method. More...
 
void surface_exposed (bool value)
 using this for debugging More...
 
bool is_below_buried_residue_no_hsasa_cutoff () const
 Returns the value of is_below_buried_residue_no_hsasa_cutoff_ which gets set during the SIG initialize() method. More...
 
void is_below_buried_residue_no_hsasa_cutoff (bool value)
 setter for the is_below_buried_residue_no_hsasa_cutoff_ bool More...
 
void reset_alt_state_total_hASA ()
 Sets the alt state total hASA to the current state total hASA. See comments in SIG and commit_considered_substitution_surface for more information about why this method exists. More...
 
void initialize_num_neighbors_counting_self () const
 Returns the number of neighbors within the interaction threshold, counting self. A member variable stores the value so that this method only has to run once and lookups can be performed thereafter. More...
 
int num_neighbors_counting_self () const
 Returns the value stored in the member variable. More...
 
void init_hASA_variables ()
 
Real calculate_amount_total_hydrophobic_ASA ()
 
Real average_residue_hASA () const
 Returns the amount of hydrophobic ASA this residue adds to a patch. More...
 
Real average_residue_hASA (chemical::AA residue_type, Size num_nbs) const
 Same function as above, but this one allows you to specify what type and num_nbs. This function is meant to be used only when initializing all of the Nodes/BGNodes because at that point we have to use the wild-type residue type, not the new rotamers residue type (which is what the above function will do). More...
 
Real hASA_energy (Real patch_area) const
 Calls a SurfacePotential class method to get the energy for a given patch area. Not sure if I should take num neighbors as a parameter to the function, or just use the class method num_neighbors_counting_self(). More...
 
Real get_current_hASA ()
 Returns current hASA. Only used by the unit tests. Should not exist in release mode. More...
 
Real get_alt_hASA ()
 Returns current hASA. Only used by the unit tests. Should not exist in release mode. More...
 
- Public Member Functions inherited from core::pack::interaction_graph::BackgroundNode< V, E, G >
virtual ~BackgroundNode ()
 BackgroundNode destructor. More...
 
 BackgroundNode (AdditionalBackgroundNodesInteractionGraph< V, E, G > *owner, int node_index)
 BackgroundNode constructor - no default or copy constructors; no operator =. More...
 
BackgroundEdgeListIter add_edge (BackgroundToFirstClassEdge< V, E, G > *edge_ptr)
 Adds a BackgroundToFirstClassEdge to the edge list for this node. Returns an iterator to the new list element. More...
 
void drop_edge (BackgroundEdgeListIter edge)
 removes an edge from the nodes edge list in constant time More...
 
BackgroundToFirstClassEdge< V,
E, G > * 
find_edge (int fc_node_index)
 Linear time edge lookup function. More...
 

Protected Member Functions

SurfaceInteractionGraph< V, E,
G > * 
get_surface_owner () const
 
SurfaceBackgroundEdge< V, E, G > * get_surface_bg_edge (int index)
 
- Protected Member Functions inherited from core::pack::interaction_graph::BackgroundNode< V, E, G >
void update_edge_vector ()
 Syncs the edge vector with the edge list. More...
 
int get_node_index () const
 
int get_num_incident_edges () const
 
BackgroundToFirstClassEdge< V,
E, G > * 
get_incident_edge (int index) const
 
int get_index_of_adjacent_first_class_node (int index) const
 
FirstClassNode< V, E, G > * get_adjacent_first_class_node (int index) const
 
bool get_edge_vector_up_to_date () const
 
AdditionalBackgroundNodesInteractionGraph
< V, E, G > * 
get_owner () const
 

Private Member Functions

 SurfaceBackgroundNode ()
 
 SurfaceBackgroundNode (SurfaceBackgroundNode< V, E, G > const &)
 
SurfaceBackgroundNode< V, E, G > & operator= (SurfaceBackgroundNode< V, E, G > const &)
 

Private Attributes

Real curr_state_total_hASA_
 
Real alt_state_total_hASA_
 
bool have_prepared_for_simA_
 
bool surface_exposed_
 
bool is_below_buried_residue_no_hsasa_cutoff_
 
int num_neighbors_counting_self_
 

Static Private Attributes

static Real surface_energy_weight_ = 1.0
 
static const int MAX_SURFACE_ENERGY = 100
 
static const int INTERACTION_RADIUS = 10
 
static const int SURFACE_EXPOSED_CUTOFF = 20
 
static const int BURIED_RESIDUE_NO_HSASA_CUTOFF = 24
 
static const int MAX_PATCH_SURFACE_AREA = 1100
 

Detailed Description

template<typename V, typename E, typename G>
class core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >

Defines a BackgroundResidue node which will contribute to changes in surface energy due to state changes on neighboring nodes, and not because of state changes to it.

SurfaceBackgroundNode

Member Typedef Documentation

template<typename V, typename E, typename G>
typedef BackgroundNode< V, E, G > core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::parent

Constructor & Destructor Documentation

template<typename V , typename E , typename G >
core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::SurfaceBackgroundNode ( AdditionalBackgroundNodesInteractionGraph< V, E, G > *  owner,
int  node_index 
)

main constructor. No default constructor, copy constructor or assignment operator

SurfaceBackgroundNode::SurfaceBackgroundNode

Parameters
owner- [in] - the owning interaction graph node_id - [in] - the index for this node amongst its owners set

References core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::get_surface_owner(), core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::surface_energy_weight_, and core::pack::interaction_graph::TR_BGNODE().

template<typename V , typename E , typename G >
core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::~SurfaceBackgroundNode ( )
virtual

destructor - no dynamicly allocated memory to manage -> empty

SurfaceBackgroundNode::~SurfaceBackgroundNode

template<typename V, typename E, typename G>
core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::SurfaceBackgroundNode ( )
private
template<typename V, typename E, typename G>
core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::SurfaceBackgroundNode ( SurfaceBackgroundNode< V, E, G > const &  )
private

Member Function Documentation

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::acknowledge_substitution_surface ( )

bookkeeping to reflect a SurfaceNode's state substitution.

SurfaceBackgroundNode::acknowledge_substitution

template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::average_residue_hASA ( ) const

Returns the amount of hydrophobic ASA this residue adds to a patch.

SurfaceBackgroundNode::average_residue_hASA

Detailed:
This method is oblivious to whether a given residue should contribute to the patch area. This function just does the lookup for the hASA (using the SurfacePotential class). Calls to this function should be surrounded by is-this- a-surface-exposed-hydrophobic checks. Since background nodes don't actually change type, whatever the wild type residue's aa type is what we use for the score.
template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::average_residue_hASA ( chemical::AA  residue_type,
Size  num_nbs 
) const

Same function as above, but this one allows you to specify what type and num_nbs. This function is meant to be used only when initializing all of the Nodes/BGNodes because at that point we have to use the wild-type residue type, not the new rotamers residue type (which is what the above function will do).

SurfaceBackgroundNode::average_residue_hASA

References core::pack::interaction_graph::SurfacePotential::average_residue_hASA(), and core::pack::interaction_graph::SurfacePotential::get_instance().

template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::calculate_amount_total_hydrophobic_ASA ( )
template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::count_dynamic_memory ( ) const
virtual
template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::count_static_memory ( ) const
virtual
template<typename V , typename E , typename G >
bool core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::detect_neighborship ( SurfaceNode< V, E, G > *  node) const

returns true if this background residue neighbors with any rotamer of a SurfaceNode

SurfaceBackgroundNode::detect_neighborship

Detailed:
If this node is in the list of neighbors for the passed in SurfaceNode, return true. Leave the responsibility of figuring out neighborship to the first class node.

References core::pack::interaction_graph::SurfaceNode< V, E, G >::detect_neighborship_with_node().

template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::get_alt_hASA ( )

Returns current hASA. Only used by the unit tests. Should not exist in release mode.

SurfaceBackgroundNode::get_alt_hASA

template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::get_current_hASA ( )

Returns current hASA. Only used by the unit tests. Should not exist in release mode.

SurfaceBackgroundNode::get_current_count

template<typename V, typename E, typename G>
SurfaceBackgroundEdge< V, E, G >* core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::get_surface_bg_edge ( int  index)
inlineprotected
template<typename V, typename E, typename G>
SurfaceInteractionGraph< V, E, G >* core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::get_surface_owner ( ) const
inlineprotected
template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::get_surface_score ( ) const

returns the surface score under the current state assignment

SurfaceBackgroundNode< V, E, G >::get_surface_score

template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::hASA_energy ( Real  patch_area) const

Calls a SurfacePotential class method to get the energy for a given patch area. Not sure if I should take num neighbors as a parameter to the function, or just use the class method num_neighbors_counting_self().

SurfaceBackgroundNode::hASA_energy()

References core::pack::interaction_graph::SurfacePotential::get_instance(), and core::pack::interaction_graph::SurfacePotential::hASA_patch_energy().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::init_hASA_variables ( )
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::initialize_num_neighbors_counting_self ( ) const

Returns the number of neighbors within the interaction threshold, counting self. A member variable stores the value so that this method only has to run once and lookups can be performed thereafter.

SurfaceBackgroundNode::initialize_num_neighbors_counting_self

Detailed:
See comments in SurfaceNode::initialize_num_neighbors_counting_self for details.

References core::graph::Graph::get_node(), core::graph::Node::num_neighbors_counting_self(), and core::pack::interaction_graph::TR_BGNODE().

template<typename V , typename E , typename G >
bool core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::is_below_buried_residue_no_hsasa_cutoff ( ) const

Returns the value of is_below_buried_residue_no_hsasa_cutoff_ which gets set during the SIG initialize() method.

SurfaceBackgroundNode::is_below_buried_residue_no_hsasa_cutoff

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::is_below_buried_residue_no_hsasa_cutoff ( bool  value)

setter for the is_below_buried_residue_no_hsasa_cutoff_ bool

SurfaceBackgroundNode::is_below_buried_residue_no_hsasa_cutoff

template<typename V , typename E , typename G >
bool core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::is_surface_exposed ( ) const

Returns the value of surface_exposed_ which gets set during the SIG initialize() method.

SurfaceBackgroundNode::is_surface_exposed

template<typename V , typename E , typename G >
int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::num_neighbors_counting_self ( ) const

Returns the value stored in the member variable.

SurfaceBackgroundNode::num_neighbors_counting_self

template<typename V, typename E, typename G>
SurfaceBackgroundNode< V, E, G >& core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::operator= ( SurfaceBackgroundNode< V, E, G > const &  )
private
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::prepare_for_simulated_annealing ( )
virtual

Sets the hASA of surface exposed hydrophobic neighbors using the pose's neighbor graph. There's no need for BGNodes to keep track of which Nodes are really neighbors (energy graph vs neighbor graph) because they never broadcast changes to their neighboring Nodes.

SurfaceBackgroundNode::prepare_for_simulated_annealing

Implements core::pack::interaction_graph::BackgroundNode< V, E, G >.

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::print ( ) const
virtual
template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::project_surface_deltaE_for_substitution ( SurfaceNode< V, E, G > *  fc_node_changing,
int  changing_nodes_curr_state,
int  changing_nodes_alt_state 
)

returns the change in surface induced by a SurfaceNode undergoing a state substitution.

SurfaceBackgroundNode::project_surface_deltaE_for_substitution

Detailed:
Is it possible for a background node to have a state of zero (or unassigned state). Not really - there's no state for background nodes since they're not changing. What happens if the first class node undergoing sub is in the unassigned state? We have to figure out what the wild-type residue at the changing position is. Should I pass in the node index to this method? I have to pass in a pointer to the node because that's how to get the rotamer information stored there. But get_node_index() is a protected method so I can't call that using the pointer.

Bug fix: Turns out that if you do multiple loops of pack_rotamers, then the method blanket assign state 0 gets called. Have to handle the case where the current state is some nonzero value and the alt_state is going to the zero state. If not, you get seg faults. But, if we're going into the unassigned state, does it make sense in actually calculating a "correct" surface deltaE. Doesn't seem like it. Going to just add a instant return of a bad value!

There's a potential problem with the setting of the alt state count that can creep up on multiple rounds of consider() without concomitant commit(). A separate method has been added to this class to handle these cases. It basically executes the following line each round of consider(). alt_state_num_se_hp_nbs_ = curr_state_num_se_hp_nbs_;

02/20/2009/ Updating the function to do everything with hASA rather than hp counts.

References core::pack::interaction_graph::SurfaceNode< V, E, G >::get_rotamer(), core::pack::interaction_graph::SurfaceNode< V, E, G >::is_below_buried_residue_no_hsasa_cutoff(), core::pack::interaction_graph::SurfaceNode< V, E, G >::num_neighbors_counting_self(), core::pack::interaction_graph::TR_BGNODE(), core::pack::interaction_graph::SurfaceNode< V, E, G >::wt_residue_for_node(), and core::pack::interaction_graph::SurfaceNode< V, E, G >::wt_seqpos_for_node().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::reset_alt_state_total_hASA ( )

Sets the alt state total hASA to the current state total hASA. See comments in SIG and commit_considered_substitution_surface for more information about why this method exists.

SurfaceBackgroundNode::reset_alt_state_total_hASA

References core::pack::interaction_graph::TR_BGNODE().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::surface_exposed ( bool  value)

using this for debugging

SurfaceBackgroundNode::surface_exposed

template<typename V, typename E, typename G>
conformation::Residue const& core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::wt_residue_for_node ( ) const
inline

Member Data Documentation

template<typename V, typename E, typename G>
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::alt_state_total_hASA_
private
template<typename V, typename E, typename G>
const int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::BURIED_RESIDUE_NO_HSASA_CUTOFF = 24
staticprivate
template<typename V, typename E, typename G>
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::curr_state_total_hASA_
private
template<typename V, typename E, typename G>
bool core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::have_prepared_for_simA_
private
template<typename V, typename E, typename G>
const int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::INTERACTION_RADIUS = 10
staticprivate
template<typename V, typename E, typename G>
bool core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::is_below_buried_residue_no_hsasa_cutoff_
private
template<typename V, typename E, typename G>
const int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::MAX_PATCH_SURFACE_AREA = 1100
staticprivate
template<typename V, typename E, typename G>
const int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::MAX_SURFACE_ENERGY = 100
staticprivate
template<typename V, typename E, typename G>
int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::num_neighbors_counting_self_
mutableprivate
template<typename V, typename E, typename G>
Real core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::surface_energy_weight_ = 1.0
staticprivate
template<typename V, typename E, typename G>
bool core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::surface_exposed_
private
template<typename V, typename E, typename G>
const int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::SURFACE_EXPOSED_CUTOFF = 20
staticprivate

The documentation for this class was generated from the following file: