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

#include <LazyInteractionGraph.hh>

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

Public Member Functions

 LazyEdge (InteractionGraphBase *owner, int first_node_ind, int second_node_ind)
 
 ~LazyEdge () override
 
void set_sparse_aa_info (ObjexxFCL::FArray2_bool const &) override
 
void force_aa_neighbors (int node1aa, int node2aa) override
 re-allocates two-body energy table after forcing a pair of amino acids to become neighbors that were not initially declared to be neighbors More...
 
void force_all_aa_neighbors () override
 re-allocates two-body energy table after forcing a pair of amino acids to become neighbors that were not initially declared to be neighbors More...
 
bool get_sparse_aa_info (int node1aa, int node2aa) const override
 returns whether two amino acid types are represented as neighbors More...
 
core::PackerEnergy get_two_body_energy (int const node1state, int const node2state) const override
 
void declare_energies_final () override
 
void prepare_for_simulated_annealing () override
 
core::PackerEnergy get_current_two_body_energy () const
 
void acknowledge_state_change (int node_ind, int new_state, SparseMatrixIndex const &new_state_sparse_info, core::PackerEnergy &new_energy)
 
void acknowledge_state_zeroed (int node_ind)
 
void acknowledge_partial_state_change (int node_ind, int new_state, SparseMatrixIndex const &new_state_sparse_info)
 
core::PackerEnergy get_energy_following_partial_state_assignment ()
 
void acknowledge_substitution (int substituted_node_index, core::PackerEnergy const curr_state_energy, int nodes_new_state, SparseMatrixIndex const &nodes_new_state_sparse_info)
 
void set_edge_weight (Real weight) override
 
core::PackerEnergyget_edge_table_ptr ()
 
int get_two_body_table_size () const
 
void print_current_energy () const
 
bool build_sc_only_rotamer ()
 
ObjexxFCL::FArray2D_int const & get_offsets_for_aatypes ()
 
utility::vector1< int > const & get_second_node_num_states_per_aa ()
 
ObjexxFCL::FArray2D
< core::PackerEnergy
get_aa_submatrix_energies (int node1aa, int node2aa) const
 
unsigned int count_static_memory () const override
 
unsigned int count_dynamic_memory () const override
 
- Public Member Functions inherited from core::pack::interaction_graph::OnTheFlyEdge
 ~OnTheFlyEdge () override
 
 OnTheFlyEdge (InteractionGraphBase *owner, int first_node_ind, int second_node_ind)
 
void set_ProCorrection_values (int node_not_necessarily_proline, int state, core::PackerEnergy bb_regbb_E, core::PackerEnergy bb_probb_E, core::PackerEnergy sc_regbb_E, core::PackerEnergy sc_probb_E)
 
void set_GlyCorrection_values (int node_not_necessarily_glycine, int state, core::PackerEnergy bb_regbb_E, core::PackerEnergy bb_glybb_E, core::PackerEnergy sc_regbb_E, core::PackerEnergy sc_glybb_E)
 
core::PackerEnergy get_proline_correction_for_node (int node_ind, int state) const
 
core::PackerEnergy get_glycine_correction_for_node (int node_ind, int state) const
 
unsigned int count_dynamic_memory () const override
 
bool long_range_interactions_exist () const
 
bool short_range_interactions_exist () const
 
void note_long_range_interactions_exist ()
 
void note_short_range_interactions_exist ()
 
ResiduePairEvalType eval_type (int node_index) const
 
- 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...
 
NodeBaseget_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
 
InteractionGraphBaseget_owner ()
 

Static Public Member Functions

static core::PackerEnergy get_alternate_state_energy_first_node (int first_node_alt_state, int second_node_orig_state, SparseMatrixIndex const &second_node_orig_state_sparse_info, int first_node_state_offset_minus_1, int second_node_curr_num_states_per_aatype, int aa_neighbor_offset, ObjexxFCL::FArray1< core::PackerEnergy > &edge_energy_table)
 
