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 | List of all members
core::pack::interaction_graph::EdgeBase Class Referenceabstract

#include <InteractionGraphBase.hh>

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

Public Member Functions

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...
 
virtual void declare_energies_final ()=0
 
virtual void prepare_for_simulated_annealing ()=0
 
virtual unsigned int count_static_memory () const =0
 
virtual unsigned int count_dynamic_memory () const
 
Real edge_weight () const
 
virtual void set_edge_weight (Real weight)=0
 
bool marked_for_deletion () const
 Has this edge indicated that it can be deleted? More...
 
InteractionGraphBase const * get_owner () const
 
InteractionGraphBaseget_owner ()
 

Protected Member Functions

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

 EdgeBase ()
 
 EdgeBase (EdgeBase const &)
 
EdgeBaseoperator= (EdgeBase &)
 

Private Attributes

int node_indices_ [2]
 
int num_node_states_ [2]
 
NodeBasenodes_ [2]
 
int pos_in_nodes_edge_vector_ [2]
 
std::list< EdgeBase * >::iterator pos_in_nodes_edge_list_ [2]
 
std::list< EdgeBase * >::iterator pos_in_owners_edge_list_
 
InteractionGraphBaseowner_
 
Real edge_weight_
 
bool marked_for_deletion_ = false
 Allow deferred deletion of edges. More...
 

Constructor & Destructor Documentation

core::pack::interaction_graph::EdgeBase::~EdgeBase ( )
virtual

copy constructor, do not use

Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

destructor

removes all record of this edge from edge-lists of the 1) nodes this edge is incident upon and 2) the owning interaction graph

Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References core::pack::interaction_graph::NodeBase::drop_edge(), core::pack::interaction_graph::InteractionGraphBase::drop_edge(), nodes_, owner_, pos_in_nodes_edge_list_, and pos_in_owners_edge_list_.

core::pack::interaction_graph::EdgeBase::EdgeBase ( InteractionGraphBase owner,
int  first_node_ind,
int  second_node_ind 
)

main constructor for edge, no default nor copy constructors

edge adds itself to the edge list of the two nodes its set to be incident upon, and stores the list-iterators that the nodes return.

Parameters
owner- [in] - owning InteractionGraph
first_node_ind- [in] - the index of the first node
second_node_ind- [in] - the index of the second node
Global Read:
Global Write:
Remarks
References:
Author
apl

References core::pack::interaction_graph::InteractionGraphBase::ig_nodes_.

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

Member Function Documentation

unsigned int core::pack::interaction_graph::EdgeBase::count_dynamic_memory ( ) const
virtual
virtual unsigned int core::pack::interaction_graph::EdgeBase::count_static_memory ( ) const
pure virtual
virtual void core::pack::interaction_graph::EdgeBase::declare_energies_final ( )
pure virtual
Real core::pack::interaction_graph::EdgeBase::edge_weight ( ) const
inline
void core::pack::interaction_graph::EdgeBase::edge_weight ( Real  new_weight)
protected

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.

References edge_weight_.

int core::pack::interaction_graph::EdgeBase::get_edges_position_in_nodes_edge_vector ( int  index) const
inlineprotected

References pos_in_nodes_edge_vector_.

