Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G > Class Template Reference

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

#include <SurfaceInteractionGraph.hh>

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

Public Types

typedef
AdditionalBackgroundNodesInteractionGraph
< V, E, G
parent
 
- Public Types inherited from core::pack::interaction_graph::AdditionalBackgroundNodesInteractionGraph< V, E, G >
typedef std::vector
< BackgroundNode< V, E, G > * > 
BackgroundNodeVector
 
typedef std::list
< BackgroundToFirstClassEdge
< V, E, G > * > 
BackgroundEdgeList
 
typedef std::list
< BackgroundToFirstClassEdge
< V, E, G > * >::iterator 
BackgroundEdgeListIter
 
typedef std::list
< BackgroundToFirstClassEdge
< V, E, G >
* >::const_iterator 
BackgroundEdgeListConstIter
 

Public Member Functions

 SurfaceInteractionGraph (int num_nodes)
 Main constructor. More...
 
 ~SurfaceInteractionGraph () override
 
void initialize (pack_basic::RotamerSetsBase const &rot_sets) override
 
void prepare_graph_for_simulated_annealing () override
 Prepares the graph to begin simulated annealing. More...
 
void blanket_assign_state_0 () override
 assigns state 0 – the unassigned state – to all (first class) vertices in the graph More...
 
core::PackerEnergy set_state_for_node (int node_ind, int new_state) override
 Assign new_state to the first class node with index node_ind. More...
 
core::PackerEnergy set_network_state (ObjexxFCL::FArray1_int &node_states) override
 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. Like after simulated annealing is done with! More...
 
void consider_substitution (int node_ind, int new_state, core::PackerEnergy &delta_energy, core::PackerEnergy &prev_energy_for_node) override
 returns the change in energy induced by switching a particular node from its currently assigned state to some alternate state. More...
 
core::PackerEnergy commit_considered_substitution () override
 Commits the substitution that the sim annealer had previously asked the graph to consider. Returns the accurate total energy for the graph. More...
 
core::PackerEnergy get_energy_current_state_assignment () override
 returns the energy of the entire graph under the current network state assignment. More...
 
virtual void set_errorfull_deltaE_threshold (Real deltaE)
 Allows the sim-annealer to specify a deltaE threshold above which, it is no longer necessary to be very accurate. More...
 
void set_num_residues_in_protein (int num_res)
 tells the graph how many residues there are total in the protein More...
 
void set_num_background_residues (int 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 More...
 
void set_residue_as_background_residue (int residue)
 informs the graph that a particular residue is part of the background. first class residues, in terms of surface, will be residues that are surface exposed and are varying. background residues will be ones that are surface exposed but not varying since they will contribute to the surface score of the first class residues and whose own surface score will change depending on the first class residues. More...
 
void print_internal_energies_for_current_state_assignment ()
 Prints out the one and two-body energies for every node and bgnode in the graph. More...
 
int get_edge_memory_usage () const override
 Should return a measurement of the memory used by the interaction graph to store the rotamer pair energies. Unimplemented. More...
 
unsigned int count_static_memory () const override
 
unsigned int count_dynamic_memory () const override
 
void print () const override
 useful for debugging More...
 
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 for 2 reasons: 1) to figure out what (if any) the weight on the surface score is; and 2) to determine which residues are being packed and/or designed. We have to figure the packing options because it determines whether a residue becomes a FirstClass (SurfaceNode) node or a background node. More...
 
void set_surface_score_weight (Real weight)
 
Real surface_score_weight ()
 
rotamer_set::RotamerSets const & rotamer_sets () const
 
void set_rotamer_sets (rotamer_set::RotamerSets const &rotsets)
 
int bg_node_2_resid (int node_index)
 Provides read access to the bg to resid array. Returns -1 if the index is not in bounds. More...
 
std::vector< int > get_network_state () const
 Returns the state on each FCNode, but not necessarily in pose resid order. Only used by the unit tests. 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< Realget_hASA_for_node_and_nbs (int index)
 Sets the observed_sufficient_surface_E_to_predict_min_ to true. Only used by the unit tests. More...
 