static core::PackerEnergy get_alternate_state_energy_second_node (int first_node_orig_state, int second_node_alt_state, SparseMatrixIndex const &first_node_orig_state_sparse_info, SparseMatrixIndex const &second_node_alternate_state_sparse_info, int second_node_alt_state_num_states_per_aatype, int aa_neighbor_offset, ObjexxFCL::FArray1< core::PackerEnergy > &edge_energy_table)
 
static void store_interaction_energy_first_node (SparseMatrixIndex const &second_node_orig_state_sparse_info, int first_node_state_offset_minus_1, int second_node_curr_num_states_per_aatype, int aa_neighbor_offset, ObjexxFCL::FArray1< core::PackerEnergy > &edge_energy_table, core::PackerEnergy interaction_energy)
 
static void store_interaction_energy_second_node (SparseMatrixIndex const &first_node_orig_state_sparse_info, SparseMatrixIndex const &second_node_alternate_state_sparse_info, int second_node_alt_state_num_states_per_aatype, int aa_neighbor_offset, ObjexxFCL::FArray1< core::PackerEnergy > &edge_energy_table, core::PackerEnergy interaction_energy)
 

Static Public Attributes

static core::PackerEnergy const NOT_YET_COMPUTED_ENERGY = -1234
 

Protected Member Functions

void declare_energies_final_no_deletion ()
 
void prepare_for_simulated_annealing_no_deletion ()
 
bool pd_edge_table_all_zeros () const
 
- Protected Member Functions inherited from core::pack::interaction_graph::OnTheFlyEdge
core::PackerEnergy get_proline_correction (int which_node, int state) const
 
core::PackerEnergy get_glycine_correction (int which_node, int state) const
 
OnTheFlyNode const * get_otf_node (int which_node) const
 
OnTheFlyNodeget_otf_node (int which_node)
 
- 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
 
NodeBaseget_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...
 

Private Member Functions

void get_energy_for_state_pair (int const nodes_states[2], SparseMatrixIndex sparse_matrix_indices[2])
 
LazyNode const * get_lazy_node (int index) const
 
LazyNodeget_lazy_node (int index)
 
LazyInteractionGraph const * get_lazy_ig_owner () const
 
LazyInteractionGraphget_lazy_ig_owner ()
 
void wipe_two_body_energies_for_node_state (int node, int state)
 
 LazyEdge ()
 
 LazyEdge (LazyEdge const &)
 
LazyEdgeoperator= (LazyEdge const &)
 

Private Attributes

AminoAcidNeighborSparseMatrix
< core::PackerEnergy
two_body_energies_
 
core::PackerEnergy curr_state_energy_
 
bool partial_state_assignment_
 
bool ran_annealing_since_pair_energy_table_cleared_
 

Constructor & Destructor Documentation

core::pack::interaction_graph::LazyEdge::LazyEdge ( InteractionGraphBase owner,
int  first_node_ind,
int  second_node_ind 
)
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl
core::pack::interaction_graph::LazyEdge::~LazyEdge ( )
overridedefault
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl
core::pack::interaction_graph::LazyEdge::LazyEdge ( )
private

Referenced by count_static_memory().

core::pack::interaction_graph::LazyEdge::LazyEdge ( LazyEdge const &  )
private

Member Function Documentation

void core::pack::interaction_graph::LazyEdge::acknowledge_partial_state_change ( int  node_ind,
int  new_state,
SparseMatrixIndex const &  new_state_sparse_info 
)
void core::pack::interaction_graph::LazyEdge::acknowledge_state_change ( int  node_ind,
int  new_state,
SparseMatrixIndex const &  new_state_sparse_info,
core::PackerEnergy new_energy 
)
void core::pack::interaction_graph::LazyEdge::acknowledge_state_zeroed ( int  node_ind)
void core::pack::interaction_graph::LazyEdge::acknowledge_substitution ( int  substituted_node_index,
core::PackerEnergy const  curr_state_energy,
int  nodes_new_state,
SparseMatrixIndex const &  nodes_new_state_sparse_info 
)
inline
bool core::pack::interaction_graph::LazyEdge::build_sc_only_rotamer ( )
inline
unsigned int core::pack::interaction_graph::LazyEdge::count_dynamic_memory ( ) const
overridevirtual
unsigned int core::pack::interaction_graph::LazyEdge::count_static_memory ( ) const
overridevirtual
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

