Rosetta 3.4
Public Member Functions | Protected Member Functions
core::pack::interaction_graph::DensePDInteractionGraph Class Reference

#include <DensePDInteractionGraph.hh>

Inheritance diagram for core::pack::interaction_graph::DensePDInteractionGraph:
Inheritance graph
[legend]
Collaboration diagram for core::pack::interaction_graph::DensePDInteractionGraph:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DensePDInteractionGraph (int num_nodes)
 main constructor: no default nor copy constructors provided.
virtual void initialize (rotamer_set::RotamerSetsBase const &rot_sets)
 The DensePDIG only needs to know how many states each node has. This function causes the downstream instantiation of the DensePDNodes.
virtual core::PackerEnergy get_one_body_energy_for_node_state (int node, int state)
 returns the one body energy for a particular state on a node
virtual int get_num_aatypes () const
virtual void blanket_assign_state_0 ()
 assigns the state of all nodes in the interaction graph to their unassigned or zero states.
virtual core::PackerEnergy set_state_for_node (int node_ind, int new_state)
 sets the state on node node_ind to new_state
virtual core::PackerEnergy set_network_state (ObjexxFCL::FArray1_int &node_states)
virtual void consider_substitution (int node_ind, int new_state, core::PackerEnergy &delta_energy, core::PackerEnergy &prev_energy_for_node)
 considers altering the state of a particular node; returns the change in energy that the state substitution would produce
virtual core::PackerEnergy commit_considered_substitution ()
 Accepts (commits) the state change previously considered in a call to consider_substitution and returns the energy of the entire graph.
virtual core::PackerEnergy get_energy_current_state_assignment ()
 removes all accumulated numerical drift and returns the energy for the current state assignment.
virtual int get_edge_memory_usage () const
 returns the number of floats used in all edge two-body energy tables
virtual void print_current_state_assignment () const
 outputs the current state for each node, useful for debugging
virtual void set_errorfull_deltaE_threshold (core::PackerEnergy)
virtual core::PackerEnergy get_energy_sum_for_vertex_group (int group_id)
 a user may define subsets of the vertex set for which they would like to know the internal energy sum.
virtual unsigned int count_static_memory () const
 returns the amount of static memory allocated for a single DensePDInteractionGraph. Does not account for any of the edges or nodes that the graph contains: that part of the algorithm is implemented by the InteractionGraphBase class.
virtual unsigned int count_dynamic_memory () const
 returns the amount of dynamic memory allocated for a single DensePDInteractionGraph and recurses on the parent class. Does not account for any of the edges or nodes that the graph contains: that part of the algorithm is implemented by the InteractionGraphBase class.
virtual bool aa_submatrix_energies_retrievable () const
 Override the InteractionGraphBase class's implementation of this function to return 'true'.
virtual int aatype_for_node_state (int node_ind, int node_state) const
virtual ObjexxFCL::FArray2D
< core::PackerEnergy
get_aa_submatrix_energies_for_edge (int node1, int node2, int node1aa, int node2aa) const
void swap_edge_energies (int node1, int node2, ObjexxFCL::FArray2D< core::PackerEnergy > &new_edge_table)
 Swap the contents of the edge pair-energy table with the contents in the new_edge_table.

Protected Member Functions

virtual NodeBasecreate_new_node (int node_index, int num_states)
 factory method that instantiates a DensePDNode.
virtual EdgeBasecreate_new_edge (int index1, int index2)
 factory method that instantiates a DensePDEdge
void update_internal_energy_totals ()
 removes numerical drift that can accumulate over the course of many state assignment changes within simulated annealing
DensePDNodeget_dpd_node (int index) const
DensePDEdge const * get_dpd_edge (int node1, int node2) const
DensePDEdgeget_dpd_edge (int node1, int node2)

Constructor & Destructor Documentation

core::pack::interaction_graph::DensePDInteractionGraph::DensePDInteractionGraph ( int  num_nodes)

main constructor: no default nor copy constructors provided.

Parameters:
num_nodes- [in] - the number of nodes in this graph

Member Function Documentation

bool core::pack::interaction_graph::DensePDInteractionGraph::aa_submatrix_energies_retrievable ( ) const [virtual]

Override the InteractionGraphBase class's implementation of this function to return 'true'.

PDInteractionGraph will return aa submatrices as requested.

Reimplemented from core::pack::interaction_graph::FixedBBInteractionGraph.

int core::pack::interaction_graph::DensePDInteractionGraph::aatype_for_node_state ( int  node_ind,
int  node_state 
) const [virtual]

