![]() |
Rosetta
2021.16
|
#include <DoubleDensePDInteractionGraph.hh>

Public Member Functions | |
| DoubleDensePDEdge (InteractionGraphBase *owner, int first_node_ind, int second_node_ind) | |
| main constructor - no default nor copy constructors provided More... | |
| ~DoubleDensePDEdge () override | |
| destructor. All dynamically allocated memory is managed by the objects contained inside the DoubleDensePDEdge, so there is no work to be (explicitly) done. More... | |
| void | set_sparse_aa_info (ObjexxFCL::FArray2_bool const &) override |
| bool | get_sparse_aa_info (int, int) const override |
| void | add_to_two_body_energy (int const, int const, core::PackerEnergy const) override |
| adds the input energy to the two body energy for state1 on the node with the smaller index and state2 on the node with the larger index. More... | |
| void | add_to_two_body_energies (ObjexxFCL::FArray2< core::PackerEnergy > const &res_res_energy_array) override |
| Adds all the energies stored in the oversized_res_res_energy array to the two body energy table for those states whose amion acid types were previoudsly declared to be amino-acid neighbors. The res-res array should have the dimension (node1->get_num_states() x node2->get_num_states());. More... | |
| void | set_two_body_energy (int const, int const, core::PackerEnergy const) override |
| Sets the two-body energy for a pair of states. That is, it overwrites whatever two-body energy there was previously for that state pair with a new energy. Ignores non-neighboring state pairs. More... | |
| void | clear_two_body_energy (int const, int const) override |
| Sets the two-body energy for a pair of states. That is, it overwrites whatever two-body energy there was previously for that state pair with a new energy. Ignores non-neighboring state pairs. More... | |
| core::PackerEnergy | get_two_body_energy (int const, int const ) const override |
| returns the two body energy for a pair of states: 0 if those states are not neighbors More... | |
| void | force_aa_neighbors (int, int) override |
| void | force_all_aa_neighbors () override |
| void | declare_energies_final () override |
| If all of the energies for an edge have been added in, then declare the edge energies final. This may mean that the edge deletes itself. More... | |
| void | prepare_for_simulated_annealing () override |
| looks at all pair energies, and if they are all 0, deletes itself More... | |
| core::PackerEnergy | get_current_two_body_energy () |
| returns the two body energy corresponding to the current states assigned to the nodes this edge is incident upon. More... | |
| void | acknowledge_state_change (int node_ind, int new_state, core::PackerEnergy &new_energy) |
| updates bookkeeping information when one of the two nodes changes its state More... | |
| void | acknowledge_state_zeroed (int node_ind) |
| updates bookkeeping information when one of the two nodes enters its "unassigned" state. More... | |
| void | acknowledge_substitution (int substituted_node_index, core::PackerEnergy const curr_state_energy, int nodes_new_state) |
| update bookkeeping information when one of the nodes an edge is incident upon changes state More... | |
| int | get_two_body_table_size () const |
| Returns a reference to the first element in the dense two-body energy table. Used to create a proxy array on the nodes for cache efficiency. More... | |
| unsigned int | count_static_memory () const override |
| returns sizeof DoubleDensePDEdge if this is the most-derived instance of the class More... | |
| unsigned int | count_dynamic_memory () const override |
| returns the amount of memory dynamically allocated by the edge and recurses on its parent (in this case, the EdgeBase class) More... | |
| void | set_edge_weight (Real weight) override |
Public Member Functions inherited from core::pack::interaction_graph::PrecomputedPairEnergiesEdge | |
| ~PrecomputedPairEnergiesEdge () override | |
| PrecomputedPairEnergiesEdge (InteractionGraphBase *owner, int first_node_ind, int second_node_ind) | |
Public Member Functions inherited from core::pack::interaction_graph::FixedBBEdge | |
| ~FixedBBEdge () override | |
| FixedBBEdge (InteractionGraphBase *owner, int first_node_ind, int second_node_ind) | |
Public Member Functions inherited from core::pack::interaction_graph::EdgeBase | |
| virtual | ~EdgeBase () |
| copy constructor, do not use More... | |
| EdgeBase (InteractionGraphBase *owner, int first_node_ind, int second_node_ind) | |
| main constructor for edge, no default nor copy constructors More... | |
| int | get_other_ind (int callers_index) const |
| returns the index of the other node that the edge is incident upon More... | |
| NodeBase * | get_other_node (int callers_index) const |
| returns a pointer to the other node that the edge is incident upon More... | |
| int | get_first_node_ind () const |
| returns the index of the smaller-indexed node More... | |
| int | get_second_node_ind () const |
| returns the index of the larger-indexed node More... | |
| void | set_pos_in_owners_list (std::list< EdgeBase * >::iterator edge_iterator) |
| edge keeps iterator to its position in it's owner's edge list More... | |
| void | set_pos_in_node_edgevector (int callers_index, int position) |
| edge keeps index it has in node_ind's edge vector More... | |
| bool | same_edge (int node1, int node2) const |
| returns true if this edge connects nodes of index node1 and node2 the order of node1 and node2 is not important More... | |
| Real | edge_weight () const |
| bool | marked_for_deletion () const |
| Has this edge indicated that it can be deleted? More... | |
| InteractionGraphBase const * | get_owner () const |
| InteractionGraphBase * | get_owner () |
Static Public Member Functions | |
| static core::PackerEnergy | get_alternate_state_energy (int first_node_state, int second_node_state, ObjexxFCL::FArray2< core::PackerEnergy > &edge_energy_table) |
| static method that looks up the two body energy when the node with the smaller index on an edge is considering an alternate state More... | |
Private Member Functions | |
| DoubleDensePDNode * | get_dpd_node (int index) const |
| DoubleDensePDInteractionGraph * | get_dpdig_owner () const |
| DoubleDensePDEdge () | |
| DoubleDensePDEdge (DoubleDensePDEdge const &) | |
| DoubleDensePDEdge & | operator= (DoubleDensePDEdge const &) |
Private Attributes | |
| ObjexxFCL::FArray2D < core::PackerEnergy > | two_body_energies_ |
| core::PackerEnergy | curr_state_energy_ |
| bool | energies_updated_since_last_prep_for_simA_ |
Additional Inherited Members | |
Protected Member Functions inherited from core::pack::interaction_graph::EdgeBase | |
| void | mark_edge_for_deletion () |
| Mark this edge so that it can be deleted. More... | |
| int | get_node_index (int index) const |
| int | get_num_states_for_node (int index) const |
| NodeBase const * | get_node (int index) const |
| NodeBase * | get_node (int index) |
| int | get_edges_position_in_nodes_edge_vector (int index) const |
| int | which_node (int node_index) const |
| is a node the first or second node this edge is incident upon? More... | |
| void | edge_weight (Real) |
| protected setter of the edge weight. To be called by derived classes after they have completed the conversion from the previous edge weighting to the new edge weighting. More... | |
| core::pack::interaction_graph::DoubleDensePDEdge::DoubleDensePDEdge | ( | InteractionGraphBase * | owner, |
| int | first_node_ind, | ||
| int | second_node_ind | ||
| ) |
main constructor - no default nor copy constructors provided
| owner | - [in] - pointer to the graph that created this node |
| first_node_ind | - [in] - the index of the smaller-indexed node |
| second_node_ind | - [in] - the index of the larger-indexed node |
|
overridedefault |
destructor. All dynamically allocated memory is managed by the objects contained inside the DoubleDensePDEdge, so there is no work to be (explicitly) done.
|
private |
Referenced by count_static_memory().
|
private |
| void core::pack::interaction_graph::DoubleDensePDEdge::acknowledge_state_change | ( | int | node_ind, |
| int | new_state, | ||
| core::PackerEnergy & | new_energy | ||
| ) |
updates bookkeeping information when one of the two nodes changes its state
| node_ind | - [in] - the index of the node that changed its state |
| node_state | - [in] - the index of the new state it assumed |
| new_energy | - [out] - the two body energy produced by the new state and the current state on the other node |
Referenced by core::pack::interaction_graph::DoubleDensePDNode::assign_state().
| void core::pack::interaction_graph::DoubleDensePDEdge::acknowledge_state_zeroed | ( | int | node_ind | ) |
updates bookkeeping information when one of the two nodes enters its "unassigned" state.
| node_ind | - [in] - the index of the node that has just entered its 0 state |
References core::pack::interaction_graph::DoubleDensePDNode::acknowledge_neighbors_state_substitution(), curr_state_energy_, get_dpd_node(), core::pack::interaction_graph::EdgeBase::get_edges_position_in_nodes_edge_vector(), and core::pack::interaction_graph::EdgeBase::get_node_index().
|
inline |
update bookkeeping information when one of the nodes an edge is incident upon changes state
| substituted_node_index | - [in] - index of the node that chagned its state |
| curr_state_energy | - [in] - the two body energy given the new state |
| nodes_new_state | - [in] - the state the node just transitioned into |
| nodes_new_state_sparse_info | - [in] - sparse matrix info for the new state |
References curr_state_energy_, get_dpd_node(), core::pack::interaction_graph::EdgeBase::get_edges_position_in_nodes_edge_vector(), and core::pack::interaction_graph::EdgeBase::get_node_index().
Referenced by core::pack::interaction_graph::DoubleDensePDNode::commit_considered_substitution().
|
overridevirtual |
Adds all the energies stored in the oversized_res_res_energy array to the two body energy table for those states whose amion acid types were previoudsly declared to be amino-acid neighbors. The res-res array should have the dimension (node1->get_num_states() x node2->get_num_states());.
| res_res_energy_array | - [in] - an array containing the state pair energies |
Implements core::pack::interaction_graph::PrecomputedPairEnergiesEdge.
|
overridevirtual |
adds the input energy to the two body energy for state1 on the node with the smaller index and state2 on the node with the larger index.
Implements core::pack::interaction_graph::PrecomputedPairEnergiesEdge.
References protocols::buns::energy.
|
overridevirtual |
Sets the two-body energy for a pair of states. That is, it overwrites whatever two-body energy there was previously for that state pair with a new energy. Ignores non-neighboring state pairs.
| state1 | - [in] - state index for the node with the smaller index |
| state2 | - [in] - state index for the node with the larger index |
| energy | - [in] - the energy which replaces the old two-body energy |
Implements core::pack::interaction_graph::PrecomputedPairEnergiesEdge.
|
overridevirtual |
returns the amount of memory dynamically allocated by the edge and recurses on its parent (in this case, the EdgeBase class)
Reimplemented from core::pack::interaction_graph::EdgeBase.
References core::pack::interaction_graph::EdgeBase::count_dynamic_memory(), and two_body_energies_.
|
overridevirtual |
returns sizeof DoubleDensePDEdge if this is the most-derived instance of the class
Implements core::pack::interaction_graph::EdgeBase.
References DoubleDensePDEdge().
|
overridevirtual |
If all of the energies for an edge have been added in, then declare the edge energies final. This may mean that the edge deletes itself.
Implements core::pack::interaction_graph::EdgeBase.
References prepare_for_simulated_annealing().
|
inlineoverridevirtual |
Implements core::pack::interaction_graph::FixedBBEdge.
|
inlineoverridevirtual |
Implements core::pack::interaction_graph::FixedBBEdge.
|
inlinestatic |
static method that looks up the two body energy when the node with the smaller index on an edge is considering an alternate state
| first_node_alt_state | - [in] - the alternate state for the lower-indexed node |
| second_node_orig_state | - [in] - the current state for the higher-indexed node |
| edge_energy_table | - [in] - the proxy FArray pointing at the edge table connecting the two nodes. |
| core::PackerEnergy core::pack::interaction_graph::DoubleDensePDEdge::get_current_two_body_energy | ( | ) |
returns the two body energy corresponding to the current states assigned to the nodes this edge is incident upon.
References curr_state_energy_.
Referenced by core::pack::interaction_graph::DoubleDensePDNode::update_internal_energy_sums().
|
inlineprivate |
References core::pack::interaction_graph::EdgeBase::get_node().
Referenced by acknowledge_state_zeroed(), and acknowledge_substitution().
|
inlineprivate |
|
inlineoverridevirtual |
Implements core::pack::interaction_graph::FixedBBEdge.
|
overridevirtual |
returns the two body energy for a pair of states: 0 if those states are not neighbors
| state1 | - [in] - state index for the node with the smaller index |
| state2 | - [in] - state index for the node with the larger index |
Implements core::pack::interaction_graph::PrecomputedPairEnergiesEdge.
References two_body_energies_.
Referenced by core::pack::interaction_graph::DoubleDensePDNode::update_internal_vectors().
| int core::pack::interaction_graph::DoubleDensePDEdge::get_two_body_table_size | ( | ) | const |
Returns a reference to the first element in the dense two-body energy table. Used to create a proxy array on the nodes for cache efficiency.
returns the memory usage of the two body energy table for this edge
References two_body_energies_.
|
private |
|
overridevirtual |
looks at all pair energies, and if they are all 0, deletes itself
Implements core::pack::interaction_graph::EdgeBase.
References energies_updated_since_last_prep_for_simA_, core::pack::interaction_graph::EdgeBase::mark_edge_for_deletion(), and two_body_energies_.
Referenced by declare_energies_final().
|
overridevirtual |
DANGER: If for some reason one were to reweight edges during simulated annealing then some of the cached energies in the adjacent nodes would be out-of-date; data integrity would be violated an all hell would break loose. The same thing is true if one were to change the energies on any edge during simulated annealing. One simple solution: call blanket_assign_state0 to wipe all cahced energies stored on nodes and then assign_network_state to the state just before the reweighting. Of course, since the annealer itself is tracking the "best" network state, you'd have to worry about its data integrity as well. General advice: don't change energies during simA.
Implements core::pack::interaction_graph::EdgeBase.
References curr_state_energy_, core::pack::interaction_graph::EdgeBase::edge_weight(), and two_body_energies_.
|
inlineoverridevirtual |
Implements core::pack::interaction_graph::FixedBBEdge.
|
overridevirtual |
Sets the two-body energy for a pair of states. That is, it overwrites whatever two-body energy there was previously for that state pair with a new energy. Ignores non-neighboring state pairs.
| state1 | - [in] - state index for the node with the smaller index |
| state2 | - [in] - state index for the node with the larger index |
| energy | - [in] - the energy which replaces the old two-body energy |
Implements core::pack::interaction_graph::PrecomputedPairEnergiesEdge.
References protocols::buns::energy.
|
private |
Referenced by acknowledge_state_zeroed(), acknowledge_substitution(), get_current_two_body_energy(), and set_edge_weight().
|
private |
Referenced by prepare_for_simulated_annealing().
|
private |
1.8.7