|
| HPatchNode (G *owner, int node_index, int num_states) |
| HPatchNode constructor. More...
|
|
virtual | ~HPatchNode () |
| destructor – no dynamically allocated data, does nothing More...
|
|
void | set_rotamers (rotamer_set::RotamerSetCOP rotamers) |
|
conformation::ResidueCOP | get_rotamer (int state) const |
| Returns a constant OP to the rotamer/residue object for the given state. More...
|
|
conformation::ResidueCOP | curr_state_rotamer () const |
|
conformation::ResidueCOP | alt_state_rotamer () const |
|
virtual void | set_rotamer_dots_for_state (Size state, RotamerDots const &rd) |
| stores the coordinates for a state. More...
|
|
bool | overlaps (HPatchNode< V, E, G > *neighbor) |
| returns true if any sphere for any atom of any state on this vertex overlaps with any atom on any sphere on a neighboring vertex. More...
|
|
bool | detect_any_overlap_with_rotamer (RotamerDots const &rotamer) const |
| determines if any atom for any rotamer of this vertex overlaps with any atom from some background residue. called by BGNodes for the detect_background_residue_and_first_class_residue_overlap phase of the prep for simA call in the HPatchIG. More...
|
|
virtual void | prepare_for_simulated_annealing () |
| invokes V's prep_for_simA method. Also computes the "self-overlap" that each of its rotamers has. More...
|
|
void | initialize_overlap_with_background (RotamerDots const &bg_rotamer, std::vector< RotamerDotsCache > &overlap, std::vector< utility::vector1< utility::vector1< bool > > > &states_atom_atom_overlap_on_bg_res) |
| This method computes and caches each set of overlaps this node's states have with a background residue. More...
|
|
virtual void | assign_zero_state () |
| Assign the node to state 0 – the "unassigned" state. More...
|
|
void | acknowledge_neighbors_substitution () |
| bookkeeping to follow a neighbors state substitution. this method gets called when a HPatchNode commits a sub and then broadcasts that change to all its neighboring fc nodes via the incident HPatchEdges. 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 HPatchNode to know what other HPatchNodes are connected to it except via HPatchEdges, the calls seem a bit complicated. A HPatchNode 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 HPatchNode. The inform_non_changing method can not be removed, because it's used during the substitution evaluations as well. More...
|
|
core::PackerEnergy | calculate_PD_deltaE_for_substitution (int alternate_state, core::PackerEnergy &prev_PDenergies_for_node) |
| Returns the change in energy induced by changing a node from its current state into some alternate state for the PD energy terms only. More...
|
|
core::PackerEnergy | get_pd_energy_delta () |
| Returns the deltaE for just the PD terms. Separate method from the one above because this one can be called from within a commit_sub call that didn't go through consider_sub(). More...
|
|
Real | consider_alternate_state () |
| Instructs the Node to update the alt state information held by it and its neighbors in response to switching from the current state to an alternate state. More...
|
|
Real | get_current_state_sasa () const |
| returns the amount of sasa this node has in its current state assignment More...
|
|
Real | get_current_state_sasa (Size atom_index) const |
| Returns the current state SASA for the passed in atom index. More...
|
|
Real | get_alternate_state_sasa (Size atom_index) const |
| Returns the alternate state SASA for the passed in atom index. More...
|
|
utility::vector1
< utility::vector1< bool >
> const & | get_atom_atom_self_overlaps_for_state (Size state) const |
| Returns a const reference to the atom-x-atom-pair vector-of-vectors of bools that specifies which atoms are overlapping, in the given state. More...
|
|
Size | get_current_state_num_atoms () const |
|
Size | get_alt_state_num_atoms () const |
|
int | wt_seqpos_for_node () const |
|
conformation::Residue const & | wt_residue_for_node () const |
|
Real | update_state_for_neighbors_substitution (HPatchNode< V, E, G > *node_considering_substitution, RotamerDots &neighbors_alternate_state, RotamerDotsCache const &neighbors_curr_state_overlap_with_this, RotamerDotsCache &this_overlap_with_neighbors_alternate, RotamerDotsCache &neighbors_alternate_overlap_with_this, utility::vector1< utility::vector1< bool > > &alt_state_atom_atom_overlaps_cache) |
| returns the change in sasa for this node induced by a state substitution at a neighboring node. The node increments the dot coverage count for the RotamerDots object representing the alternate state dots for that neighbor. More...
|
|
void | reset_alt_state_dots () |
| Sets the alt state rotamer dots to the current state rotamer dots. See comments in SIG and commit_considered_substitution for more information about why this method exists. More...
|
|
void | commit_considered_substitution () |
| 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...
|
|
virtual unsigned int | getMemoryUsageInBytes () const |
| Not implemented, but needs to be! More...
|
|
virtual unsigned int | count_static_memory () const |
| Returns the amount of static memory used by this Node object. More...
|
|
virtual unsigned int | count_dynamic_memory () const |
| Returns the amount of dynamic memory used by this Node object. More...
|
|
virtual void | print () const |
| useful for debugging More...
|
|
RotamerDots const & | get_current_state_rotamer_dots () |
| Returns current state. Only used by the unit tests. More...
|
|
RotamerDots const & | get_alt_state_rotamer_dots () |
| Returns current state. Only used by the unit tests. More...
|
|
InvRotamerDots const & | curr_state_inv_dots () const |
|
InvRotamerDots const & | alt_state_inv_dots () const |
|
Size | max_hphobe_atoms_any_restype () const |
|
utility::vector1< Size > const & | curr_state_hphobes () const |
|
utility::vector1< Size > const & | alt_state_hphobes () const |
|
Size | n_curr_state_hphobes () const |
|
Size | n_alt_state_hphobes () const |
|
utility::vector1< Size > const & | curr_state_exp_hphobes () const |
|
utility::vector1< Size > const & | alt_state_exp_hphobes () const |
|
Size | n_curr_state_exp_hphobes () const |
|
Size | n_alt_state_exp_hphobes () const |
|
virtual | ~FirstClassNode () |
| 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...
|
|
template<typename V, typename E, typename G>
class core::pack::interaction_graph::HPatchNode< V, E, G >
Defines a FirstClass node which will keep track of changes in the SASA and hpatch score. FirstClassNode is defined and implemented in AdditionalBackgroundNodesInteractionGraph.
HPatchNode
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.
HPatchNode::commit_considered_substitution
- Detailed:
- 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 states 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!
I'm not sure the above is really a problem in the case of this IG. It seems like even if a non-committed consider() call occurs that alters the alt state counts/dots at some set of nodes, when a following sub does get commit'd(), then the nodes that will get the commit message should have all been updated. Some nodes will still have alt_state counts that are weird, but when a consider() call comes back around to them, it should reset the alt_state before doing anything.
References core::pack::interaction_graph::TR_NODE.
template<typename V , typename E , typename G >
returns the change in sasa for this node induced by a state substitution at a neighboring node. The node increments the dot coverage count for the RotamerDots object representing the alternate state dots for that neighbor.
HPatchNode< V, E, G >::update_state_for_neighbors_substitution
- Detailed:
- The procedure is simple at heart – the caching makes it complex.
alt_state_rotamer_dots_ = current_state_rotamer_dots_; //copy dot coverage counts alt_state_rotamer_dots_.decrement( neighbors_curr_state_overlap_with_this ); alt_state_rotamer_dots_.increment_both( neighbors_alternate_state ); return ( alt_state_rotamer_dots_.get_score() - current_state_rotamer_dots_.get_score() );
Extensive caching techniques save time. Each HPatchEdge stores the dot coverage for each pair of HPatchNodes in their current state. These are stored in the RotamerDotsCache objects. Let's name the vertices: this vertex is vertex B. Vertex B is projecting its hpatch deltaE while vertex A is considering a substitution from one state to another. The edge connecting A and B provides node B with the set of masks for the overlap by the atoms of A's alternate state on all atoms of vertex B.
- Parameters
-
neighbors_alternate_state | - [in/out] - the RotamerDots object representing the alternate state vertex A (the neighbor) is considering. neighbors_curr_state_overlap_with_this - [in] - the RotamerDotsCache object held by the HPatchEdge connecting A and B that represents the coverage of A's current state of B's atoms. this_overlap_with_neighbors_alternate - [out] - the dot cache to store the results of computing the overlap of B's current state on A's alt state neighbors_alternate_overlap_with_this - [out] - the dot cache to store the results of computing the overlap of A's alt state on B's current state mask_this_covered_by_other - [in/out] - starting set of overlaps mask_other_covered_by_this - [in/out] - starting set of overlaps num_atoms_same - [in] - the number of atoms shared between A's current and alternate states. |
What do we do when the current state is unassigned. Then that results in the alt_state starting from being unassigned and we get problems because the RotamerDots object doesn't have any memory assigned to it if it's in the unassigned state.
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_;
References core::pack::interaction_graph::TR_NODE.