std::vector< Realget_alt_state_hASA_for_node_and_nbs (int index)
 Sets the observed_sufficient_surface_E_to_predict_min_ to true. Only used by the unit tests. More...
 
- Public Member Functions inherited from core::pack::interaction_graph::AdditionalBackgroundNodesInteractionGraph< V, E, G >
 AdditionalBackgroundNodesInteractionGraph (int num_nodes)
 AdditionalBackgroundNodesInteractionGraph constructor; no default or copy constructors; no operator =. More...
 
 ~AdditionalBackgroundNodesInteractionGraph () override
 AdditionalBackgroundNodesInteractionGraph destructor. More...
 
unsigned int getTotalMemoryUsage () const override
 Returns an int representing the total amount of memory in bytes used by this graph. More...
 
unsigned int count_dynamic_memory () const override
 Returns an int representing the amount of dynamic memory in bytes used by this graph. More...
 
int get_num_background_nodes () const
 

Protected Member Functions

core::pack::interaction_graph::NodeBasecreate_new_node (int node_index, int num_states) override
 factory method pattern for instantiation of SurfaceNode objects, used by InteractionGraphBase class. More...
 
core::pack::interaction_graph::EdgeBasecreate_new_edge (int index1, int index2) override
 factory method pattern for instantiation of SurfaceEdge objects, used by InteractionGraphBase class. More...
 
BackgroundNode< V, E, G > * create_background_node (int node_index) override
 factory method pattern for instantiation of SurfaceBackgroundResidueNode objects, used by AdditionalBackgroundNodesInteractionGraph class. More...
 
BackgroundToFirstClassEdge< V,
E, G > * 
create_background_edge (int fc_node_index, int bg_node_index) override
 factory method pattern for instantiation of SurfaceBackgroundEdge objects, used by AdditionalBackgroundNodesInteractionGraph class. More...
 
SurfaceNode< V, E, G > * get_surface_node (int index) const
 
SurfaceBackgroundNode< V, E, G > * get_surface_bg_node (int index) const
 
void update_internal_energy_totals_surface ()
 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. More...
 
- Protected Member Functions inherited from core::pack::interaction_graph::AdditionalBackgroundNodesInteractionGraph< V, E, G >
void clean_up_bgtfc_edges_marked_for_deletion ()
 Remove those BackgroundToFirstClassEdges that have marked themselves for deletion. More...
 
void drop_background_edge (BackgroundEdgeListIter iter)
 Constant time edge removal. More...
 
void set_num_background_nodes (int num_bg_nodes)
 sets the number of background nodes in the graph. Should be called no more than once. Some problem instances do not require background nodes. More...
 
void add_background_edge (int first_class_node_index, int bg_node_index)
 adds a BackgroundToFirstClassEdge to the graph and performs the requisite bookkeepking. More...
 
BackgroundToFirstClassEdge< V,
E, G > * 
find_background_edge (int first_class_node_index, int bg_node_index) const
 returns a pointer to the background edge, identified by the indices of the first and second class nodes it connects. Returns the null pointer if the edge does not exist. Possibly linear time operation (in the number of BackgroundToFirstClassEdges). More...
 
int get_num_bg_edges () const
 
BackgroundNode< V, E, G > * get_background_node (int index) const
 
void prepare_graph_for_simulated_annealing () override
 invokes prepare_for_simulated_annealing on each of the BackgroundToFirstClassEdges and then invokes prepare_for_simulated_annealing on each of the BackgroundNodes. More...
 
BackgroundEdgeListConstIter get_bg_edge_list_begin () const
 
BackgroundEdgeListConstIter get_bg_edge_list_end () const
 

Private Member Functions

void detect_background_residue_and_first_class_residue_neighbors ()
 iterates across all pairs of first- and second-class nodes to determine which should be considered neighbors. Adds a SurfaceBackgroundEdge between any pair that are. More...
 
void blanket_reset_alt_state_total_hASAs ()
 Iterates through all Nodes and BGNodes and resets their alt state total hASA to the current state total hASA. More...
 
 SurfaceInteractionGraph ()
 
 SurfaceInteractionGraph (SurfaceInteractionGraph< V, E, G > const &)
 
SurfaceInteractionGraph< V, E,
G > & 
operator= (SurfaceInteractionGraph< V, E, G > const &)
 

