|
| | SurfaceNode (G *owner, int node_index, int num_states) |
| | SurfaceNode constructor. More...
|
| |
| | ~SurfaceNode () override |
| | destructor – no dynamically allocated data, does nothing More...
|
| |
| void | assign_zero_state () override |
| | Assign the node to state 0 – the "unassigned" state. More...
|
| |
| bool | state_unassigned () const override |
| |
| void | assign_state_surface (int state) |
| | Assigns the node to one of the states in its state space or to the unassigned state. More...
|
| |
| Real | get_curr_state_surface_energy () const |
| | returns the surface energy for the node in its current state assignment More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| void | print () const override |
| | useful for debugging - writes information about a node to the tracer More...
|
| |
| void | prepare_for_simulated_annealing () override |
| | 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. More...
|
| |
| virtual unsigned int | getMemoryUsageInBytes () const |
| | Not implemented, but needs to be! More...
|
| |
| unsigned int | count_static_memory () const override |
| | Returns the amount of static memory used by this Node object. More...
|
| |
| unsigned int | count_dynamic_memory () const override |
| | Returns the amount of dynamic memory used by this Node object. More...
|
| |
| 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. More...
|
| |
| 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) |
| | setter for the surface_exposed_ bool 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. 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 node/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. 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. More...
|
| |
| 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. More...
|
| |
| void | set_observed_sufficient_boolean_true () |
| | Sets the observed_sufficient_surface_E_to_predict_min_ to true. Only used by the unit tests. More...
|
| |
| std::vector< Real > | 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. More...
|
| |
| std::vector< Real > | 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. 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...
|
| |
| | ~FirstClassNode () override |
| | FirstClassNode destructor. More...
|
| |
| | FirstClassNode (G *owner, int node_id, int num_states) |
| | FirstClassNode constructor. More...
|
| |
| BackgroundEdgeListIter | add_background_edge (BackgroundToFirstClassEdge< V, E, G > *edge) |
| | Adds a BackgroundToFirstClassEdge to the node's list of such edges and returns an iterator to that list position. More...
|
| |
| void | drop_background_edge (BackgroundEdgeListIter edge) |
| | Removes an edge from the node's BackgroundToFirstClassEdge list. More...
|
| |
| unsigned int | count_dynamic_memory () const override |
| | Returns an int representing the amount of memory in bytes used by this node. More...
|
| |
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.
template<typename V , typename E , typename G >
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 protocols::cluster::calibur::aa, and core::pack::interaction_graph::TR_NODE().
template<typename V , typename E , typename G >
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.
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 >
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.
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 >
returns the change in surface score for this node induced by a state substitution at a neighboring node.
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::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 >
Returns the (possibly approximate) change in energy induced by changing a node from its current state into some alternate state.
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().