Referenced by core::pack::interaction_graph::FASTEREdge::acknowledge_partial_state_assignment(), core::pack::interaction_graph::SymmMinimalistEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::SymmLinearMemEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::LazyEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::DoubleLazyEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::LinearMemEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::FASTEREdge::acknowledge_perturbed_state(), core::pack::interaction_graph::SymmMinimalistEdge::acknowledge_state_change(), core::pack::interaction_graph::SymmLinearMemEdge::acknowledge_state_change(), core::pack::interaction_graph::LazyEdge::acknowledge_state_change(), core::pack::interaction_graph::DoubleLazyEdge::acknowledge_state_change(), core::pack::interaction_graph::LinearMemEdge::acknowledge_state_change(), core::pack::interaction_graph::DoubleDensePDEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::SymmMinimalistEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::DensePDEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::SymmLinearMemEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::LazyEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::FASTEREdge::acknowledge_state_zeroed(), core::pack::interaction_graph::DoubleLazyEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::PDEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::LinearMemEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::DoubleDensePDEdge::acknowledge_substitution(), protocols::flexpack::interaction_graph::MinimalistFlexbbEdge::acknowledge_substitution(), core::pack::interaction_graph::SymmMinimalistEdge::acknowledge_substitution(), core::pack::interaction_graph::DensePDEdge::acknowledge_substitution(), core::pack::interaction_graph::SymmLinearMemEdge::acknowledge_substitution(), core::pack::interaction_graph::FASTEREdge::acknowledge_substitution(), core::pack::interaction_graph::DoubleLazyEdge::acknowledge_substitution(), core::pack::interaction_graph::LazyEdge::acknowledge_substitution(), core::pack::interaction_graph::PDEdge::acknowledge_substitution(), core::pack::interaction_graph::LinearMemEdge::acknowledge_substitution(), core::pack::interaction_graph::DoubleLazyEdge::get_aa_submatrix_energies(), core::pack::interaction_graph::LazyEdge::get_aa_submatrix_energies(), core::pack::interaction_graph::SymmMinimalistEdge::get_energy_following_partial_state_assignment(), core::pack::interaction_graph::SymmLinearMemEdge::get_energy_following_partial_state_assignment(), core::pack::interaction_graph::LinearMemEdge::get_energy_following_partial_state_assignment(), core::pack::interaction_graph::SymmMinimalistEdge::get_energy_for_alt_state(), core::pack::interaction_graph::LazyEdge::get_energy_for_state_pair(), core::pack::interaction_graph::LazyEdge::get_two_body_energy(), and core::pack::interaction_graph::DoubleLazyEdge::get_two_body_energy_smi().

int core::pack::interaction_graph::EdgeBase::get_first_node_ind ( ) const

returns the index of the smaller-indexed node

Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References node_indices_.

Referenced by core::pack::hbonds::BareMinimumPDEdge::add_to_two_body_energies(), core::pack::hbonds::BareMinimumPDEdge::add_to_two_body_energy(), and protocols::hbnet::HBNet::edge_can_yield_monte_carlo_seed().

NodeBase const* core::pack::interaction_graph::EdgeBase::get_node ( int  index) const
inlineprotected
NodeBase* core::pack::interaction_graph::EdgeBase::get_node ( int  index)
inlineprotected

References nodes_.

int core::pack::interaction_graph::EdgeBase::get_node_index ( int  index) const
inlineprotected

References node_indices_.

Referenced by core::pack::interaction_graph::FASTEREdge::acknowledge_partial_state_assignment(), core::pack::interaction_graph::SymmMinimalistEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::SymmLinearMemEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::LazyEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::DoubleLazyEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::LinearMemEdge::acknowledge_partial_state_change(), core::pack::interaction_graph::FASTEREdge::acknowledge_perturbed_state(), core::pack::interaction_graph::SymmMinimalistEdge::acknowledge_state_change(), core::pack::interaction_graph::SymmLinearMemEdge::acknowledge_state_change(), core::pack::interaction_graph::LazyEdge::acknowledge_state_change(), core::pack::interaction_graph::DoubleLazyEdge::acknowledge_state_change(), core::pack::interaction_graph::LinearMemEdge::acknowledge_state_change(), core::pack::interaction_graph::DoubleDensePDEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::SymmMinimalistEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::DensePDEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::SymmLinearMemEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::LazyEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::FASTEREdge::acknowledge_state_zeroed(), core::pack::interaction_graph::DoubleLazyEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::PDEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::LinearMemEdge::acknowledge_state_zeroed(), core::pack::interaction_graph::DoubleDensePDEdge::acknowledge_substitution(), core::pack::interaction_graph::SymmMinimalistEdge::acknowledge_substitution(), core::pack::interaction_graph::DensePDEdge::acknowledge_substitution(), core::pack::interaction_graph::SymmLinearMemEdge::acknowledge_substitution(), core::pack::interaction_graph::FASTEREdge::acknowledge_substitution(), core::pack::interaction_graph::DoubleLazyEdge::acknowledge_substitution(), core::pack::interaction_graph::LazyEdge::acknowledge_substitution(), core::pack::interaction_graph::PDEdge::acknowledge_substitution(), core::pack::interaction_graph::LinearMemEdge::acknowledge_substitution(), core::pack::interaction_graph::SymmOnTheFlyEdge::add_GlyCorrection_values(), core::pack::interaction_graph::SymmOnTheFlyEdge::add_ProCorrection_values(), protocols::flexpack::interaction_graph::OTFFlexbbEdge::compute_altbbconf_alternate_state_energy(), protocols::flexpack::interaction_graph::OTFFlexbbEdge::compute_samebbconf_alternate_state_energy_first_node(), protocols::flexpack::interaction_graph::OTFFlexbbEdge::compute_samebbconf_alternate_state_energy_second_node(), core::pack::interaction_graph::FASTEREdge::get_deltaE_for_neighbor_following_perturbation(), core::pack::interaction_graph::SymmMinimalistEdge::get_energy_for_alt_state(), core::pack::interaction_graph::FASTEREdge::get_energy_for_perturbed_state(), core::pack::interaction_graph::OnTheFlyEdge::get_glycine_correction_for_node(), core::pack::interaction_graph::SymmOnTheFlyEdge::get_glycine_correction_for_node(), core::pack::interaction_graph::OnTheFlyEdge::get_proline_correction_for_node(), core::pack::interaction_graph::SymmOnTheFlyEdge::get_proline_correction_for_node(), protocols::flexpack::interaction_graph::OTFFlexbbEdge::print_alt_energies(), core::pack::interaction_graph::SymmMinimalistEdge::print_current_energy(), core::pack::interaction_graph::SymmLinearMemEdge::print_current_energy(), core::pack::interaction_graph::DoubleLazyEdge::print_current_energy(), core::pack::interaction_graph::LazyEdge::print_current_energy(), core::pack::interaction_graph::LinearMemEdge::print_current_energy(), core::pack::interaction_graph::SymmLinearMemEdge::reset_state_energies(), core::pack::interaction_graph::LinearMemEdge::reset_state_energies(), core::pack::interaction_graph::OnTheFlyEdge::set_GlyCorrection_values(), and core::pack::interaction_graph::OnTheFlyEdge::set_ProCorrection_values().