Private Attributes

int num_total_residues_
 
int num_residues_assigned_as_background_
 
utility::vector1< int > resid_2_bgenumeration_
 
utility::vector1< int > bgenumeration_2_resid_
 
int num_commits_since_last_update_
 
core::PackerEnergy total_energy_current_state_assignment_
 
core::PackerEnergy total_energy_alternate_state_assignment_
 
int node_considering_alt_state_
 
Real deltaE_threshold_for_avoiding_surface_calcs_
 
bool prepared_for_simulated_annealing_
 
pose::PoseOP pose_
 
task::PackerTaskOP packer_task_
 
rotamer_set::RotamerSetsOP rotamer_sets_
 
core::Real surface_score_weight_
 

Static Private Attributes

static const int COMMIT_LIMIT_BETWEEN_UPDATES = 1024
 
static const int SURFACE_EXPOSED_CUTOFF = 20
 
static const int BURIED_RESIDUE_NO_HSASA_CUTOFF = 24
 

Detailed Description

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

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

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

Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Main constructor.

Parameters
num_nodes- [in] - the number of first class nodes in the graph. The number of second class nodes is reported to the graph much later.
template<typename V , typename E , typename G >
core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::~SurfaceInteractionGraph ( )
override
template<typename V, typename E, typename G>
core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::SurfaceInteractionGraph ( )
private
template<typename V, typename E, typename G>
core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::SurfaceInteractionGraph ( SurfaceInteractionGraph< V, E, G > const &  )
private

Member Function Documentation

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

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

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::blanket_assign_state_0 ( )
override

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

References TR_SIG().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::blanket_reset_alt_state_total_hASAs ( )
private

Iterates through all Nodes and BGNodes and resets their alt state total hASA to the current state total hASA.

the Node consider() function is the main entry point from the SIG when the annealer considers a sub. need to make sure that the node's alt_state hASA is the same as the current state before we start incrementing/decrementhing things or otherwise I wind up with total hASAs that are wrong. alt state will be the same as current state on the first time through because of prep for simA call, but not necessarily the case on next substitution coming from annealer. this only sets the alt state hASA on this particular (changing) node. all of the other nodes which were called on to consider a substitution and whose hASAs changed need to reset their alt state hASA also (or, otherwise, it appears as if the substitution was committed). More about this problem can be read in the comments for commit_considered_substitution_surface()

02/23/2009 Updated this function and the functions it calls to do everything in terms of hASA instead of se hp counts.

References TR_SIG().

template<typename V , typename E , typename G >
core::PackerEnergy core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::commit_considered_substitution ( )
override

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

References TR_SIG().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::consider_substitution ( int  node_ind,
int  new_state,
core::PackerEnergy delta_energy,
core::PackerEnergy prev_energy_for_node 
)
override

returns the change in energy induced by switching a particular node from its currently assigned state to some alternate state.

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

template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::count_dynamic_memory ( ) const
override
template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::count_static_memory ( ) const
override
template<typename V , typename E , typename G >
BackgroundToFirstClassEdge< V, E, G > * core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::create_background_edge ( int  fc_node_index,
int  bg_node_index 
)
overrideprotectedvirtual

factory method pattern for instantiation of SurfaceBackgroundEdge objects, used by AdditionalBackgroundNodesInteractionGraph class.

Parameters
fc_node_index- [in] - the index of the first class node sc_node_index - [in] - the index of the second class node
Remarks
Returns a pointer to the created SurfaceBackgroundEdge

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

template<typename V , typename E , typename G >
BackgroundNode< V, E, G > * core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::create_background_node ( int  node_index)
overrideprotectedvirtual

factory method pattern for instantiation of SurfaceBackgroundResidueNode objects, used by AdditionalBackgroundNodesInteractionGraph class.

Parameters
node_index- [in] - the index of the (second class) node

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

References TR_SIG().

template<typename V , typename E , typename G >
core::pack::interaction_graph::EdgeBase * core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::create_new_edge ( int  index1,
int  index2 
)
overrideprotected

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

Parameters
index1- [in] - the index of the lower-indexed (first class) node index2 - [in] - the index of the higher-indexed (first class) node

