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

Defines the interaction graph that will keep track of changes to the hpatch score. More...

#include <HPatchInteractionGraph.hh>

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

List of all members.

Public Types

typedef
AdditionalBackgroundNodesInteractionGraph
< V, E, G
parent

Public Member Functions

 HPatchInteractionGraph (int num_nodes)
virtual ~HPatchInteractionGraph ()
pose::Pose const & pose () const
void set_pose (pose::Pose const &pose)
task::PackerTask const & packer_task () const
void set_packer_task (task::PackerTask const &task)
 We need a copy of the packer task to figure out which residues are being packed and/or designed. We have to figure the packing options because it determines whether a residue becomes a FirstClass (HPatchNode) node or a background node. This method gets called in IGSupport.cc.
rotamer_set::RotamerSets const & rotamer_sets () const
void set_rotamer_sets (rotamer_set::RotamerSets const &rotsets)
void set_score_weight (Real weight)
void initialize (rotamer_set::RotamerSetsBase const &rot_sets)
void set_num_residues_in_protein (Size num_res)
 tells the graph how many residues there are total in the protein
void set_num_background_residues (Size num_background_residues)
 tells the graph how many residues there are as part of the protein that are not part of the combinatorial optimization process -- they are part of the background
void set_residue_as_background_residue (int residue)
 informs the graph that a particular residue is part of the background
void set_background_residue_rotamer_dots (Size residue, conformation::Residue const &rotamer)
 Creates and inits a RotamerDots object for a background residue. the residue must first have been declared to be a background residue.
void set_rotamer_dots_for_node_state (Size node_index, Size state, conformation::Residue const &rotamer)
 store the coordinates for a particular rotamer
virtual void prepare_for_simulated_annealing ()
 Prepares the graph to begin simulated annealing.
virtual void blanket_assign_state_0 ()
 assigns state 0 -- the unassigned state -- to all (first class) vertices in the graph
Real get_hpatch_score ()
virtual void set_errorfull_deltaE_threshold (core::PackerEnergy deltaE)
 Allows the sim-annealer to specify a deltaE threshold above which, it is no longer necessary to be very accurate.
virtual void consider_substitution (int node_ind, int new_state, core::PackerEnergy &delta_energy, core::PackerEnergy &prev_energy_for_node)
 Returns the (possibly approximate) change in energy induced by switching a particular node from its currently assigned state to some alternate state.
core::PackerEnergy calculate_hpatch_deltaE ()
void register_fc_node_in_state0 ()
void register_fc_node_affected_by_rotsub (int fc_node_ind)
 Called by HPatchNodes to specify which first-class Nodes are affected by a given rotamer substitution. If a given consider gets rejected, then fc_nodes_near_rotsub_ gets cleared when reset_from_previous_deltaHpatch_comp.
void register_bg_node_affected_by_rotsub (int bg_node_ind)
void update_disjoint_sets_using_cache (conformation::Residue const &rsd, InvRotamerDots const &invdots, utility::vector1< Size > const &exp_hphobes, Size residue_djs_offset, utility::vector1< utility::vector1< bool > > const &atom_atom_self_overlap, graph::DisjointSets &ds)
 Helper function for calculating the hpatch score. This function is specific for intra-residue overlaps, the one below is for inter-residue overlaps. The reason they're separate is because the inner loops have different start locations. intra-residue nested loops only have to go over greater-indexed atoms because of commutativity. inter-residue nested loops have to do all ii-res x jj-res atom-atom overlaps.
void update_disjoint_sets_using_cache (conformation::Residue const &rsd1, InvRotamerDots const &invdots1, utility::vector1< Size > const &exp_hphobes1, Size djs_offset_1, conformation::Residue const &rsd2, InvRotamerDots const &invdots2, utility::vector1< Size > const &exp_hphobes2, Size djs_offset_2, utility::vector1< utility::vector1< bool > > const &atom_atom_overlaps, graph::DisjointSets &ds)
 Helper function for calculating the hpatch score.
