Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
core::pack::interaction_graph::LinearMemNode Class Reference

#include <LinearMemoryInteractionGraph.hh>

Inheritance diagram for core::pack::interaction_graph::LinearMemNode:
Inheritance graph
[legend]

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...
 
EdgeBasefind_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...
 
EdgeBaseget_incident_edge (int index)
 
int get_index_of_adjacent_node (int index) const
 
NodeBase const * get_adjacent_node (int index) const
 
NodeBaseget_adjacent_node (int index)
 

Protected Member Functions

conformation::Residue const & get_current_rotamer ()
 
core::PackerEnergy get_curr_pd_energy_total () const
 
core::PackerEnergy get_alt_pd_energy_total () const
 
void set_alternate_state (int alt)
 
int get_alternate_state () const
 
void calc_deltaEpd (int alternate_state)
 
bool considering_alternate_state () const
 
- Protected Member Functions inherited from core::pack::interaction_graph::OnTheFlyNode
OnTheFlyEdgeget_incident_otf_edge (int edge)
 
OnTheFlyEdge const * get_incident_otf_edge (int edge) const
 
OnTheFlyNodeget_adjacent_otf_node (int index)
 
OnTheFlyNode const * get_adjacent_otf_node (int index) const
 
OnTheFlyInteractionGraphget_on_the_fly_owner ()
 
OnTheFlyInteractionGraph const * get_on_the_fly_owner () const
 
conformation::Residue const & get_rotamer (int state) const
 
BoundingSphere const & sc_bounding_sphere (int state) const
 
BoundingSphere const & bb_bounding_sphere () const
 
- Protected Member Functions inherited from core::pack::interaction_graph::NodeBase
void update_edge_vector ()
 converts edge-list to edge-vector representation More...
 
bool get_edge_vector_up_to_date () const
 
InteractionGraphBase const * get_owner () const
 
InteractionGraphBaseget_owner ()
 

Private Member Functions

void update_internal_vectors ()
 
LinearMemEdge const * get_incident_linmem_edge (int index) const
 
LinearMemEdgeget_incident_linmem_edge (int index)
 
LinearMemNode const * get_adjacent_linmem_node (int index) const
 
LinearMemNodeget_adjacent_linmem_node (int index)
 
LinearMemoryInteractionGraph
const * 
get_linmem_ig_owner () const
 
LinearMemoryInteractionGraphget_linmem_ig_owner ()
 
int update_recent_history (int state)
 

Private Attributes

utility::recent_history_queue rhq_
 Data. More...
 
ObjexxFCL::FArray3D< unsigned
char > 
aa_neighbors_for_edges_
 
utility::vector1< int > neighbors_curr_state_
 
utility::vector1< int > neighbors_state_recent_history_index_
 
utility::vector1
< SparseMatrixIndex
neighbors_curr_state_sparse_info_
 
int current_state_
 
SparseMatrixIndex curr_state_sparse_mat_info_
 
core::PackerEnergy curr_state_one_body_energy_
 
core::PackerEnergy curr_state_total_energy_
 
utility::vector1
< core::PackerEnergy
curr_state_two_body_energies_
 
int alternate_state_
 
SparseMatrixIndex alt_state_sparse_mat_info_
 
core::PackerEnergy alternate_state_one_body_energy_
 
core::PackerEnergy alternate_state_total_energy_
 
utility::vector1
< core::PackerEnergy
alternate_state_two_body_energies_
 
bool alternate_state_is_being_considered_
 
bool already_prepped_for_simA_
 
ObjexxFCL::FArray1D_int accepted_rejected_substitution_history_
 
int accepted_history_head_
 
int num_recently_accepted_
 
bool filled_substitution_history_
 

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, RealBoundingSphere
 

Constructor & Destructor Documentation

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

core::pack::interaction_graph::LinearMemNode::~LinearMemNode ( )
overridedefault

virtual dstor

Member Function Documentation

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 
)
void core::pack::interaction_graph::LinearMemNode::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 
)
inline
void core::pack::interaction_graph::LinearMemNode::assign_state ( int  new_state)
void core::pack::interaction_graph::LinearMemNode::assign_zero_state ( )
overridevirtual
void core::pack::interaction_graph::LinearMemNode::calc_deltaEpd ( int  alternate_state)
protected
void core::pack::interaction_graph::LinearMemNode::commit_considered_substitution ( )
void core::pack::interaction_graph::LinearMemNode::complete_state_assignment ( )
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_.

bool core::pack::interaction_graph::LinearMemNode::considering_alternate_state ( ) const
inlineprotected
unsigned int core::pack::interaction_graph::LinearMemNode::count_dynamic_memory ( ) const
overridevirtual
unsigned int core::pack::interaction_graph::LinearMemNode::count_static_memory ( ) const
overridevirtual
LinearMemNode const * core::pack::interaction_graph::LinearMemNode::get_adjacent_linmem_node ( int  index) const
inlineprivate
LinearMemNode * core::pack::interaction_graph::LinearMemNode::get_adjacent_linmem_node ( int  index)
inlineprivate
core::PackerEnergy core::pack::interaction_graph::LinearMemNode::get_alt_pd_energy_total ( ) const
inlineprotected
int core::pack::interaction_graph::LinearMemNode::get_alternate_state ( ) const
inlineprotected