References TR_SIG().

template<typename V , typename E , typename G >
core::pack::interaction_graph::NodeBase * core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::create_new_node ( int  node_index,
int  num_states 
)
overrideprotected

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

The IGBase class calls this method for all residues that are designable.

Parameters
node_index- [in] - the index of the (first class) node num_states - [in] - the number of states for that node

References TR_SIG().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::detect_background_residue_and_first_class_residue_neighbors ( )
private

iterates across all pairs of first- and second-class nodes to determine which should be considered neighbors. Adds a SurfaceBackgroundEdge between any pair that are.

References TR_SIG().

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

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

template<typename V , typename E , typename G >
int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::get_edge_memory_usage ( ) const
override

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::SurfaceInteractionGraph< V, E, G >::get_energy_current_state_assignment ( )
override

returns the energy of the entire graph under the current network state assignment.

template<typename V , typename E , typename G >
std::vector< Real > core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::get_hASA_for_node_and_nbs ( int  index)

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

template<typename V , typename E , typename G >
std::vector< int > core::pack::interaction_graph::SurfaceInteractionGraph< 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.

template<typename V, typename E, typename G>
SurfaceBackgroundNode< V, E, G >* core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::get_surface_bg_node ( int  index) const
inlineprotected
template<typename V, typename E, typename G>
SurfaceNode< V, E, G >* core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::get_surface_node ( int  index) const
inlineprotected
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::initialize ( pack_basic::RotamerSetsBase const &  rot_sets_base)
override

This initialize() method needs to do two things: 1) it needs to set residues that are not changing as background residues and 2) it needs to save references to the rotamer set or sets so that nodes can later figure out whether a particular rotamer change is a hydrophobic or not.

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 SASAInteractionGraph, it first initializes the PDInteractionGraph (which is the base) and then calls the SASAIG 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 SurfaceInteractionGraph (SIG). 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 SIG init method is called during construction of the SIG, then the init method that's called by the rotsets object causes all the node info that was set in the SIG 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 tasks 1) and 2) above then. It doesn't really matter when the tasks get done as long as it happens before SA starts. This also means that the SIG 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).

prepare_graph_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 SIG init method directly after the IG init method that the RS object calls.

Older comments: This interaction graph is templated so that it can be used with the original PD or the OTF graphs. If it's an OTF graph, then a reference to the pose object is available with the pose() method. However, I can't rely on having that method for the case when an OTF graph is not used. Thus, take the pose reference in as a parameter and refactor later if necessary.

Newest comments: Don't call the parent classes initialize method because that calls create_new_node for all designable position, 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 SurfaceExposedNodesInteractionGraph and then make the SurfaceInteractionGraph 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.

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

template<typename V, typename E, typename G>
SurfaceInteractionGraph< V, E, G >& core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::operator= ( SurfaceInteractionGraph< V, E, G > const &  )
private
template<typename V, typename E, typename G>
task::PackerTask const& core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::packer_task ( ) const
inline
template<typename V, typename E, typename G>
pose::Pose const& core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::pose ( ) const
inline
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::prepare_graph_for_simulated_annealing ( )
override

Prepares the graph to begin simulated annealing.

Invokes both base-class prepare_graph_for_simulated_annealing subroutines: InteractionGraphBase first, to prepare the SurfaceNodes and SurfaceEdges. Then the AdditionalBackgroundNodesInteractionGraph, to prepare the SurfaceBackgroundNodes, the SurfaceBackgroundEdges, and to do a little more preparing of the SurfaceNodes.