Real calculate_alt_state_hpatch_score ()
 Constructs an atom-level graph for the alternate state assignment on the IG and then runs the union-find algorithm on it to obtain the connected components. Each connected component is a surface hydrophobic patch. What the total energy of the IG should be hasn't yet been decided. One possibility will be to assign every CC/patch a score and return the sum as the total score.
virtual core::PackerEnergy commit_considered_substitution ()
 Commits the substitution that the sim annealer had previously asked the graph to consider. Returns the accurate total energy for the graph.
virtual core::PackerEnergy set_network_state (FArray1_int &node_states)
 Switch the state assignment of every first class node in the graph. Useful, for instance, if you want to switch to the best network state that you've found so far.
virtual core::PackerEnergy get_energy_current_state_assignment ()
 returns the energy of the entire graph under the current network state assignment. Also sends a bunch of information to standard error. Only seems to be called by the MultiCoolAnnealer.
virtual int get_edge_memory_usage () const
 Should write the state assigned to each first class vertex to the screen.
virtual unsigned int count_static_memory () const
virtual unsigned int count_dynamic_memory () const
virtual Real get_energy_sum_for_vertex_group (Size group_id)
 returns the sum of the PD energy and the hpatch energy for all members first class members of a user-defined vertex subset. Unimplemented.
void print_internal_energies_for_current_state_assignment ()
void print () const
 useful for debugging
int bg_node_2_resid (Size node_index)
 Provides read access to the bg to resid array. Returns -1 if the index is not in bounds.
std::vector< intget_network_state () const
 Returns the state on each FCNode, but not necessarily in pose resid order. Only used by the unit tests.
void set_observed_sufficient_boolean_true ()
 Sets the observed_sufficient_hpatch_E_to_predict_min_ to true. Only used by the unit tests.
void get_all_sasas (utility::vector1< Real > &node_sasas, utility::vector1< Real > &bgnode_sasas)
 Iterates over all nodes and bgnodes brute-force recounting.
HPatchNode< V, E, G > * get_hpatch_node (int index) const
HPatchBackgroundNode< V, E, G > * get_hpatch_bg_node (int index) const

Static Public Member Functions

static void print_hpatch_avoidance_stats ()
 reports on the level of success for hpatch score calculation procrastination
static void reset_hpatch_avoidance_stats ()
 resets static member variables of HPatchIG that measure how worthwhile hpatch calculation procrastination is.

Protected Member Functions

virtual NodeBasecreate_new_node (int node_index, int num_states)
 factory method pattern for instantiation of HPatchNode objects, used by InteractionGraphBase class.
virtual EdgeBasecreate_new_edge (int index1, int index2)
 factory method pattern for instantiation of HPatchEdge objects, used by InteractionGraphBase class.
virtual BackgroundNode< V, E, G > * create_background_node (int node_index)
 factory method pattern for instantiation of HPatchBackgroundNode objects, used by AdditionalBackgroundNodesInteractionGraph class.
virtual
BackgroundToFirstClassEdge< V,
E, G > * 
create_background_edge (int fc_node_index, int bg_node_index)
 factory method pattern for instantiation of HPatchBackgroundEdge objects, used by AdditionalBackgroundNodesInteractionGraph class.
void track_hpatch_E_min ()
 Keeps track of the minimum hpatch score seen. Every 100 substitutions, updates the variable hpatch_score_min_last_100.
void update_internal_energy_totals_hpatch ()
 After every 2^10 commits, the graph traverses its nodes and edges and re-tallies the total energy of the current state assignment. This update prevents the accumulation of numerical drift, increasing accuracy.

Detailed Description

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

Defines the interaction graph that will keep track of changes to the hpatch score.

HPatchInteractionGraph

Detailed:
In addition to implementing the virtual base class methods, this class additionally defines methods relating to keeping track of data relating to hpatch.

Member Typedef Documentation

template<typename V, typename E, typename G>
typedef AdditionalBackgroundNodesInteractionGraph< V, E, G > core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::parent

Constructor & Destructor Documentation

template<typename V , typename E , typename G >
core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::HPatchInteractionGraph ( int  num_nodes)

HPatchInteractionGraph::HPatchInteractionGraph

Detailed:
Main constructor. Initializes all member variables to 0 and false.
template<typename V , typename E , typename G >
core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::~HPatchInteractionGraph ( ) [virtual]

Member Function Documentation

template<typename V , typename E , typename G >
int core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::bg_node_2_resid ( Size  node_index)

Provides read access to the bg to resid array. Returns -1 if the index is not in bounds.

HPatchInteractionGraph::bg_node_2_resid

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

assigns state 0 -- the unassigned state -- to all (first class) vertices in the graph

HPatchInteractionGraph::blanket_assign_state_0

Detailed:
This is the 3rd entry point into the HIG. It is called by the Annealer just before simulated annealing and rotamer substitutions begin to init the graph to unassigned values everywhere.

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

template<typename V , typename E , typename G >
Real core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::calculate_alt_state_hpatch_score ( )

Constructs an atom-level graph for the alternate state assignment on the IG and then runs the union-find algorithm on it to obtain the connected components. Each connected component is a surface hydrophobic patch. What the total energy of the IG should be hasn't yet been decided. One possibility will be to assign every CC/patch a score and return the sum as the total score.

HPatchInteractionGraph::calculate_alt_state_hpatch_score()

Queries all of the Nodes and BGNodes to determine the connectivity assuming the alternate state.

References core::conformation::Residue::atom_name(), core::conformation::Residue::atom_type(), core::graph::DisjointSets::disjoint_set_sizes(), core::graph::DisjointSets::ds_find(), core::chemical::AtomType::element(), core::pack::interaction_graph::SurfacePotential::get_instance(), core::pack::interaction_graph::SurfacePotential::hpatch_score(), core::pack::interaction_graph::SurfacePotential::MAX_HPATCH_AREA, core::pack::interaction_graph::SurfacePotential::MAX_HPATCH_SCORE, core::graph::DisjointSets::node(), core::graph::DS_Node::rank, core::graph::DisjointSets::sets(), and core::pack::interaction_graph::TR_HIG().

template<typename V , typename E , typename G >
core::PackerEnergy core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::calculate_hpatch_deltaE ( )

HPatchInteractionGraph< V, E, G >::calculate_hpatch_deltaE()

Detailed:
Goes through the entire process of calculating the hpatch deltaE for a substitution.

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

template<typename V , typename E , typename G >
core::PackerEnergy core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::commit_considered_substitution ( ) [virtual]

Commits the substitution that the sim annealer had previously asked the graph to consider. Returns the accurate total energy for the graph.

HPatchInteractionGraph::commit_considered_substitution

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::consider_substitution ( int  node_ind,
int  new_state,
core::PackerEnergy delta_energy,
core::PackerEnergy prev_energy_for_node 
) [virtual]

Returns the (possibly approximate) change in energy induced by switching a particular node from its currently assigned state to some alternate state.

HPatchInteractionGraph::consider_substitution

Detailed:
First, queries the HPatchNode for the pairwise-decomposable (PD) energy. If the PD difference implies a collision, then the HPatchIG pretends as if the state substitution causes the best improvement possible in hpatch score, and returns the PD difference + pretend hpatch difference. It will procrastinate computing the actual hpatch score difference until the guiding SimAnnealer decides to commit the substitution. If the SimAnnealer rejects the substitution, then the work to compute the hpatch score is never done. If it is unclear that the SimAnnealer will reject the substitution based on the PD difference, then the Graph goes ahead and computes the change in hpatch score accurately.

This function is the 4th major entry point from the Annealer into the HIG.

Also returns the sum of the two body energies for the node in its current state; the sim-annealer accepts state substitutions at higher chance if the original state was also at a poor energy.

Parameters:
node_ind- [in] - the index of the (first class) node new_state - [in] - the alternate state that the node should consider delta_energy - [out] - the change in energy induced on the entire graph by substituting a node's current state with the alternate. This energy may be inaccurate if it exceeds a threshold set by the sim-annealer. prev_energy_for_node - [out] - the sum of the pair-wise decomposable portion of the energy function for the node's currently assigned state

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

template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::count_dynamic_memory ( ) const [virtual]
template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::count_static_memory ( ) const [virtual]
template<typename V , typename E , typename G >
BackgroundToFirstClassEdge< V, E, G > * core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::create_background_edge ( int  fc_node_index,
int  bg_node_index 
) [protected, virtual]
template<typename V , typename E , typename G >
BackgroundNode< V, E, G > * core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::create_background_node ( int  node_index) [protected, virtual]
template<typename V , typename E , typename G >
EdgeBase * core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::create_new_edge ( int  index1,
int  index2 
) [protected, virtual]

factory method pattern for instantiation of HPatchEdge objects, used by InteractionGraphBase class.

HPatchInteractionGraph::create_new_edge

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

template<typename V , typename E , typename G >
NodeBase * core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::create_new_node ( int  node_index,
int  num_states 
) [protected, virtual]

factory method pattern for instantiation of HPatchNode objects, used by InteractionGraphBase class.

HPatchInteractionGraph::create_new_node

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::get_all_sasas ( utility::vector1< Real > &  node_sasas,
utility::vector1< Real > &  bgnode_sasas 
)

Iterates over all nodes and bgnodes brute-force recounting.

HPatchInteractionGraph< V, E, G >::get_all_sasas

template<typename V , typename E , typename G >
int core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::get_edge_memory_usage ( ) const [virtual]

Should write the state assigned to each first class vertex to the screen.

HPatchInteractionGraph::print_current_state_assignment HPatchInteractionGraph::get_edge_memory_usage

Should return a measurement of the memory used by the interaction graph to store the rotamer pair energies. Unimplemented.

template<typename V , typename E , typename G >
core::PackerEnergy core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::get_energy_current_state_assignment ( ) [virtual]

returns the energy of the entire graph under the current network state assignment. Also sends a bunch of information to standard error. Only seems to be called by the MultiCoolAnnealer.

HPatchInteractionGraph::get_energy_current_state_assignment

template<typename V , typename E , typename G >
Real core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::get_energy_sum_for_vertex_group ( Size  group_id) [virtual]

returns the sum of the PD energy and the hpatch energy for all members first class members of a user-defined vertex subset. Unimplemented.

HPatchInteractionGraph::get_energy_sum_for_vertex_group

template<typename V, typename E, typename G>
HPatchBackgroundNode< V, E, G >* core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::get_hpatch_bg_node ( int  index) const [inline]
template<typename V, typename E, typename G>
HPatchNode< V, E, G >* core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::get_hpatch_node ( int  index) const [inline]
template<typename V, typename E, typename G>
Real core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::get_hpatch_score ( )
template<typename V , typename E , typename G >
std::vector< int > core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::get_network_state ( ) const

Returns the state on each FCNode, but not necessarily in pose resid order. Only used by the unit tests.

HPatchInteractionGraph::get_network_state

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::initialize ( rotamer_set::RotamerSetsBase const &  rot_sets_base)

HPatchInteractionGraph::initialize()

Detailed:
This function is the 1st major entry point (well, after the constructor) into the HIG. It needs to set residues that are not changing as background residues

Oldest comments: In ++, there's a file InteractionGraphSupport.cc which is an analog of the InteractionGraphFactory in mini. In ++, the InteractionGraphSupport file instantiates and initializes, depending on the command line switches, the right interaction graph. For the HPatchInteractionGraph, it first initializes the PDInteractionGraph (which is the base) and then calls the HPatchIG initialize method.

The thing is that this initialize method can't be called when the graph is constructed in the InteractionGraphFactory. The reason is that the PDInteractionGraph base initialize() method is NOT called until later in the pack rotamers process. (Actually it's called from within rotsets->compute_energies().) Only after the rotsets->compute energies returns can I stick in an initialize() method call for the HPatchInteractionGraph (HIG). But then that's too late because the rotsets object has already computed some energies. Perhaps that's ok though. The rotsets object only calculates the PD energy terms - it doesn't do anything with non-PD terms.

If a HIG init method is called during construction of the HIG, then the init method that's called by the rotsets object causes all the node info that was set in the HIG init method to be lost because the rotsets init method recreates all the nodes in the interaction graph when it runs. (That was a fun behaviour to figure out.)

So the solution I'm going for is to call this init method in the prepare for simulated annealing method of this class. That gets called just before SA starts, so it will do the task above then. It doesn't really matter when the task gets done as long as it happens before SA starts. This also means that the HIG will now have to keep a reference to the Pose, the Task, and the RotamerSets objects since it needs all of these things to do tasks 1) and 2). (For the port of this HPatchIG, we might not need the task and rotamer sets objects.)

prepare_for_simulated_annealing gets called by the FixbbSA::run() method. Before this method, the rotamersets object has called compute_energies() (the whole process being started in pack_rotamers) which calls initialize() on the IG. I need to place the HIG init method directly after the IG init method that the RS object calls.

Newest comments: Don't call the parent classes initialize method because that calls create_new_node for all designable positions, making every node in the graph a first class residue (erroneously!). Then after that, some residues are set as background residues so I'm surprised things were even working at all! Unfortunately, the class hierarchy makes setting designable residues that are surface-exposed be the only FirstClassNodes difficult. What has to happen is that non-designable positions will be the BGNodes and molten positions will be FCNodes. Then, each type of node will store a boolean flagging whether it is surface-exposed or not. Then, when a consider sub call is made, the nodes will immediately check the value of the boolean and return 0 immediately if it's not surface-exposed.

07/16/2008- Unfortunately, I can't just replicate all of the functionality of the parent classes initialize method here because it's different for PDIGs and LMIGs. And some of the their corresponding function calls are not defined in both classes so I get compile errors if I try to do it this way. There are a few possible solutions I could use for the problem of schizophrenic node (nodes which are getting assigned as BG and FC nodes). 1) I could just use Andrew's LFs designation that any designable or packable node is a FC node and any node not being packed or designed is a BGNode. This approach is the easiest to implement but since nodes that are only being packed aren't changing in sequence, their surface score shouldn't be changing so it's an inefficiency. 2) I could change the "create_node" call in this class to return either a Node or BGNode depending on what the packer_task has in it. Then the parent templated IG classes would get the right kind of node. But then, I would have to potentially change the AddtlBGNodesIG class method "setNumResiduesAsBackground" because in that call is a for loop which creates background nodes. This would complicate creating new non-PD terms in mini, because it would be specific for this case (surface). 3) Figure out some OO way of handling the distinction between packable and nonpackable residues. The OO-correct way to do this would probably be to subclass AdditionalBackgroundNodesInteractionGraph to something like SASAExposedNodesInteractionGraph and then make the HPatchInteractionGraph inherit that one. Then "FirstClassNodes" would be nodes that are designable and surface-exposed; all other nodes would be "BackgroundNodes".

Since it would require alot of work to write another derived class for probably not that significant (or necessary) performance improvement, I'll just make packable residues be FC nodes also. So continue to call the parent classes initialize() method. Just set residues which are not packable nor designable to BG nodes.

Newest Newest comments": The above text was the case for the SurfaceIG. Turns out that we really do want all packable and designable positions to be FC Nodes. So there's no inefficiency here, as was the case for the SurfaceIG.

References core::pack::rotamer_set::RotamerSets::nmoltenres(), and core::pack::interaction_graph::TR_HIG().

template<typename V, typename E, typename G>
task::PackerTask const& core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::packer_task ( ) const [inline]
template<typename V, typename E, typename G>
pose::Pose const& core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::pose ( ) const [inline]
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::prepare_for_simulated_annealing ( ) [virtual]

Prepares the graph to begin simulated annealing.

HPatchInteractionGraph::prepare_for_simulated_annealing

Detailed:
Invokes both base-class prepare_for_simulated_annealing subroutines: InteractionGraphBase first, to prepare the HPatchNodes and HPatchEdges. Then the AdditionalBackgroundNodesInteractionGraph, to prepare the HPatchBackgroundNodes, the HPatchBackgroundEdges, and to do a little more preparing of the HPatchNodes. Also computes background/background overlap. This is the 2nd major entry point into the HIG.
Remarks:
As it is written, it should only be executed once; that will change, however if we make HPatchInteractionGraph work with ligands (ligands that stay fixed during any single sim annealing process, but that move between anealings.

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

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::print ( ) const

useful for debugging

HPatchInteractionGraph::write_dot_kinemage HPatchInteractionGraph::print

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::print_hpatch_avoidance_stats ( ) [static]
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::print_internal_energies_for_current_state_assignment ( )
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::register_bg_node_affected_by_rotsub ( int  bg_node_ind)
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::register_fc_node_affected_by_rotsub ( int  fc_node_ind)

Called by HPatchNodes to specify which first-class Nodes are affected by a given rotamer substitution. If a given consider gets rejected, then fc_nodes_near_rotsub_ gets cleared when reset_from_previous_deltaHpatch_comp.

HPatchInteractionGraph::register_fc_node_affected_by_rotsub()

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::register_fc_node_in_state0 ( )
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::reset_hpatch_avoidance_stats ( ) [static]

resets static member variables of HPatchIG that measure how worthwhile hpatch calculation procrastination is.

HPatchInteractionGraph::reset_hpatch_avoidance_stats

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

template<typename V, typename E, typename G>
rotamer_set::RotamerSets const& core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::rotamer_sets ( ) const [inline]
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_background_residue_rotamer_dots ( Size  residue,
conformation::Residue const &  rotamer 
)

Creates and inits a RotamerDots object for a background residue. the residue must first have been declared to be a background residue.

HPatchInteractionGraph::set_background_residue_rotamer_dots

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_errorfull_deltaE_threshold ( core::PackerEnergy  deltaE) [virtual]

Allows the sim-annealer to specify a deltaE threshold above which, it is no longer necessary to be very accurate.

HPatchInteractionGraph::set_errorfull_deltaE_threshold

Detailed:
When the annealer asks the graph to consider a state substitution that produces a large collision, the graph may approximate the hpatch deltaE instead of performing expensive sphere overlap computations. The deltaE returned by consider_substitution() will be inaccurate, but if the annealer is unlikely to accept the substitution, then time can be saved. The graph guarantees that if the annealer does commit that substitution that it will go back and perform the hpatch computations and return an accurate total energy for the graph.

References core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::print_hpatch_avoidance_stats(), core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::reset_hpatch_avoidance_stats(), and core::pack::interaction_graph::TR_HIG().

template<typename V , typename E , typename G >
core::PackerEnergy core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_network_state ( FArray1_int &  node_states) [virtual]

Switch the state assignment of every first class node in the graph. Useful, for instance, if you want to switch to the best network state that you've found so far.

HPatchInteractionGraph::set_network_state

Detailed:
This function is the last major entry point from the Annealer into the HIG.

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_num_background_residues ( Size  num_background_residues)

tells the graph how many residues there are as part of the protein that are not part of the combinatorial optimization process -- they are part of the background

HPatchInteractionGraph::set_num_background_residues

Detailed:
The other half of switching between enumeration schemes for the background residues is knowing how many background residues there are.

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_num_residues_in_protein ( Size  num_res)

tells the graph how many residues there are total in the protein

HPatchInteractionGraph::set_num_residues_in_protein

Detailed:
The graph maintains its own enumeration for the background residues; but asks that anyone wanting to refer to them use their original resid. The graph has to switch back and forth between enumeration schemes and must know how many residues there are total to do that efficiently.
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_observed_sufficient_boolean_true ( )

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

HPatchInteractionGraph::set_observed_sufficient_boolean_true

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_packer_task ( task::PackerTask const &  the_task)

We need a copy of the packer task to figure out which residues are being packed and/or designed. We have to figure the packing options because it determines whether a residue becomes a FirstClass (HPatchNode) node or a background node. This method gets called in IGSupport.cc.

HPatchInteractionGraph::set_packer_task

References core::pack::task::PackerTask::clone().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_pose ( pose::Pose const &  pose)

HPatchInteractionGraph::set_pose

Detailed:
All throughout this class, I refer back to the original pose sequence. To be able to do that, I need to have a handle to the pose in this class. That's what this method provides. In IGFactory.cc, this method gets called with the pose object that's being packed/designed.

References protocols::comparative_modeling::features::G, make_table_of_pilot_apps::name, and core::pack::interaction_graph::TR_HIG().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_residue_as_background_residue ( int  residue)

informs the graph that a particular residue is part of the background

HPatchInteractionGraph::set_residue_as_background_residue

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_rotamer_dots_for_node_state ( Size  node_index,
Size  state,
conformation::Residue const &  rotamer 
)
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_rotamer_sets ( rotamer_set::RotamerSets const &  rotsets)

HPatchInteractionGraph::set_rotamer_sets

Detailed:
It's nice to be able to print out information about the possible rotamer during initialization of the IG. This method gets called in IGSupport.cc.
template<typename V, typename E, typename G>
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::set_score_weight ( Real  weight) [inline]
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::track_hpatch_E_min ( ) [protected]

Keeps track of the minimum hpatch score seen. Every 100 substitutions, updates the variable hpatch_score_min_last_100.

HPatchInteractionGraph< V, E, G >::track_hpatch_E_min

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::update_disjoint_sets_using_cache ( conformation::Residue const &  rsd1,
InvRotamerDots const &  invdots1,
utility::vector1< Size > const &  exp_hphobes1,
Size  djs_offset_1,
conformation::Residue const &  rsd2,
InvRotamerDots const &  invdots2,
utility::vector1< Size > const &  exp_hphobes2,
Size  djs_offset_2,
utility::vector1< utility::vector1< bool > > const &  atom_atom_overlaps,
graph::DisjointSets ds 
)
template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::update_disjoint_sets_using_cache ( conformation::Residue const &  rsd,
InvRotamerDots const &  invdots,
utility::vector1< Size > const &  exp_hphobes,
Size  residue_djs_offset,
utility::vector1< utility::vector1< bool > > const &  atom_atom_overlaps,
graph::DisjointSets ds 
)

Helper function for calculating the hpatch score. This function is specific for intra-residue overlaps, the one below is for inter-residue overlaps. The reason they're separate is because the inner loops have different start locations. intra-residue nested loops only have to go over greater-indexed atoms because of commutativity. inter-residue nested loops have to do all ii-res x jj-res atom-atom overlaps.

HPatchInteractionGraph::update_disjoint_sets_using_cache()

References core::pack::interaction_graph::InvRotamerDots::atom_overlap_is_exposed(), core::graph::DisjointSets::ds_find(), and core::graph::DisjointSets::ds_union().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::update_internal_energy_totals_hpatch ( ) [protected]

After every 2^10 commits, the graph traverses its nodes and edges and re-tallies the total energy of the current state assignment. This update prevents the accumulation of numerical drift, increasing accuracy.

HPatchInteractionGraph::update_internal_energy_totals_hpatch

Detailed:
this function becomes less necessary in this implementation since the graph itself calculates the score. no longer do we have the situation where the nodes/bgnodes keep the score and the IG just applies deltaE's every commit. now the IG calculates the score for every consider/commit. the only "drift" that may accumulate would result from not calculating de novo the PD current state energy for a long time. that's why I'm leaving this function in.

References core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::print_hpatch_avoidance_stats().


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