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

Public Member Functions | |
| LinearMemNode (InteractionGraphBase *owner, int node_id, int num_states) | |
| main constructor, no default ctor, uncopyable More... | |
| ~LinearMemNode () override | |
| virtual dstor More... | |
| void | prepare_for_simulated_annealing () override |
| linmem ig does not have to do anything before sim annealing begins More... | |
| void | print () const override |
| write internal energy and bookkeeping data to standard out More... | |
| bool | state_unassigned () const override |
| state 0 represents the unasigned state More... | |
| virtual core::PackerEnergy | get_totalE () const |
| return the total energy for this node; includes full energies to neighboring residues More... | |
| void | assign_zero_state () override |
| set to state 0 More... | |
| void | assign_state (int new_state) |
| set to a particular state – updates the energies internally More... | |
| void | partial_assign_state (int new_state) |
| first half of an entire-graph state assignment that avoids unnecessary energy updates as produced in assign_state. Adjust all node's states first, then update all energies. More... | |
| void | complete_state_assignment () |
| second half of the entire-graph state assignment. More... | |
| int | get_current_state () const |
| return the index of the currently assigned state More... | |
| int | get_curr_state_recent_state_id () const |
| return the "recent state id" for the currently assigned state More... | |
| core::PackerEnergy | get_one_body_energy_current_state () const |
| return the one-body energy for the currently assigned state More... | |
| core::PackerEnergy | project_deltaE_for_substitution (int alternate_state, core::PackerEnergy &prev_node_energy) |
| compute the change in energy induced by substituting the currently assigned state with some alternative state More... | |
| void | commit_considered_substitution () |
| proceed to change the currently assigned state to the alternative state considered in the last call to project_deltaE_for_substitution More... | |
| void | acknowledge_last_substititon_not_committed () |
| update bookkeeping info to acknolwedge that the last alternative state considered was not in fact chosen for the currently assigned state. More... | |
| core::PackerEnergy | compute_pair_energy_for_current_state (int edge_making_energy_request) |
| comupute the interaction energy between the currently assigned state on this residue and the currently assigned state on a neighboring residue, identified by the index of the edge connecting the two More... | |
| core::PackerEnergy | compute_pair_energy_for_alternate_state (int edge_making_energy_request) |
| comupute the interaction energy between the alternate state being considered on this residue and the currently assigned state on a neighboring residue, identified by the index of the edge connecting the two More... | |
| void | acknowledge_neighbors_state_substitution (int edge_to_altered_neighbor, core::PackerEnergy new_edge_energy, int other_node_new_state, SparseMatrixIndex const &other_node_new_state_sparse_info, int other_node_recent_history_index) |
| void | acknowledge_neighbors_partial_state_substitution (int edge_to_altered_neighbor, int other_node_new_state, SparseMatrixIndex const &other_node_new_state_sparse_info, int other_state_recent_history_index) |
| SparseMatrixIndex const & | get_sparse_mat_info_for_curr_state () const |
| void | set_recent_history_size (int num_states_to_maintain_in_recent_history) |
| int | get_recent_history_size () const |
| void | print_internal_energies () const |
| void | update_internal_energy_sums () |
| unsigned int | count_static_memory () const override |
| unsigned int | count_dynamic_memory () const override |
| memory accounting scheme More... | |
Public Member Functions inherited from core::pack::interaction_graph::OnTheFlyNode | |
| OnTheFlyNode (InteractionGraphBase *owner, int node_id, int num_states) | |
| main constructor, no default or copy constructors More... | |
| ~OnTheFlyNode () override | |
| void | set_rotamers (rotamer_set::RotamerSetCOP rotamers) |
| void | zero_one_body_energies () override |
| void | add_to_one_body_energies (ObjexxFCL::FArray1< core::PackerEnergy > &energy1b) override |
| void | update_one_body_energy (int state, core::PackerEnergy energy) override |
| virtual void | set_one_body_energy (int state, core::PackerEnergy energy) |
| void | add_to_one_body_energy (int state, core::PackerEnergy energy) override |
| virtual void | zero_one_body_energy (int state) |
| int | get_num_aa_types () const |
| utility::vector1< int > & | get_num_states_for_aa_types () |
| utility::vector1< int > const & | get_num_states_for_aa_types () const |
| int | get_num_states_for_aa_type (int aa_type) |
| SparseMatrixIndex const & | get_sparse_mat_info_for_state (int state) const |
| int | get_state_offset_for_aatype (int aatype) const |
| core::PackerEnergy | get_one_body_energy (int state) const |
| bool | distinguish_backbone_and_sidechain () const |
| void | distinguish_backbone_and_sidechain (bool setting) |
| unsigned int | count_dynamic_memory () const override |
| core::PackerEnergy | compute_rotamer_pair_energy (int edge_making_energy_request, int state_this, int state_other) const |
Public Member Functions inherited from core::pack::interaction_graph::FixedBBNode | |
| ~FixedBBNode () override | |
| FixedBBNode (InteractionGraphBase *owner, int node_id, int num_states) | |
Public Member Functions inherited from core::pack::interaction_graph::NodeBase | |
| virtual | ~NodeBase () |
| virtual destructor More... | |
| NodeBase (InteractionGraphBase *, int node_id, int num_states) | |
| Main constructor, no default constructor nor copy constructor. More... | |
| int | get_num_states () const |
| returns the number of states for this node More... | |
| std::list< EdgeBase * >::iterator | add_edge (EdgeBase *edge_ptr) |
| adds edge pointer to edge list; returns an iterator to the new list element More... | |
| void | drop_edge (std::list< EdgeBase * >::iterator edge_iterator) |
| removes an edge iterator from the node's edge list More... | |
| void | drop_all_edges () |
| deletes all edges incident upon this node More... | |
| EdgeBase * | find_edge (int other_node_index) const |
| a slow (linear) search for an edge. The edge is identified by the index of the node to which the edge connects this node. Returns NULL when there is no such connecting edge. More... | |
| void | depth_first_connected_component_counting () |
| performs a depth first traversal of the graph. Each node informs the graph that the traversal resulted in arriving at the node. More... | |
| std::list< EdgeBase * > ::const_iterator | edge_list_begin () |
| std::list< EdgeBase * > ::const_iterator | edge_list_end () |
| int | get_node_index () const |
| int | get_num_incident_edges () const |
| int | get_num_edges_to_smaller_indexed_nodes () const |
| int | get_num_edges_to_larger_indexed_nodes () const |
| EdgeBase const * | get_incident_edge (int index) const |
| These functions are public for the sake of writing good unit tests. More... | |
| EdgeBase * | get_incident_edge (int index) |
| int | get_index_of_adjacent_node (int index) const |
| NodeBase const * | get_adjacent_node (int index) const |
| NodeBase * | get_adjacent_node (int index) |
Private Member Functions | |
| void | update_internal_vectors () |
| LinearMemEdge const * | get_incident_linmem_edge (int index) const |
| LinearMemEdge * | get_incident_linmem_edge (int index) |
| LinearMemNode const * | get_adjacent_linmem_node (int index) const |
| LinearMemNode * | get_adjacent_linmem_node (int index) |
| LinearMemoryInteractionGraph const * | get_linmem_ig_owner () const |
| LinearMemoryInteractionGraph * | get_linmem_ig_owner () |
| int | update_recent_history (int state) |
Static Private Attributes | |
| static const int | ACCEPTED = 1 |
| static const int | REJECTED = 0 |
| static const int | ACCEPTANCE_REJECTION_HISTORY_LENGTH = 100 |
| static const int | THRESHOLD_ACCEPTANCE_RATE_FOR_RPE_STORAGE = 10 |
Additional Inherited Members | |
Public Types inherited from core::pack::interaction_graph::OnTheFlyNode | |
| typedef std::pair< Vector, Real > | BoundingSphere |
| core::pack::interaction_graph::LinearMemNode::LinearMemNode | ( | InteractionGraphBase * | owner, |
| int | node_id, | ||
| int | num_states | ||
| ) |
main constructor, no default ctor, uncopyable
main constructor, no default or copy constructors
References rhq_.
Referenced by count_static_memory().
|
overridedefault |
virtual dstor
| void core::pack::interaction_graph::LinearMemNode::acknowledge_last_substititon_not_committed | ( | ) |
update bookkeeping info to acknolwedge that the last alternative state considered was not in fact chosen for the currently assigned state.
References ACCEPTANCE_REJECTION_HISTORY_LENGTH, ACCEPTED, accepted_history_head_, accepted_rejected_substitution_history_, alternate_state_is_being_considered_, filled_substitution_history_, num_recently_accepted_, and REJECTED.
| void core::pack::interaction_graph::LinearMemNode::acknowledge_neighbors_partial_state_substitution | ( | int | edge_to_altered_neighbor, |
| int | other_node_new_state, | ||
| SparseMatrixIndex const & | other_node_new_state_sparse_info, | ||
| int | other_state_recent_history_index | ||
| ) |
|
inline |
| void core::pack::interaction_graph::LinearMemNode::assign_state | ( | int | new_state | ) |
set to a particular state – updates the energies internally
References core::pack::interaction_graph::LinearMemEdge::acknowledge_state_change(), alternate_state_is_being_considered_, assign_zero_state(), curr_state_one_body_energy_, curr_state_sparse_mat_info_, curr_state_total_energy_, curr_state_two_body_energies_, current_state_, core::pack::interaction_graph::debug, get_incident_linmem_edge(), core::pack::interaction_graph::NodeBase::get_node_index(), core::pack::interaction_graph::NodeBase::get_num_incident_edges(), core::pack::interaction_graph::NodeBase::get_num_states(), core::pack::interaction_graph::OnTheFlyNode::get_on_the_fly_owner(), core::pack::interaction_graph::OnTheFlyNode::get_one_body_energy(), core::pack::interaction_graph::OnTheFlyNode::get_rotamer(), core::pack::interaction_graph::OnTheFlyNode::get_sparse_mat_info_for_state(), core::pack::interaction_graph::OnTheFlyInteractionGraph::non_const_pose(), core::pose::Pose::replace_residue(), rhq_, core::pack::interaction_graph::OnTheFlyInteractionGraph::score_function(), and update_recent_history().
Referenced by core::pack::interaction_graph::LinearMemoryInteractionGraph::set_state_for_node().
|
overridevirtual |
set to state 0
puts the LinMemNode in the unassigned state
Implements core::pack::interaction_graph::NodeBase.
References alternate_state_, alternate_state_is_being_considered_, curr_state_one_body_energy_, curr_state_total_energy_, curr_state_two_body_energies_, current_state_, get_incident_linmem_edge(), core::pack::interaction_graph::NodeBase::get_node_index(), and core::pack::interaction_graph::NodeBase::get_num_incident_edges().
Referenced by assign_state(), core::pack::interaction_graph::LinearMemoryInteractionGraph::blanket_assign_state_0(), and partial_assign_state().
|
protected |
References project_deltaE_for_substitution().
| void core::pack::interaction_graph::LinearMemNode::commit_considered_substitution | ( | ) |
proceed to change the currently assigned state to the alternative state considered in the last call to project_deltaE_for_substitution
commits the last substitution that was considered by this Node
References ACCEPTANCE_REJECTION_HISTORY_LENGTH, ACCEPTED, accepted_history_head_, accepted_rejected_substitution_history_, core::pack::interaction_graph::LinearMemEdge::acknowledge_substitution(), alt_state_sparse_mat_info_, alternate_state_, alternate_state_is_being_considered_, alternate_state_one_body_energy_, alternate_state_total_energy_, alternate_state_two_body_energies_, curr_state_one_body_energy_, curr_state_sparse_mat_info_, curr_state_total_energy_, curr_state_two_body_energies_, current_state_, core::pack::interaction_graph::debug, filled_substitution_history_, get_incident_linmem_edge(), core::pack::interaction_graph::NodeBase::get_node_index(), core::pack::interaction_graph::NodeBase::get_num_incident_edges(), core::pack::interaction_graph::OnTheFlyNode::get_on_the_fly_owner(), core::pack::interaction_graph::OnTheFlyNode::get_rotamer(), neighbors_curr_state_, core::pack::interaction_graph::OnTheFlyInteractionGraph::non_const_pose(), num_recently_accepted_, REJECTED, core::pose::Pose::replace_residue(), rhq_, core::pack::interaction_graph::OnTheFlyInteractionGraph::score_function(), and update_recent_history().
Referenced by core::pack::interaction_graph::LinearMemoryInteractionGraph::commit_considered_substitution().
| void core::pack::interaction_graph::LinearMemNode::complete_state_assignment | ( | ) |
second half of the entire-graph state assignment.
References curr_state_one_body_energy_, curr_state_total_energy_, curr_state_two_body_energies_, current_state_, get_incident_linmem_edge(), core::pack::interaction_graph::NodeBase::get_num_incident_edges(), and core::pack::interaction_graph::OnTheFlyNode::get_one_body_energy().
Referenced by core::pack::interaction_graph::LinearMemoryInteractionGraph::set_network_state().
| core::PackerEnergy core::pack::interaction_graph::LinearMemNode::compute_pair_energy_for_alternate_state | ( | int | edge_making_energy_request | ) |
comupute the interaction energy between the alternate state being considered on this residue and the currently assigned state on a neighboring residue, identified by the index of the edge connecting the two
References alternate_state_, core::pack::interaction_graph::OnTheFlyNode::compute_rotamer_pair_energy(), and neighbors_curr_state_.
| core::PackerEnergy core::pack::interaction_graph::LinearMemNode::compute_pair_energy_for_current_state | ( | int | edge_making_energy_request | ) |
comupute the interaction energy between the currently assigned state on this residue and the currently assigned state on a neighboring residue, identified by the index of the edge connecting the two
References aa_neighbors_for_edges_, core::pack::interaction_graph::OnTheFlyNode::compute_rotamer_pair_energy(), curr_state_sparse_mat_info_, current_state_, core::pack::interaction_graph::SparseMatrixIndex::get_aa_type(), neighbors_curr_state_, and neighbors_curr_state_sparse_info_.
|
inlineprotected |
References alternate_state_is_being_considered_.
|
overridevirtual |
memory accounting scheme
Reimplemented from core::pack::interaction_graph::NodeBase.
References aa_neighbors_for_edges_, accepted_rejected_substitution_history_, alternate_state_two_body_energies_, core::pack::interaction_graph::OnTheFlyNode::count_dynamic_memory(), curr_state_two_body_energies_, neighbors_curr_state_, neighbors_curr_state_sparse_info_, neighbors_state_recent_history_index_, and rhq_.
|
overridevirtual |
Implements core::pack::interaction_graph::OnTheFlyNode.
References LinearMemNode().
|
inlineprivate |
|
inlineprivate |
|
inlineprotected |
References alternate_state_total_energy_.
|
inlineprotected |
References alternate_state_.
|
inlineprotected |
References curr_state_total_energy_.
|
inline |
return the "recent state id" for the currently assigned state
References rhq_.
Referenced by core::pack::interaction_graph::LinearMemEdge::store_curr_state_energy().
|
inlineprotected |
References current_state_, and core::pack::interaction_graph::OnTheFlyNode::get_rotamer().
|
inline |
return the index of the currently assigned state
References current_state_.
Referenced by core::pack::interaction_graph::LinearMemoryInteractionGraph::print_current_state_assignment(), and core::pack::interaction_graph::LinearMemEdge::store_curr_state_energy().
|
inlineprivate |
References core::pack::interaction_graph::NodeBase::get_incident_edge().
Referenced by assign_state(), assign_zero_state(), commit_considered_substitution(), complete_state_assignment(), partial_assign_state(), prepare_for_simulated_annealing(), update_internal_energy_sums(), and update_internal_vectors().
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
return the one-body energy for the currently assigned state
References curr_state_one_body_energy_.
Referenced by core::pack::interaction_graph::LinearMemoryInteractionGraph::get_energy_sum_for_vertex_group().
| int core::pack::interaction_graph::LinearMemNode::get_recent_history_size | ( | ) | const |
References rhq_.
|
inline |
|
inlinevirtual |
return the total energy for this node; includes full energies to neighboring residues
References curr_state_total_energy_.
| void core::pack::interaction_graph::LinearMemNode::partial_assign_state | ( | int | new_state | ) |
first half of an entire-graph state assignment that avoids unnecessary energy updates as produced in assign_state. Adjust all node's states first, then update all energies.
References core::pack::interaction_graph::LinearMemEdge::acknowledge_partial_state_change(), alternate_state_is_being_considered_, assign_zero_state(), curr_state_sparse_mat_info_, current_state_, get_incident_linmem_edge(), core::pack::interaction_graph::NodeBase::get_node_index(), core::pack::interaction_graph::NodeBase::get_num_incident_edges(), core::pack::interaction_graph::OnTheFlyNode::get_sparse_mat_info_for_state(), rhq_, and update_recent_history().
Referenced by core::pack::interaction_graph::LinearMemoryInteractionGraph::set_network_state().
|
overridevirtual |
linmem ig does not have to do anything before sim annealing begins
Implements core::pack::interaction_graph::NodeBase.
References accepted_history_head_, already_prepped_for_simA_, filled_substitution_history_, core::pack::interaction_graph::NodeBase::get_edge_vector_up_to_date(), get_incident_linmem_edge(), core::pack::interaction_graph::NodeBase::get_node_index(), core::pack::interaction_graph::NodeBase::get_num_incident_edges(), core::pack::interaction_graph::NodeBase::get_num_states(), num_recently_accepted_, core::pack::interaction_graph::LinearMemEdge::reset_state_energies(), rhq_, and update_internal_vectors().
|
overridevirtual |
write internal energy and bookkeeping data to standard out
Implements core::pack::interaction_graph::NodeBase.
References alternate_state_is_being_considered_, alternate_state_one_body_energy_, alternate_state_two_body_energies_, curr_state_one_body_energy_, curr_state_sparse_mat_info_, curr_state_two_body_energies_, current_state_, core::pack::interaction_graph::SparseMatrixIndex::get_aa_type(), core::pack::interaction_graph::NodeBase::get_index_of_adjacent_node(), core::pack::interaction_graph::NodeBase::get_node_index(), core::pack::interaction_graph::NodeBase::get_num_incident_edges(), core::pack::interaction_graph::NodeBase::get_num_states(), core::pack::interaction_graph::SparseMatrixIndex::get_state_ind_for_this_aa_type(), and core::pack::interaction_graph::T().
Referenced by core::pack::interaction_graph::LinearMemoryInteractionGraph::print_current_state_assignment().
| void core::pack::interaction_graph::LinearMemNode::print_internal_energies | ( | ) | const |
References curr_state_one_body_energy_, curr_state_sparse_mat_info_, curr_state_total_energy_, curr_state_two_body_energies_, current_state_, core::pack::interaction_graph::SparseMatrixIndex::get_aa_type(), core::pack::interaction_graph::NodeBase::get_index_of_adjacent_node(), core::pack::interaction_graph::NodeBase::get_num_incident_edges(), core::pack::interaction_graph::SparseMatrixIndex::get_state_ind_for_this_aa_type(), and core::pack::interaction_graph::T().
| core::PackerEnergy core::pack::interaction_graph::LinearMemNode::project_deltaE_for_substitution | ( | int | alternate_state, |
| core::PackerEnergy & | prev_node_energy | ||
| ) |
compute the change in energy induced by substituting the currently assigned state with some alternative state
References core::pack::interaction_graph::debug, core::scoring::fa_rep, core::scoring::EMapVector::show_nonzero(), core::pack::interaction_graph::T(), and core::scoring::EMapVector::zero().
Referenced by calc_deltaEpd().
|
inlineprotected |
References alternate_state_.
| void core::pack::interaction_graph::LinearMemNode::set_recent_history_size | ( | int | num_states_to_maintain_in_recent_history | ) |
References rhq_.
Referenced by core::pack::interaction_graph::LinearMemoryInteractionGraph::set_recent_history_sizes().
|
inlineoverridevirtual |
state 0 represents the unasigned state
Implements core::pack::interaction_graph::NodeBase.
References current_state_.
| void core::pack::interaction_graph::LinearMemNode::update_internal_energy_sums | ( | ) |
References curr_state_one_body_energy_, curr_state_total_energy_, core::pack::interaction_graph::LinearMemEdge::get_current_two_body_energy(), core::pack::interaction_graph::NodeBase::get_edge_vector_up_to_date(), get_incident_linmem_edge(), and core::pack::interaction_graph::NodeBase::get_num_incident_edges().
|
private |
References aa_neighbors_for_edges_, alternate_state_two_body_energies_, curr_state_two_body_energies_, get_incident_linmem_edge(), core::pack::interaction_graph::NodeBase::get_index_of_adjacent_node(), core::pack::interaction_graph::NodeBase::get_node_index(), core::pack::interaction_graph::OnTheFlyNode::get_num_aa_types(), core::pack::interaction_graph::NodeBase::get_num_incident_edges(), core::pack::interaction_graph::LinearMemEdge::get_sparse_aa_neighbor_info(), neighbors_curr_state_, neighbors_curr_state_sparse_info_, neighbors_state_recent_history_index_, and core::pack::interaction_graph::NodeBase::update_edge_vector().
Referenced by prepare_for_simulated_annealing().
|
private |
References rhq_.
Referenced by assign_state(), commit_considered_substitution(), and partial_assign_state().
|
private |
Referenced by compute_pair_energy_for_current_state(), count_dynamic_memory(), and update_internal_vectors().
|
staticprivate |
Referenced by acknowledge_last_substititon_not_committed(), and commit_considered_substitution().
|
staticprivate |
Referenced by acknowledge_last_substititon_not_committed(), and commit_considered_substitution().
|
private |
|
private |
|
private |
Referenced by prepare_for_simulated_annealing().
|
private |
Referenced by commit_considered_substitution().
|
private |
|
private |
|
private |
Referenced by commit_considered_substitution(), and print().
|
private |
Referenced by commit_considered_substitution(), and get_alt_pd_energy_total().
|
private |
Referenced by commit_considered_substitution(), count_dynamic_memory(), print(), and update_internal_vectors().
|
private |
|
private |
|
private |
Referenced by acknowledge_neighbors_partial_state_substitution(), acknowledge_neighbors_state_substitution(), assign_state(), assign_zero_state(), commit_considered_substitution(), complete_state_assignment(), get_curr_pd_energy_total(), get_totalE(), print_internal_energies(), and update_internal_energy_sums().
|
private |
Referenced by acknowledge_neighbors_partial_state_substitution(), acknowledge_neighbors_state_substitution(), assign_state(), assign_zero_state(), commit_considered_substitution(), complete_state_assignment(), count_dynamic_memory(), print(), print_internal_energies(), and update_internal_vectors().
|
private |
Referenced by assign_state(), assign_zero_state(), commit_considered_substitution(), complete_state_assignment(), compute_pair_energy_for_current_state(), get_current_rotamer(), get_current_state(), get_sparse_mat_info_for_curr_state(), partial_assign_state(), print(), print_internal_energies(), and state_unassigned().
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
Referenced by acknowledge_last_substititon_not_committed(), and commit_considered_substitution().
|
private |
|
staticprivate |
1.8.7