int core::pack::interaction_graph::EdgeBase::get_num_states_for_node ( int  index) const
inlineprotected
int core::pack::interaction_graph::EdgeBase::get_other_ind ( int  node_ind) const

returns the index of the other node that the edge is incident upon

Parameters
node_ind- [in] - the node index of the node whose index is already known
Global Read:
Global Write:
Remarks
References:
Author
apl

References node_indices_.

Referenced by core::pack::interaction_graph::NodeBase::add_edge(), protocols::minimization_packing::GreenPacker::add_precomputed_energies(), protocols::mean_field::MeanField::calc_energies_matrix(), protocols::enzdes::EnzdesFlexibleRegion::calculate_rotamer_set_design_targets_partition_sum(), and core::pack::interaction_graph::InteractionGraphFactory::setup_IG_res_res_weights().

NodeBase * core::pack::interaction_graph::EdgeBase::get_other_node ( int  node_ind) const

returns a pointer to the other node that the edge is incident upon

Parameters
node_ind- [in] - the node index of the node whose index is already known
Global Read:
Global Write:
Remarks
References:
Author
apl

References node_indices_, and nodes_.

InteractionGraphBase const* core::pack::interaction_graph::EdgeBase::get_owner ( ) const
inline
InteractionGraphBase* core::pack::interaction_graph::EdgeBase::get_owner ( )
inline

References owner_.

int core::pack::interaction_graph::EdgeBase::get_second_node_ind ( ) const

returns the index of the larger-indexed node

Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References node_indices_.

Referenced by core::pack::hbonds::BareMinimumPDEdge::add_to_two_body_energies(), core::pack::hbonds::BareMinimumPDEdge::add_to_two_body_energy(), and protocols::hbnet::HBNet::edge_can_yield_monte_carlo_seed().

void core::pack::interaction_graph::EdgeBase::mark_edge_for_deletion ( )
inlineprotected
bool core::pack::interaction_graph::EdgeBase::marked_for_deletion ( ) const
inline

Has this edge indicated that it can be deleted?

References marked_for_deletion_.

EdgeBase& core::pack::interaction_graph::EdgeBase::operator= ( EdgeBase )
private
virtual void core::pack::interaction_graph::EdgeBase::prepare_for_simulated_annealing ( )
pure virtual
bool core::pack::interaction_graph::EdgeBase::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

Parameters
node1- [in] - index of one of the two nodes
node2- [in] - index of the other of the two nodes
Global Read:
Global Write:
Remarks
References:
Author
apl

References node_indices_.

Referenced by core::pack::interaction_graph::InteractionGraphBase::find_edge().

virtual void core::pack::interaction_graph::EdgeBase::set_edge_weight ( Real  weight)
pure virtual
void core::pack::interaction_graph::EdgeBase::set_pos_in_node_edgevector ( int  node_ind,
int  vect_position 
)

