Rosetta  2020.46
 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]

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...
 
 ~SurfaceBackgroundNode () override
 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...
 
void prepare_for_simulated_annealing () override
 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 override
 used only for debugging More...
 
unsigned int count_static_memory () const override
 
unsigned int count_dynamic_memory () const override
 Returns an int representing the amount of memory in bytes used by this node. More...
 
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.

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

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 ( )
override

destructor - no dynamicly allocated memory to manage -> empty

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.

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.

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.

References protocols::cluster::calibur::aa.

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

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
overridevirtual

Returns an int representing the amount of memory in bytes used by this node.

Remarks
ronj lists consume more memory because they maintain pointers to the previous and next nodes ronj current calculation uses 4 * # elements in list * sizeof(pointer), but I think this is wrong ronj isn't it only 3 * # elements in list * sizeof(pointer)?
Parameters
total_memory- [out] - the amount of memory used by this node

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

template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::count_static_memory ( ) const
overridevirtual
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

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.

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.

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

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().

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.

See comments in SurfaceNode::initialize_num_neighbors_counting_self for details.

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

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

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.

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.

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 ( )
overridevirtual

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.

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
overridevirtual

used only for debugging

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

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.

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.

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

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: