Rosetta 3.4
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions
core::pack::interaction_graph::SurfaceNode< V, E, G > Class Template Reference

Defines a FirstClass node which will keep track of changes in the surface energy. FirstClassNode is defined and implemented in AdditionalBackgroundNodesInteractionGraph. More...

#include <SurfaceInteractionGraph.hh>

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

List of all members.

Public Types

typedef FirstClassNode< V, E, Gparent

Public Member Functions

 SurfaceNode (G *owner, int node_index, int num_states)
 SurfaceNode constructor.
virtual ~SurfaceNode ()
 destructor -- no dynamically allocated data, does nothing
virtual void assign_zero_state ()
 Assign the node to state 0 -- the "unassigned" state.
virtual bool state_unassigned () const
void assign_state_surface (int state)
 Assigns the node to one of the states in its state space or to the unassigned state.
Real get_curr_state_surface_energy () const
 returns the surface energy for the node in its current state assignment
Real project_deltaE_for_substitution_surface (int alternate_state, core::PackerEnergy &prev_energy_for_node, float deltaE_thresh_for_avoiding_surface_calcs)
 Returns the (possibly approximate) change in energy induced by changing a node from its current state into some alternate state.
Real get_surface_deltaE_for_neighbors_state_substitution (SurfaceNode< V, E, G > *node_considering_substitution, int changing_nodes_curr_state, int changing_nodes_alt_state)
 returns the change in surface score for this node induced by a state substitution at a neighboring node.
Real commit_considered_substitution_surface ()
 Sets the current state to the alternate state this node was asked to consider. Copies appropriate score information. Notifies all of its neighbors that it is going through with the state substitution it had been considering.
void acknowledge_neighbors_substitution_surface ()
 bookkeeping to follow a neighbors state substitution. this method gets called when a SurfaceNode commits a sub and then broadcasts that change to all its neighboring fc nodes via the incident SurfaceEdges. basically we need to set current state equal to alt state here. (Hopefully alt state is still correct!!) Since there's no way for a SurfaceNode to know what other SurfaceNodes are connected to it except via SurfaceEdges, the calls seem a bit complicated. A SurfaceNode has to call acknowledge_state on each Edge. The Edges have to figure out which Node is changing/not changing and then they call an inform_non_changing node of change method. That method then makes the call to this method on the correct SurfaceNode. The inform_non_changing method can not be removed, because it's used during the substitution evaluations as well.
bool detect_neighborship_with_node (int node_id, bool first_class) const
 Determines if this vertex neighbors the calling node Called by all other nodes, and if true is returned an Edge of some sort is created between the nodes.
virtual void print () const
 useful for debugging - writes information about a node to the tracer
virtual void prepare_for_simulated_annealing ()
 invokes V's prep_for_simA method Also populates a map defining which nodes are neighbors according to the tenA neighbor graph. This map will be checked whenever iterating over all edges defined by the energy graph to see if a Node really needs to be updated for the surface score.
virtual unsigned int getMemoryUsageInBytes () const
 Not implemented, but needs to be!
virtual unsigned int count_static_memory () const
 Returns the amount of static memory used by this Node object.
virtual unsigned int count_dynamic_memory () const
 Returns the amount of dynamic memory used by this Node object.
void set_rotamers (rotamer_set::RotamerSetCOP rotamers)
conformation::ResidueCOP get_rotamer (int state) const
int wt_seqpos_for_node () const
conformation::Residue wt_residue_for_node () const
Real get_surface_score_difference () const
 Returns the difference alt state score - current state score.
bool is_surface_exposed () const
 Returns the value of surface_exposed_ which gets set during the SIG initialize() method.
void surface_exposed (bool value)
 setter for the surface_exposed_ bool
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.
void is_below_buried_residue_no_hsasa_cutoff (bool value)
 setter for the is_below_buried_residue_no_hsasa_cutoff_ bool
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.
void initialize_num_neighbors_counting_self () const
 Returns the number of neighbors within the interaction threshold, counting self.
int num_neighbors_counting_self () const
 Returns the value stored in the member variable.
void init_hASA_variables ()
Real calculate_amount_total_hydrophobic_ASA ()
Real average_residue_hASA () const
 Returns the amount of hydrophobic ASA this node/residue adds to a patch.
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).
Real hASA_energy (Real patch_area) const
 Calls a SurfacePotential class method to get the energy for a given patch area. Only nodes with number of nbs less than or equal to SURFACE_EXPOSED_CUTOFF will get a score. All other nodes will have a score of 0.0.
void verify_patch_areas_correct (int node_id, int previous_state, Real previous_state_hASA)
 Checks to make sure that the current state num se hp nbs is correct, by going through all residues in the Pose and brute-force recounting.
void set_observed_sufficient_boolean_true ()
 Sets the observed_sufficient_surface_E_to_predict_min_ to true. Only used by the unit tests.
std::vector< Realget_hASA_for_node_and_nbs ()
 Returns a vector of Reals containing the hASA of se hp nbs for this node in the first index, and then the hASA for all neighboring nodes and bgnodes. Note: Order is not guaranteed here. Only used by the unit tests. Should not exist in release mode.
std::vector< Realget_alt_state_hASA_for_node_and_nbs ()
 Returns a vector of Reals containing the hASA of se hp nbs for this node in the first index, and then the hASA for all neighboring nodes and bgnodes. Note: Order is not guaranteed here. Only used by the unit tests. Should not exist in release mode.
Real get_current_hASA ()
 Returns current hASA. Only used by the unit tests. Should not exist in release mode.
Real get_alt_hASA ()
 Returns current hASA. Only used by the unit tests. Should not exist in release mode.

Static Public Member Functions

static void print_surface_avoidance_stats ()
 reports on the level of success for surface score calculation procrastination
static void reset_surface_avoidance_stats ()
 resets static member variables of SurfaceNode that measure how worthwhile surface score calculation procrastination is.

Public Attributes

rotamer_set::RotamerSetCOP rotamer_set_
utility::vector1
< conformation::ResidueCOP
rotamers_vector_

Protected Member Functions

SurfaceEdge< V, E, G > * get_incident_surface_edge (int index) const
SurfaceBackgroundEdge< V, E, G > * get_edge_to_surface_bg_node (int index) const
SurfaceInteractionGraph< V, E,
G > * 
get_surface_owner () const

Detailed Description

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

Defines a FirstClass node which will keep track of changes in the surface energy. FirstClassNode is defined and implemented in AdditionalBackgroundNodesInteractionGraph.

SurfaceNode

Remarks:
No public default constructor makes this class uncopyable.

Member Typedef Documentation

template<typename V, typename E, typename G>
typedef FirstClassNode< V, E, G > core::pack::interaction_graph::SurfaceNode< V, E, G >::parent

Constructor & Destructor Documentation

template<typename V , typename E , typename G >
core::pack::interaction_graph::SurfaceNode< V, E, G >::SurfaceNode ( G owner,
int  node_index,
int  num_states 
)

SurfaceNode constructor.

SurfaceNode< V, E, G >::SurfaceNode

Parameters:
owner- [in] - the owning interaction graph node_id - [in] - the index for this node amongst its owners set num_states - [in] - the number of states for this node

References core::pack::interaction_graph::SurfaceNode< V, E, G >::get_surface_owner(), and core::pack::interaction_graph::TR_NODE().

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

destructor -- no dynamically allocated data, does nothing

SurfaceNode< V, E, G >::~SurfaceNode


Member Function Documentation

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::acknowledge_neighbors_substitution_surface ( )

bookkeeping to follow a neighbors state substitution. this method gets called when a SurfaceNode commits a sub and then broadcasts that change to all its neighboring fc nodes via the incident SurfaceEdges. basically we need to set current state equal to alt state here. (Hopefully alt state is still correct!!) Since there's no way for a SurfaceNode to know what other SurfaceNodes are connected to it except via SurfaceEdges, the calls seem a bit complicated. A SurfaceNode has to call acknowledge_state on each Edge. The Edges have to figure out which Node is changing/not changing and then they call an inform_non_changing node of change method. That method then makes the call to this method on the correct SurfaceNode. The inform_non_changing method can not be removed, because it's used during the substitution evaluations as well.

SurfaceNode::acknowledge_neighbors_substitution_surface

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::assign_state_surface ( int  state)

Assigns the node to one of the states in its state space or to the unassigned state.

SurfaceNode::assign_state_surface

Detailed:
Piggy backs on the standard project_deltaE/commit_considered_substitution protocol. Slightly inefficient; however, this code is executed once per simulated annealing run. Not worth optimizing. (apl)

References make_table_of_pilot_apps::f, and core::pack::interaction_graph::TR_NODE().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::assign_zero_state ( ) [virtual]

Assign the node to state 0 -- the "unassigned" state.

SurfaceNode::assign_zero_state

Detailed:
A node in state 0 produces no surface score. Its neighbors have to adjust their scores appropriately. This method iterates over all the edges emanating from this node and tells them to acknowledge that they've been zeroed out.
template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceNode< 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).

SurfaceNode::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::SurfaceNode< V, E, G >::average_residue_hASA ( ) const

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

SurfaceNode::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.
template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceNode< V, E, G >::calculate_amount_total_hydrophobic_ASA ( )

SurfaceNode::calculate_amount_total_hydrophobic_ASA

Detailed:
Iterates over all the edges emanating from a residues context graph and determines how many surface-exposed total neighbors that residue has including itself. Uses the context graph in the Pose object because this function is only used for initialization. After being calculated once, incrementing and decrementing can be used instead of reiterating over all edges.

Bug source. This function is not just used once during initialization.

As of 8/1/08, changing this function to iterate over all residues in the pose to determine the number of se nbs instead of using the tenA neighbor graph. This change is so that different interaction thresholds can be used. For example, say I want to find all patches within 8A, not 10A. Can't use the 10A to initialize with or certain correctness checks fail in the Node methods.

Big change: Making this method be part of Node/BGNodes. It's just too difficult to keep this method as part of the SIG. And I can't immediately think of a good reason to keep it in the SIG. It's more a functionality which the nodes should handle.

02/20/09, Changing the method to return the total amount of hydrophobic accessibile surface area instead of the number of hydrophobic neighbors. But most of the code remains the same. We want to sum up the average residue hASA for all of the surface-exposed neighbors within 10A.

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

template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceNode< V, E, G >::commit_considered_substitution_surface ( )

Sets the current state to the alternate state this node was asked to consider. Copies appropriate score information. Notifies all of its neighbors that it is going through with the state substitution it had been considering.

SurfaceNode::commit_considered_substitution_surface

Detailed:
If the node had procrastinated the surface deltaE computation because it thought the sim-annealer unlikely to accept the substitition, then the node must now do the work it procrastinated.

There's a potential situation with considers() and commits() that needs to be checked for here. It's possible that a consider() call is made which causes a set of Nodes to update their alt state counts correspondingly. Since the consider() only gets processed by (or actually the call only goes out to) Nodes which are neighbor graph neighbors, only those Nodes will have their counts updated. Assume that the first consider() is really bad and no commit goes out. If we then consider() another sub, the alt state counts at the previous consider()'s set of nodes are incorrect. If get_deltaE is called by this consider() on some of those nodes, some of them will have their alt states reset. But when the commit goes out to ALL Nodes that are neighbors (NOT just the neighbor graph neighbors) it's possible that some of the Nodes will save the wrong alt state count. One way I think this can be avoided to is check at this node, if the alt state count is different from current, whether the node that originally changed is a neighbor graph neighbor of this node. If it is, that means the counts changed because of that node. If it's not, then this Node must have been one of the ones that fell out of sync. Oooooh, I just thought of another way. When the SIG consider() method is called, I could have a reset alt state counts method that will deal with Nodes that are out of sync. That's more elegant than yet another if statement here!

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

template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::SurfaceNode< V, E, G >::count_dynamic_memory ( ) const [virtual]

Returns the amount of dynamic memory used by this Node object.

SurfaceNode::count_dynamic_memory

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

template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::SurfaceNode< V, E, G >::count_static_memory ( ) const [virtual]

Returns the amount of static memory used by this Node object.

SurfaceNode::count_static_memory

template<typename V , typename E , typename G >
bool core::pack::interaction_graph::SurfaceNode< V, E, G >::detect_neighborship_with_node ( int  node_index,
bool  first_class 
) const

Determines if this vertex neighbors the calling node Called by all other nodes, and if true is returned an Edge of some sort is created between the nodes.

SurfaceNode::detect_neighborship_with_node

Detailed:
To determine whether the passed in fc node is neighbors with this one, we need to iterate through the list of neighbors in the tenA neighbor graph (a ContextGraph) that's stored in the Pose Energies object. Assumes that the Pose has already been scored by some ScoreFunction. The tenA neighbor graph is cool if we want to look at an interaction distance of 10A. But what if we want to only find patches of exposed hydrophobics within an 8A sphere. Then we can't use the tenA neighbor. Instead use an expensive distance measurement between the centroids of the wild-type residues to determine "are they neighbors".

The only problem with making this method generic for fc nodes or bg nodes is that when an index is passed in, it's not possible to really tell if it's a fc node index or bg node index. Rather than making two separate methods for detecting neighborship, add a second parameter to this function which specificies if the node being checked is fc or not. That way we can get the pose residue object correct.

This method basically makes the decision for whether to create a SurfaceEdge or SurfaceBackgroundEdge between two Nodes. It really is what defines how much of the surface we design for.

References core::kinematics::distance(), core::conformation::Residue::nbr_atom(), core::pose::Pose::residue(), and core::conformation::Residue::xyz().

Referenced by core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::detect_neighborship().

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

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

SurfaceNode::get_alt_hASA

template<typename V , typename E , typename G >
std::vector< Real > core::pack::interaction_graph::SurfaceNode< V, E, G >::get_alt_state_hASA_for_node_and_nbs ( )

Returns a vector of Reals containing the hASA of se hp nbs for this node in the first index, and then the hASA for all neighboring nodes and bgnodes. Note: Order is not guaranteed here. Only used by the unit tests. Should not exist in release mode.

SurfaceNode::get_alt_state_hASA_for_node_and_nbs

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

returns the surface energy for the node in its current state assignment

SurfaceNode::get_curr_state_surface_energy()

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

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

SurfaceNode::get_current_hASA

template<typename V, typename E, typename G>
SurfaceBackgroundEdge< V, E, G >* core::pack::interaction_graph::SurfaceNode< V, E, G >::get_edge_to_surface_bg_node ( int  index) const [inline, protected]
template<typename V , typename E , typename G >
std::vector< Real > core::pack::interaction_graph::SurfaceNode< V, E, G >::get_hASA_for_node_and_nbs ( )

Returns a vector of Reals containing the hASA of se hp nbs for this node in the first index, and then the hASA for all neighboring nodes and bgnodes. Note: Order is not guaranteed here. Only used by the unit tests. Should not exist in release mode.

SurfaceNode::get_hASA_for_node_and_nbs

template<typename V, typename E, typename G>
SurfaceEdge< V, E, G >* core::pack::interaction_graph::SurfaceNode< V, E, G >::get_incident_surface_edge ( int  index) const [inline, protected]
template<typename V , typename E , typename G >
conformation::ResidueCOP core::pack::interaction_graph::SurfaceNode< V, E, G >::get_rotamer ( int  state) const
template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceNode< V, E, G >::get_surface_deltaE_for_neighbors_state_substitution ( SurfaceNode< V, E, G > *  node_considering_substitution,
int  changing_nodes_curr_state,
int  changing_nodes_alt_state 
)

returns the change in surface score for this node induced by a state substitution at a neighboring node.

SurfaceNode< V, E, G >::get_surface_deltaE_for_neighbors_state_substitution

Detailed:
So a neighboring first class node that is changing is invoking (via the SurfaceEdge that connects them) this method so that this node can update its counts and then return a change in surface score for this node. This method needs to check if the alt_state that the connected node is considering is going to change the counts here and then perform the lookup for the change in score.

is the rotamer id (state) the same for every node? no. need to either do the work in the edge class method or pass a reference to the node. oooooh, we can use the SIG to get the node changing, too!!! NO! Can't. The SIG get_surface_node( index ) method is protected. Lame. Since I need a way to check the rotamer vector for the changing node (to see what the changing states are) I have to make this method take a raw pointer to the node changing. The alternative would be to do all the state checking in the edge class method, but I feel like this sort of state checking should be done by a Node, not an Edge. Further, this frees the Edge class from having to keep any of the data that the Nodes contains (i.e. the counts of neighbors). The edges just pass along the message (from the changing node) to the other Node, not doing any kind of Node-specific behaviour.

the current state of this node may be unassigned (0). if so, we need to initialize the hASA properly. as of 7/22, the current amount of hydrophobic surface area should be init'd after prep for simA runs. alt state also. if ( parent::get_current_state() == 0 ) curr_state_total_hASA_ = get_surface_owner()->calculate_amount_total_hydrophobic_ASA;

07/24/08 problem situation it's probable that a sub that was considered before wasn't committed, so the alt state count at this node needs to go back to what the current state count is. the problem that may crop up with the reset here is that on a previous consider call, a set of nodes will update their counts. if commit is not called, and a second consider is called, then this node will have its alt state count reset but what about all the other nodes in the previous set. how will their counts get reset to the current state count? perhaps a check in the commit method can be added. nope, a new method has been added to Nodes and BGNodes to handle this case. alt_state_total_hASA_ = curr_state_total_hASA_;

02/20/09 Changed all variable names above to reflect hASA instead of counts.

References core::conformation::Residue::aa(), 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_NODE(), and core::pack::interaction_graph::SurfaceNode< V, E, G >::wt_residue_for_node().

template<typename V, typename E, typename G>
SurfaceInteractionGraph< V, E, G >* core::pack::interaction_graph::SurfaceNode< V, E, G >::get_surface_owner ( ) const [inline, protected]
template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceNode< V, E, G >::get_surface_score_difference ( ) const

Returns the difference alt state score - current state score.

SurfaceNode::get_surface_score_difference

Detailed:
This method requires that the variables current_state_ and alternate_state_ hold the correct values. An assert guard checks to make sure an out-of-bounds exception won't occur.
template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::SurfaceNode< V, E, G >::getMemoryUsageInBytes ( ) const [virtual]

Not implemented, but needs to be!

SurfaceNode::getMemoryUsageInBytes

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

Calls a SurfacePotential class method to get the energy for a given patch area. Only nodes with number of nbs less than or equal to SURFACE_EXPOSED_CUTOFF will get a score. All other nodes will have a score of 0.0.

SurfaceNode::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::SurfaceNode< V, E, G >::init_hASA_variables ( )
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::initialize_num_neighbors_counting_self ( ) const

Returns the number of neighbors within the interaction threshold, counting self.

SurfaceNode::initialize_num_neighbors_counting_self

Detailed:
A member variable stores the value so that this method only has to run once and lookups can be performed thereafter. The reason we need to know the number of neighbors is that determining whether a residue is surface exposed depends on how many neighbors it has. For most applications, we have been using the approximation that residues with fewer than 16 neighbors in a 10A radius are surface-exposed. The original method of doing this was done with the tenA nb graph. Then I switched to using cB-cB distances and using the INTERACTION_RADIUS to define neighbors. I'm reverting back to using the tenA neighbor graph. The number of neighbors variable is only used to determine whether a residue is surface exposed or not. It's not like the detect neighborship between Node objects method that effectively defines how much of the surface gets looked at per substitution. Thus, using the tenA nb graph here is ok.

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

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

setter for the is_below_buried_residue_no_hsasa_cutoff_ bool

SurfaceNode::is_below_buried_residue_no_hsasa_cutoff

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

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

SurfaceNode::is_surface_exposed

template<typename V , typename E , typename G >
int core::pack::interaction_graph::SurfaceNode< V, E, G >::num_neighbors_counting_self ( ) const
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::prepare_for_simulated_annealing ( ) [virtual]

invokes V's prep_for_simA method Also populates a map defining which nodes are neighbors according to the tenA neighbor graph. This map will be checked whenever iterating over all edges defined by the energy graph to see if a Node really needs to be updated for the surface score.

SurfaceNode::prepare_for_simulated_annealing

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::print ( ) const [virtual]

useful for debugging - writes information about a node to the tracer

SurfaceNode::print

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::print_surface_avoidance_stats ( ) [static]
template<typename V , typename E , typename G >
Real core::pack::interaction_graph::SurfaceNode< V, E, G >::project_deltaE_for_substitution_surface ( int  alternate_state,
core::PackerEnergy prev_PDenergies_for_node,
float  deltaE_thresh_for_avoiding_surface_calcs 
)

Returns the (possibly approximate) change in energy induced by changing a node from its current state into some alternate state.

SurfaceNode::project_deltaE_for_substitution_surface

Detailed:
Iterates across the edges first to determine the sum of the pairwise decomposable (PD) energy. If the PD difference implies a collision, then the SurfaceNode pretends as if the state substitution causes the best improvement possible in surface score for it and its neighbors, returns the PD difference + pretend surface difference. It will procrastinate computing the actual surface score difference until the guiding SimAnnealer decides to commit the substitution. If the SimAnnealer rejects the substitution, then the work to compute the surface score is never done. If it is unclear that the SimAnnealer will reject the substitution based on the PD difference, then the vertex computes the change in surface score that it induces on its neighbors. The surface score calculation really isn't that intensive but it doesn't make sense to calculate it needlessly. (apl)

Bug source: Incident edges to a node are edges which have some energy on them based on the score function used (meaning they connect to nodes that interact with this node). This set of nodes is larger than the set of nodes that the tenA neighbor graph in the Pose considers neighbors for this node. Thus, when calculating the true number of se hp neighbors, some nodes are updated when they shouldn't be leading to incorrect counts. Possible solutions include 1) keeping some type of data structure (e.g. a map) which specifies which residues are neighbors (in the tenA neighbor graph sort of way) and whenever iterating over incident edges checking to make sure nodes are really neighbors before doing any updating of the counts; 2) forget about which nodes are truly neighbors (as determined by the tenA neighbor graph) and just use whatever the energy function thinks neighbors should be. I don't like this approach though, because I want to have the freedom to adjust what kind of radius I use for residue neighbors for future versions of the surface energy term. Not just assume that the energy function picks neighors correctly.

Where should the neighbor cache be kept? If I keep it on the Node, then the lookups would have to occur in the Node methods that change the counts. If I keep it on the Edges though, I can check for neighborship when iterating over edges and not ever even go into the Node methods. Keep it on the Nodes. That's where it makes sense to keep it.

Parameters:
alternate_state- [in] - the alternate state that the node must consider prev_PDenergies_for_node - [out] - the sum of the PD energies (one-and two-body) for the node in its current state deltaE_thresh_for_avoiding_surface_calcs - [in] - the minimum deltaE for which the SimAnnealer will accept slopyness in the deltaE projections

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< 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.

SurfaceNode::reset_alt_state_total_hASA

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::reset_surface_avoidance_stats ( ) [static]

resets static member variables of SurfaceNode that measure how worthwhile surface score calculation procrastination is.

SurfaceNode::reset_surface_avoidance_stats

Referenced by core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::set_errorfull_deltaE_threshold().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::set_observed_sufficient_boolean_true ( )

Sets the observed_sufficient_surface_E_to_predict_min_ to true. Only used by the unit tests.

SurfaceNode::set_observed_sufficient_boolean_true

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::set_rotamers ( rotamer_set::RotamerSetCOP  rotamers)

SurfaceNode::set_rotamers

Need to save a reference to the rotamer_set so that we can determine what a particular state change will do to the score

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

template<typename V, typename E, typename G>
virtual bool core::pack::interaction_graph::SurfaceNode< V, E, G >::state_unassigned ( ) const [inline, virtual]
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::surface_exposed ( bool  value)

setter for the surface_exposed_ bool

SurfaceNode::surface_exposed

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceNode< V, E, G >::verify_patch_areas_correct ( int  node_id,
int  previous_state,
Real  previous_state_hASA 
)

Checks to make sure that the current state num se hp nbs is correct, by going through all residues in the Pose and brute-force recounting.

SurfaceNode< V, E, G >::verify_patch_areas_correct

References core::kinematics::distance(), core::conformation::Residue::nbr_atom(), core::pose::Pose::residue(), core::pose::Pose::total_residue(), core::pack::interaction_graph::TR_NODE(), and core::conformation::Residue::xyz().

template<typename V, typename E, typename G>
conformation::Residue core::pack::interaction_graph::SurfaceNode< V, E, G >::wt_residue_for_node ( ) const [inline]
template<typename V, typename E, typename G>
int core::pack::interaction_graph::SurfaceNode< V, E, G >::wt_seqpos_for_node ( ) const [inline]

Member Data Documentation

template<typename V, typename E, typename G>
rotamer_set::RotamerSetCOP core::pack::interaction_graph::SurfaceNode< V, E, G >::rotamer_set_

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