edge keeps index it has in node_ind's edge vector

Parameters
node_ind- [in] - the index of the node calling this method
vect_position- [in] - the position for this edge in the node's edge vector
Global Read:
Global Write:
Remarks
References:
Author
apl

References node_indices_, and pos_in_nodes_edge_vector_.

void core::pack::interaction_graph::EdgeBase::set_pos_in_owners_list ( std::list< EdgeBase * >::iterator  iter)

edge keeps iterator to its position in it's owner's edge list

Parameters
par Global Read:
Global Write:
Remarks
References:
Author
apl

References pos_in_owners_edge_list_.

Referenced by core::pack::interaction_graph::InteractionGraphBase::add_edge().

int core::pack::interaction_graph::EdgeBase::which_node ( int  node_index) const
inlineprotected

is a node the first or second node this edge is incident upon?

References node_indices_.

Referenced by protocols::flexpack::interaction_graph::FlexbbEdge::acknowledge_partial_state_assignment(), protocols::flexpack::interaction_graph::MinimalistFlexbbEdge::acknowledge_state_zeroed(), protocols::flexpack::interaction_graph::MinimalistFlexbbEdge::acknowledge_substitution(), core::pack::interaction_graph::SymmOnTheFlyEdge::add_GlyCorrection_values(), core::pack::interaction_graph::SymmOnTheFlyEdge::add_ProCorrection_values(), core::pack::interaction_graph::OnTheFlyEdge::eval_type(), core::pack::interaction_graph::SymmOnTheFlyEdge::eval_type(), core::pack::interaction_graph::OnTheFlyEdge::get_glycine_correction(), core::pack::interaction_graph::SymmOnTheFlyEdge::get_glycine_correction(), core::pack::interaction_graph::OnTheFlyEdge::get_glycine_correction_for_node(), core::pack::interaction_graph::SymmOnTheFlyEdge::get_glycine_correction_for_node(), core::pack::interaction_graph::OnTheFlyEdge::get_proline_correction(), core::pack::interaction_graph::SymmOnTheFlyEdge::get_proline_correction(), core::pack::interaction_graph::OnTheFlyEdge::get_proline_correction_for_node(), core::pack::interaction_graph::SymmOnTheFlyEdge::get_proline_correction_for_node(), protocols::flexpack::interaction_graph::FlexbbEdge::set_alt_state(), protocols::flexpack::interaction_graph::OTFFlexbbEdge::set_GlyCorrection_values(), core::pack::interaction_graph::OnTheFlyEdge::set_GlyCorrection_values(), protocols::flexpack::interaction_graph::FlexbbEdge::set_node_state_to_zero(), protocols::flexpack::interaction_graph::OTFFlexbbEdge::set_ProCorrection_values(), and core::pack::interaction_graph::OnTheFlyEdge::set_ProCorrection_values().

Member Data Documentation

Real core::pack::interaction_graph::EdgeBase::edge_weight_
private

Allow the arbitrary scaling of energies for each edge. The derived classes have the responsibility of scaling each energy as it is added to the edge, and also updating all of the edge energies if the edge weight changes after all the edge energies have been stored – that is, by dividing each energy by the old weight and multiplying by the new weight.

Referenced by edge_weight().

bool core::pack::interaction_graph::EdgeBase::marked_for_deletion_ = false
private

Allow deferred deletion of edges.

Referenced by mark_edge_for_deletion(), and marked_for_deletion().

int core::pack::interaction_graph::EdgeBase::node_indices_[2]
private
NodeBase* core::pack::interaction_graph::EdgeBase::nodes_[2]
private

Referenced by get_node(), get_other_node(), and ~EdgeBase().

int core::pack::interaction_graph::EdgeBase::num_node_states_[2]
private

Referenced by get_num_states_for_node().

InteractionGraphBase* core::pack::interaction_graph::EdgeBase::owner_
private

Referenced by get_owner(), and ~EdgeBase().

std::list< EdgeBase* >::iterator core::pack::interaction_graph::EdgeBase::pos_in_nodes_edge_list_[2]
private

Referenced by ~EdgeBase().

int core::pack::interaction_graph::EdgeBase::pos_in_nodes_edge_vector_[2]
private
std::list< EdgeBase* >::iterator core::pack::interaction_graph::EdgeBase::pos_in_owners_edge_list_
private

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