Implements core::pack::interaction_graph::OnTheFlyEdge.

References LazyEdge().

void core::pack::interaction_graph::LazyEdge::declare_energies_final ( )
overridevirtual
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

Implements core::pack::interaction_graph::EdgeBase.

void core::pack::interaction_graph::LazyEdge::declare_energies_final_no_deletion ( )
inlineprotected
void core::pack::interaction_graph::LazyEdge::force_aa_neighbors ( int  node1aa,
int  node2aa 
)
overridevirtual

re-allocates two-body energy table after forcing a pair of amino acids to become neighbors that were not initially declared to be neighbors

Parameters
node1aa- [in] - the amino acid type for the node with the smaller index
node2aa- [in] - the amino acid type for the node with the larger index

Implements core::pack::interaction_graph::FixedBBEdge.

References core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::blanket_set(), core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::force_aa_neighbors(), NOT_YET_COMPUTED_ENERGY, ran_annealing_since_pair_energy_table_cleared_, and two_body_energies_.

void core::pack::interaction_graph::LazyEdge::force_all_aa_neighbors ( )
overridevirtual

re-allocates two-body energy table after forcing a pair of amino acids to become neighbors that were not initially declared to be neighbors

Parameters
node1aa- [in] - the amino acid type for the node with the smaller index
node2aa- [in] - the amino acid type for the node with the larger index

Implements core::pack::interaction_graph::FixedBBEdge.

References core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::blanket_set(), core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::force_all_aa_neighbors(), NOT_YET_COMPUTED_ENERGY, ran_annealing_since_pair_energy_table_cleared_, and two_body_energies_.

ObjexxFCL::FArray2D< core::PackerEnergy > core::pack::interaction_graph::LazyEdge::get_aa_submatrix_energies ( int  node1aa,
int  node2aa 
) const
core::PackerEnergy core::pack::interaction_graph::LazyEdge::get_alternate_state_energy_first_node ( int  first_node_alt_state,
int  second_node_orig_state,
SparseMatrixIndex const &  second_node_orig_state_sparse_info,
int  first_node_state_offset_minus_1,
int  second_node_curr_num_states_per_aatype,
int  aa_neighbor_offset,
ObjexxFCL::FArray1< core::PackerEnergy > &  edge_energy_table 
)
inlinestatic
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::get().

core::PackerEnergy core::pack::interaction_graph::LazyEdge::get_alternate_state_energy_second_node ( int  first_node_orig_state,
int  second_node_alt_state,
SparseMatrixIndex const &  first_node_orig_state_sparse_info,
SparseMatrixIndex const &  second_node_alternate_state_sparse_info,
int  second_node_alt_state_num_states_per_aatype,
int  aa_neighbor_offset,
ObjexxFCL::FArray1< core::PackerEnergy > &  edge_energy_table 
)
inlinestatic
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::get().

core::PackerEnergy core::pack::interaction_graph::LazyEdge::get_current_two_body_energy ( ) const
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References curr_state_energy_.

Referenced by core::pack::interaction_graph::LazyNode::update_internal_energy_sums().

core::PackerEnergy & core::pack::interaction_graph::LazyEdge::get_edge_table_ptr ( )
core::PackerEnergy core::pack::interaction_graph::LazyEdge::get_energy_following_partial_state_assignment ( )
void core::pack::interaction_graph::LazyEdge::get_energy_for_state_pair ( int const  nodes_states[2],
SparseMatrixIndex  sparse_matrix_indices_[2] 
)
private
LazyInteractionGraph const * core::pack::interaction_graph::LazyEdge::get_lazy_ig_owner ( ) const
inlineprivate
LazyInteractionGraph * core::pack::interaction_graph::LazyEdge::get_lazy_ig_owner ( )
inlineprivate
LazyNode const * core::pack::interaction_graph::LazyEdge::get_lazy_node ( int  index) const
inlineprivate
LazyNode * core::pack::interaction_graph::LazyEdge::get_lazy_node ( int  index)
inlineprivate
ObjexxFCL::FArray2D_int const & core::pack::interaction_graph::LazyEdge::get_offsets_for_aatypes ( )
utility::vector1< int > const & core::pack::interaction_graph::LazyEdge::get_second_node_num_states_per_aa ( )
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References get_lazy_node(), and core::pack::interaction_graph::OnTheFlyNode::get_num_states_for_aa_types().