References alternate_state_.

core::PackerEnergy core::pack::interaction_graph::LinearMemNode::get_curr_pd_energy_total ( ) const
inlineprotected
int core::pack::interaction_graph::LinearMemNode::get_curr_state_recent_state_id ( ) const
inline

return the "recent state id" for the currently assigned state

References rhq_.

Referenced by core::pack::interaction_graph::LinearMemEdge::store_curr_state_energy().

conformation::Residue const& core::pack::interaction_graph::LinearMemNode::get_current_rotamer ( )
inlineprotected
int core::pack::interaction_graph::LinearMemNode::get_current_state ( ) const
inline
LinearMemEdge const * core::pack::interaction_graph::LinearMemNode::get_incident_linmem_edge ( int  index) const
inlineprivate
LinearMemEdge * core::pack::interaction_graph::LinearMemNode::get_incident_linmem_edge ( int  index)
inlineprivate
LinearMemoryInteractionGraph const * core::pack::interaction_graph::LinearMemNode::get_linmem_ig_owner ( ) const
inlineprivate
LinearMemoryInteractionGraph * core::pack::interaction_graph::LinearMemNode::get_linmem_ig_owner ( )
inlineprivate
core::PackerEnergy core::pack::interaction_graph::LinearMemNode::get_one_body_energy_current_state ( ) const
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_.

SparseMatrixIndex const & core::pack::interaction_graph::LinearMemNode::get_sparse_mat_info_for_curr_state ( ) const
inline
virtual core::PackerEnergy core::pack::interaction_graph::LinearMemNode::get_totalE ( ) const
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)
void core::pack::interaction_graph::LinearMemNode::prepare_for_simulated_annealing ( )
overridevirtual
void core::pack::interaction_graph::LinearMemNode::print ( ) const
overridevirtual
void core::pack::interaction_graph::LinearMemNode::print_internal_energies ( ) const
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().

void core::pack::interaction_graph::LinearMemNode::set_alternate_state ( int  alt)
inlineprotected

References alternate_state_.

void core::pack::interaction_graph::LinearMemNode::set_recent_history_size ( int  num_states_to_maintain_in_recent_history)
bool core::pack::interaction_graph::LinearMemNode::state_unassigned ( ) const
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 ( )
void core::pack::interaction_graph::LinearMemNode::update_internal_vectors ( )
private
int core::pack::interaction_graph::LinearMemNode::update_recent_history ( int  state)
private

Member Data Documentation

ObjexxFCL::FArray3D< unsigned char > core::pack::interaction_graph::LinearMemNode::aa_neighbors_for_edges_
private
const int core::pack::interaction_graph::LinearMemNode::ACCEPTANCE_REJECTION_HISTORY_LENGTH = 100
staticprivate
const int core::pack::interaction_graph::LinearMemNode::ACCEPTED = 1
staticprivate
int core::pack::interaction_graph::LinearMemNode::accepted_history_head_
private
ObjexxFCL::FArray1D_int core::pack::interaction_graph::LinearMemNode::accepted_rejected_substitution_history_
private
bool core::pack::interaction_graph::LinearMemNode::already_prepped_for_simA_
private
SparseMatrixIndex core::pack::interaction_graph::LinearMemNode::alt_state_sparse_mat_info_
private
int core::pack::interaction_graph::LinearMemNode::alternate_state_
private
bool core::pack::interaction_graph::LinearMemNode::alternate_state_is_being_considered_
private
core::PackerEnergy core::pack::interaction_graph::LinearMemNode::alternate_state_one_body_energy_
private
core::PackerEnergy core::pack::interaction_graph::LinearMemNode::alternate_state_total_energy_
private
utility::vector1< core::PackerEnergy > core::pack::interaction_graph::LinearMemNode::alternate_state_two_body_energies_
private
core::PackerEnergy core::pack::interaction_graph::LinearMemNode::curr_state_one_body_energy_
private
SparseMatrixIndex core::pack::interaction_graph::LinearMemNode::curr_state_sparse_mat_info_
private
core::PackerEnergy core::pack::interaction_graph::LinearMemNode::curr_state_total_energy_
private
utility::vector1< core::PackerEnergy > core::pack::interaction_graph::LinearMemNode::curr_state_two_body_energies_
private
int core::pack::interaction_graph::LinearMemNode::current_state_
private
bool core::pack::interaction_graph::LinearMemNode::filled_substitution_history_
private
utility::vector1< int > core::pack::interaction_graph::LinearMemNode::neighbors_curr_state_
private
utility::vector1< SparseMatrixIndex > core::pack::interaction_graph::LinearMemNode::neighbors_curr_state_sparse_info_
private
utility::vector1< int > core::pack::interaction_graph::LinearMemNode::neighbors_state_recent_history_index_
private
int core::pack::interaction_graph::LinearMemNode::num_recently_accepted_
private
const int core::pack::interaction_graph::LinearMemNode::REJECTED = 0
staticprivate
utility::recent_history_queue core::pack::interaction_graph::LinearMemNode::rhq_
private
const int core::pack::interaction_graph::LinearMemNode::THRESHOLD_ACCEPTANCE_RATE_FOR_RPE_STORAGE = 10
staticprivate

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