Derived classes wishing to respond to the get_aa_submatrix_energies_for_edge must implement this function as well, which allows the mapping between states and their on-node amino-acid index (which may very well represent something other than the index of the enumeration element for the rotamer's "aa()").

Reimplemented from core::pack::interaction_graph::FixedBBInteractionGraph.

void core::pack::interaction_graph::DensePDInteractionGraph::blanket_assign_state_0 ( ) [virtual]
core::PackerEnergy core::pack::interaction_graph::DensePDInteractionGraph::commit_considered_substitution ( ) [virtual]

Accepts (commits) the state change previously considered in a call to consider_substitution and returns the energy of the entire graph.

to avoid too much numerical drift from accumulating, the bookkeeping arrays are updated once every 2^10 state commits

Implements core::pack::interaction_graph::InteractionGraphBase.

References get_dpd_node(), and update_internal_energy_totals().

void core::pack::interaction_graph::DensePDInteractionGraph::consider_substitution ( int  node_ind,
int  new_state,
core::PackerEnergy delta_energy,
core::PackerEnergy prev_energy_for_node 
) [virtual]

considers altering the state of a particular node; returns the change in energy that the state substitution would produce

to avoid too much numerical drift from accumulating, the bookkeeping arrays are updated once every 2^10 state commits

Parameters:
node_ind- [in] - the index of the node considering a state change
new_state- [in] - the new state that node is considering
alt_total_energy- [out] - the total network energy produced under the new state
delta_energy- [out] - the change in energy produced under the substitution
prev_energy_for_node- [out] - the sum of the one and two body energies for this node under the current state assignment

Implements core::pack::interaction_graph::InteractionGraphBase.

unsigned int core::pack::interaction_graph::DensePDInteractionGraph::count_dynamic_memory ( ) const [virtual]

returns the amount of dynamic memory allocated for a single DensePDInteractionGraph and recurses on the parent class. Does not account for any of the edges or nodes that the graph contains: that part of the algorithm is implemented by the InteractionGraphBase class.

Reimplemented from core::pack::interaction_graph::InteractionGraphBase.

unsigned int core::pack::interaction_graph::DensePDInteractionGraph::count_static_memory ( ) const [virtual]

returns the amount of static memory allocated for a single DensePDInteractionGraph. Does not account for any of the edges or nodes that the graph contains: that part of the algorithm is implemented by the InteractionGraphBase class.

Implements core::pack::interaction_graph::InteractionGraphBase.

EdgeBase * core::pack::interaction_graph::DensePDInteractionGraph::create_new_edge ( int  index1,
int  index2 
) [protected, virtual]

factory method that instantiates a DensePDEdge

Parameters:
index1- [in] - the smaller-indexed node this edge is incident upon
index2- [in] - the larger-indexed node this edge is incident upon

Implements core::pack::interaction_graph::InteractionGraphBase.

NodeBase * core::pack::interaction_graph::DensePDInteractionGraph::create_new_node ( int  node_index,
int  num_states 
) [protected, virtual]

factory method that instantiates a DensePDNode.

Parameters:
node_index- [in] - the index of the node being created
num_states- [in] - the total number of states for the new node

Implements core::pack::interaction_graph::InteractionGraphBase.

ObjexxFCL::FArray2D< core::PackerEnergy > core::pack::interaction_graph::DensePDInteractionGraph::get_aa_submatrix_energies_for_edge ( int  node1,
int  node2,
int  node1aa,
int  node2aa 
) const [virtual]

Do not call this function unless it is implemented in the derived class, as should be indicated by the "aa_submatrix_energies_retrivable" method.

Reimplemented from core::pack::interaction_graph::FixedBBInteractionGraph.

References core::pack::interaction_graph::DensePDEdge::get_aa_submatrix_energies(), and get_dpd_edge().

DensePDEdge const* core::pack::interaction_graph::DensePDInteractionGraph::get_dpd_edge ( int  node1,
int  node2 
) const [inline, protected]
DensePDEdge* core::pack::interaction_graph::DensePDInteractionGraph::get_dpd_edge ( int  node1,
int  node2 
) [inline, protected]
DensePDNode* core::pack::interaction_graph::DensePDInteractionGraph::get_dpd_node ( int  index) const [inline, protected]
int core::pack::interaction_graph::DensePDInteractionGraph::get_edge_memory_usage ( ) const [virtual]
core::PackerEnergy core::pack::interaction_graph::DensePDInteractionGraph::get_energy_current_state_assignment ( ) [virtual]

removes all accumulated numerical drift and returns the energy for the current state assignment.

Implements core::pack::interaction_graph::InteractionGraphBase.

References update_internal_energy_totals().

core::PackerEnergy core::pack::interaction_graph::DensePDInteractionGraph::get_energy_sum_for_vertex_group ( int  group_id) [virtual]

a user may define subsets of the vertex set for which they would like to know the internal energy sum.

For instance in a graph with 6 vertices, {a,b,c,d,e,f} a user may be interested in the sum of the one- and two-body energies for vertices {a,b,c}. The graph will return sum of the one body energies for vertices a b and c and also any two-body energies for the edges in the subgraph induced by a,b, and c. (In this case, edges {a,b}, {a,c} and {b,c} if these edges are part of the graph. The edge {a,d} will not be counted if it is part of the graph.) ask the graph for the energies of the induced subgraph defined by a particular group.

Parameters:
group_id- [in] - the groups for which you're interested in retrieving energies of the induced subgraph

Implements core::pack::interaction_graph::InteractionGraphBase.

References get_dpd_node(), core::pack::interaction_graph::InteractionGraphBase::get_edge_list_begin(), core::pack::interaction_graph::InteractionGraphBase::get_edge_list_end(), core::pack::interaction_graph::InteractionGraphBase::get_num_nodes(), core::pack::interaction_graph::DensePDNode::get_one_body_energy_current_state(), and core::pack::interaction_graph::InteractionGraphBase::get_vertex_member_of_energy_sum_group().

virtual int core::pack::interaction_graph::DensePDInteractionGraph::get_num_aatypes ( ) const [inline, virtual]
core::PackerEnergy core::pack::interaction_graph::DensePDInteractionGraph::get_one_body_energy_for_node_state ( int  node,
int  state 
) [virtual]

returns the one body energy for a particular state on a node

Implements core::pack::interaction_graph::InteractionGraphBase.

References get_dpd_node(), and core::pack::interaction_graph::DensePDNode::get_one_body_energy().

void core::pack::interaction_graph::DensePDInteractionGraph::initialize ( rotamer_set::RotamerSetsBase const &  rot_sets) [virtual]

The DensePDIG only needs to know how many states each node has. This function causes the downstream instantiation of the DensePDNodes.

Implements core::pack::interaction_graph::InteractionGraphBase.

References core::pack::rotamer_set::RotamerSets::nmoltenres(), core::pack::rotamer_set::RotamerSets::rotamer_set_for_moltenresidue(), and core::pack::interaction_graph::InteractionGraphBase::set_num_states_for_node().

void core::pack::interaction_graph::DensePDInteractionGraph::print_current_state_assignment ( ) const [virtual]
virtual void core::pack::interaction_graph::DensePDInteractionGraph::set_errorfull_deltaE_threshold ( core::PackerEnergy  ) [inline, virtual]
virtual core::PackerEnergy core::pack::interaction_graph::DensePDInteractionGraph::set_network_state ( ObjexxFCL::FArray1_int &  node_states) [virtual]
core::PackerEnergy core::pack::interaction_graph::DensePDInteractionGraph::set_state_for_node ( int  node_ind,
int  new_state 
) [virtual]

sets the state on node node_ind to new_state

Parameters:
node_ind- [in] - the index of the node in question
new_state- [in] - the new state the node is being assigned to

Implements core::pack::interaction_graph::InteractionGraphBase.

References core::pack::interaction_graph::DensePDNode::assign_state(), get_dpd_node(), and update_internal_energy_totals().

void core::pack::interaction_graph::DensePDInteractionGraph::swap_edge_energies ( int  node1,
int  node2,
ObjexxFCL::FArray2D< core::PackerEnergy > &  new_edge_table 
)

Swap the contents of the edge pair-energy table with the contents in the new_edge_table.

References get_dpd_edge(), and core::pack::interaction_graph::DensePDEdge::swap_edge_energies().

void core::pack::interaction_graph::DensePDInteractionGraph::update_internal_energy_totals ( ) [protected]

removes numerical drift that can accumulate over the course of many state assignment changes within simulated annealing

Iterates across nodes and then edges to look-up the energies for the current state assignmnet removing any numerical drift which accumulated in the member variable total_energy_current_state_assignment_.

References get_dpd_node(), core::pack::interaction_graph::InteractionGraphBase::get_edge_list_begin(), core::pack::interaction_graph::InteractionGraphBase::get_edge_list_end(), and core::pack::interaction_graph::InteractionGraphBase::get_num_nodes().

Referenced by commit_considered_substitution(), get_energy_current_state_assignment(), protocols::flexpack::interaction_graph::MinimalistFlexbbInteractionGraph::set_network_state(), and set_state_for_node().


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