Referenced by core::pack::interaction_graph::LazyNode::update_internal_vectors().

bool core::pack::interaction_graph::LazyEdge::get_sparse_aa_info ( int  node1aa,
int  node2aa 
) const
overridevirtual

returns whether two amino acid types are represented as neighbors

Implements core::pack::interaction_graph::FixedBBEdge.

References core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::get_sparse_aa_info(), and two_body_energies_.

core::PackerEnergy core::pack::interaction_graph::LazyEdge::get_two_body_energy ( int const  node1state,
int const  node2state 
) const
overridevirtual
int core::pack::interaction_graph::LazyEdge::get_two_body_table_size ( ) const
LazyEdge& core::pack::interaction_graph::LazyEdge::operator= ( LazyEdge const &  )
private
bool core::pack::interaction_graph::LazyEdge::pd_edge_table_all_zeros ( ) const
inlineprotected
void core::pack::interaction_graph::LazyEdge::prepare_for_simulated_annealing ( )
overridevirtual
void core::pack::interaction_graph::LazyEdge::prepare_for_simulated_annealing_no_deletion ( )
inlineprotected
void core::pack::interaction_graph::LazyEdge::print_current_energy ( ) const
void core::pack::interaction_graph::LazyEdge::set_edge_weight ( Real  weight)
overridevirtual
void core::pack::interaction_graph::LazyEdge::set_sparse_aa_info ( ObjexxFCL::FArray2_bool const &  aa_neighbors)
overridevirtual
void core::pack::interaction_graph::LazyEdge::store_interaction_energy_first_node ( SparseMatrixIndex const &  second_node_orig_state_sparse_info,
int  first_node_state_offset_minus_1,
int  second_node_curr_num_states_per_aatype,
int  aa_neighbor_offset,
ObjexxFCL::FArray1< core::PackerEnergy > &  edge_energy_table,
core::PackerEnergy  interaction_energy 
)
inlinestatic
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::set().

Referenced by core::pack::interaction_graph::LazyNode::project_deltaE_for_substitution().

void core::pack::interaction_graph::LazyEdge::store_interaction_energy_second_node ( SparseMatrixIndex const &  first_node_orig_state_sparse_info,
SparseMatrixIndex const &  second_node_alternate_state_sparse_info,
int  second_node_alt_state_num_states_per_aatype,
int  aa_neighbor_offset,
ObjexxFCL::FArray1< core::PackerEnergy > &  edge_energy_table,
core::PackerEnergy  interaction_energy 
)
inlinestatic
Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References core::pack::interaction_graph::AminoAcidNeighborSparseMatrix< T >::set().

Referenced by core::pack::interaction_graph::LazyNode::project_deltaE_for_substitution().

void core::pack::interaction_graph::LazyEdge::wipe_two_body_energies_for_node_state ( int  node,
int  state 
)
private

Member Data Documentation

core::PackerEnergy core::pack::interaction_graph::LazyEdge::curr_state_energy_
private
core::PackerEnergy const core::pack::interaction_graph::LazyEdge::NOT_YET_COMPUTED_ENERGY = -1234
static
bool core::pack::interaction_graph::LazyEdge::partial_state_assignment_
private
bool core::pack::interaction_graph::LazyEdge::ran_annealing_since_pair_energy_table_cleared_
private
AminoAcidNeighborSparseMatrix< core::PackerEnergy > core::pack::interaction_graph::LazyEdge::two_body_energies_
mutableprivate

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