Remarks
As it is written, it should only be executed once; that will change, however if we make SurfaceInteractionGraph work with ligands (ligands that stay fixed during any single sim annealing process, but that move between anealings.

References TR_SIG().

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

useful for debugging

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::print_internal_energies_for_current_state_assignment ( )

Prints out the one and two-body energies for every node and bgnode in the graph.

References core::scoring::surface, and TR_SIG().

template<typename V, typename E, typename G>
rotamer_set::RotamerSets const& core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::rotamer_sets ( ) const
inline
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::set_errorfull_deltaE_threshold ( Real  deltaE)
virtual

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

When the annealer asks the graph to consider a state substitution that produces a large collision, the graph may approximate the surface deltaE instead of recalculating it. 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 surface computations and return an accurate total energy for the graph.

References core::pack::interaction_graph::SurfaceNode< V, E, G >::print_surface_avoidance_stats(), core::pack::interaction_graph::SurfaceNode< V, E, G >::reset_surface_avoidance_stats(), and TR_SIG().

template<typename V , typename E , typename G >
core::PackerEnergy core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::set_network_state ( ObjexxFCL::FArray1_int &  node_states)
override

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. Like after simulated annealing is done with!

Remarks
Considered removing the use of FArrays here, but unfortunately it's what the Annealers use and I'm not qualified to be refactoring the annealers.
Parameters
node_states- [in] - the array of states, one for each vertex in the graph

References TR_SIG().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::set_num_background_residues ( int  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

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

Parameters
num_background_residues- [in] - the number of background residues in the protein.

References TR_SIG().

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

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

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.

How does this method handle cofactors, ligands that get included in pose().size()? It definitely allocates space in the array for them, and those residues will apparently be made into first-class nodes. But when it comes time to do the packing, they don't matter because they're not hydrophobic - they're not even amino acids - so they don't get updated.

Parameters
num_res- [in] - the total number of residues
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< 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.

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

We need a copy of the packer task for 2 reasons: 1) to figure out what (if any) the weight on the surface score is; and 2) to determine which residues are being packed and/or designed. We have to figure the packing options because it determines whether a residue becomes a FirstClass (SurfaceNode) node or a background node.

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

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

informs the graph that a particular residue is part of the background. first class residues, in terms of surface, will be residues that are surface exposed and are varying. background residues will be ones that are surface exposed but not varying since they will contribute to the surface score of the first class residues and whose own surface score will change depending on the first class residues.

Parameters
residue- [in] - the residue identifier

References TR_SIG().

template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::set_rotamer_sets ( rotamer_set::RotamerSets const &  rotsets)
template<typename V , typename E , typename G >
core::PackerEnergy core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::set_state_for_node ( int  node_ind,
int  new_state 
)
override

Assign new_state to the first class node with index node_ind.

Parameters
node_ind- [in] - the index of the (first class) node new_state - [in] - the new state assigned to the node
template<typename V, typename E, typename G>
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::set_surface_score_weight ( Real  weight)
inline
template<typename V, typename E, typename G>
Real core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::surface_score_weight ( )
inline
template<typename V , typename E , typename G >
void core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::update_internal_energy_totals_surface ( )
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.

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

Member Data Documentation

template<typename V, typename E, typename G>
utility::vector1< int > core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::bgenumeration_2_resid_
private
template<typename V, typename E, typename G>
const int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::BURIED_RESIDUE_NO_HSASA_CUTOFF = 24
staticprivate
template<typename V, typename E, typename G>
const int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::COMMIT_LIMIT_BETWEEN_UPDATES = 1024
staticprivate
template<typename V, typename E, typename G>
Real core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::deltaE_threshold_for_avoiding_surface_calcs_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::node_considering_alt_state_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::num_commits_since_last_update_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::num_residues_assigned_as_background_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::num_total_residues_
private
template<typename V, typename E, typename G>
task::PackerTaskOP core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::packer_task_
private
template<typename V, typename E, typename G>
pose::PoseOP core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::pose_
private
template<typename V, typename E, typename G>
bool core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::prepared_for_simulated_annealing_
private
template<typename V, typename E, typename G>
utility::vector1< int > core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::resid_2_bgenumeration_
private
template<typename V, typename E, typename G>
rotamer_set::RotamerSetsOP core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::rotamer_sets_
private
template<typename V, typename E, typename G>
const int core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::SURFACE_EXPOSED_CUTOFF = 20
staticprivate
template<typename V, typename E, typename G>
core::Real core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::surface_score_weight_
private
template<typename V, typename E, typename G>
core::PackerEnergy core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::total_energy_alternate_state_assignment_
private
template<typename V, typename E, typename G>
core::PackerEnergy core::pack::interaction_graph::SurfaceInteractionGraph< V, E, G >::total_energy_current_state_assignment_
private

The documentation for this class was generated from the following files: