![]() |
Rosetta
2021.16
|
Class to hold the component energies between pairs of residues. Each node represents a residue in its corresponding structure. Each edge in the graph holds a two-body energy map representing the unweighted components of the energy function for those terms with non-zero weight. The EnergyGraph may be accessed from the pose's Energies object, but at a price of an extra score evaluation. This second score evaluation may be avoided if you use the ScoreFunction::score_components( pose ) method. More...
#include <EnergyGraph.hh>

Public Types | |
| typedef utility::graph::Graph | parent |
Public Member Functions | |
| ~EnergyGraph () override | |
| EnergyGraph (Size num_nodes) | |
| EnergyGraph () | |
| EnergyGraph (EnergyGraph const &src) | |
| EnergyGraph & | operator= (EnergyGraph const &rhs) |
| assignment operator – performs a deep copy More... | |
| Size | n_active_score_types () const |
| bool | active_score_types (ScoreTypes const &active) |
| Set the active score types, and return true if the new score types are the same as the old score types and the graph state is still good. Returns false if the score types have changed, indicating that the graph has dropped all of its edges;. More... | |
| void | add_energy_edge (Size index1, Size index2, DistanceSquared dsq) |
| Add an energy edge to the graph and store the square distance. More... | |
| EnergyNode const * | get_energy_node (Size index) const |
| Add an energy edge to the graph and set the energies for the non-zero-weighted components of the input emap. void add_energy_edge( Size index1, Size index2, EnergyMap const & emap );. More... | |
| EnergyNode * | get_energy_node (Size index) |
| EnergyEdge * | find_energy_edge (Size n1, Size n2) |
| EnergyEdge const * | find_energy_edge (Size n1, Size n2) const |
| void | delete_edge (utility::graph::Edge *edge) override |
| void | deallocate_arraypoolelement (utility::graph::ArrayPoolElement< Real > &element) |
| As an edge is deleted from the graph, it must reliquish hold over its array-pool element so that the element may be reused by new edges. More... | |
| utility::vector1< int > const & | score_type_2_active () const |
| ScoreTypes const & | active_2b_score_types () const |
| utility::graph::ArrayPool< Real > & | array_pool () |
| Give non-const access to the array pool – this function should only be called by class EnergyEdge. I wish C++ let me declare this function private and that EnergyEdge could be a "friend" of this function. More... | |
Protected Member Functions | |
| Size | count_static_memory () const override |
| Size | count_dynamic_memory () const override |
| utility::graph::Node * | create_new_node (Size index) override |
| Factory method for node creation. More... | |
| utility::graph::Edge * | create_new_edge (Size index1, Size index2) override |
| Factory method for edge creation. More... | |
| utility::graph::Edge * | create_new_edge (utility::graph::Edge const *example_edge) override |
| Factory copy-constructor method for edge creation. More... | |
Private Attributes | |
| boost::unordered_object_pool < EnergyEdge > * | energy_edge_pool_ |
| utility::graph::ArrayPool< Real > | energy_array_pool_ |
| ScoreTypes | active_2b_score_types_ |
| utility::vector1< int > | score_type_2_active_ |
| these are flag values; <0 has a special meaning, so they need to be ints More... | |
Class to hold the component energies between pairs of residues. Each node represents a residue in its corresponding structure. Each edge in the graph holds a two-body energy map representing the unweighted components of the energy function for those terms with non-zero weight. The EnergyGraph may be accessed from the pose's Energies object, but at a price of an extra score evaluation. This second score evaluation may be avoided if you use the ScoreFunction::score_components( pose ) method.
| typedef utility::graph::Graph core::scoring::EnergyGraph::parent |
|
override |
References energy_edge_pool_.
| core::scoring::EnergyGraph::EnergyGraph | ( | Size | num_nodes | ) |
This does not call the base class parent( Size ) constructor since that produces calls to the polymorphic function create_new_node() and polymorphism does not work during constructor intialization.
| core::scoring::EnergyGraph::EnergyGraph | ( | ) |
Referenced by count_static_memory().
| core::scoring::EnergyGraph::EnergyGraph | ( | EnergyGraph const & | src | ) |
Notice that this does not call the parent( src ) copy constructor. This is because the copy constructor relies on polymorphic functions which are unavailable during the Graph constructor. Instead, this function waits until parent construction is complete, and relies on the assigmnent operator.
References active_2b_score_types_, and active_score_types().
|
inline |
References active_2b_score_types_.
| bool core::scoring::EnergyGraph::active_score_types | ( | ScoreTypes const & | active | ) |
Set the active score types, and return true if the new score types are the same as the old score types and the graph state is still good. Returns false if the score types have changed, indicating that the graph has dropped all of its edges;.
The array pool only needs to be resized if the number of active score types has changed; it doesn't have to be resized if the actual active types have changed but the number of active score types has remained constant. However, if either the number or the identity of the active score types have changed, then all old edges in the EnergyGraph should be dropped. The input array "active" must be sorted.
References active_2b_score_types_, energy_array_pool_, and score_type_2_active_.
Referenced by EnergyGraph(), and operator=().
| void core::scoring::EnergyGraph::add_energy_edge | ( | Size | index1, |
| Size | index2, | ||
| DistanceSquared | dsq | ||
| ) |
Add an energy edge to the graph and store the square distance.
Referenced by core::scoring::symmetry::SymmetricEnergies::update_neighbor_links().
|
inline |
Give non-const access to the array pool – this function should only be called by class EnergyEdge. I wish C++ let me declare this function private and that EnergyEdge could be a "friend" of this function.
References energy_array_pool_.
|
overrideprotected |
References energy_array_pool_.
|
overrideprotected |
References EnergyGraph().
Factory method for edge creation.
References energy_edge_pool_.
|
overrideprotected |
Factory copy-constructor method for edge creation.
References energy_edge_pool_.
|
overrideprotected |
Factory method for node creation.
| void core::scoring::EnergyGraph::deallocate_arraypoolelement | ( | utility::graph::ArrayPoolElement< Real > & | element | ) |
As an edge is deleted from the graph, it must reliquish hold over its array-pool element so that the element may be reused by new edges.
References energy_array_pool_.
Referenced by core::scoring::EnergyEdge::~EnergyEdge().
|
override |
References energy_edge_pool_.
| EnergyEdge * core::scoring::EnergyGraph::find_energy_edge | ( | Size | n1, |
| Size | n2 | ||
| ) |
| EnergyEdge const * core::scoring::EnergyGraph::find_energy_edge | ( | Size | n1, |
| Size | n2 | ||
| ) | const |
|
inline |
Add an energy edge to the graph and set the energies for the non-zero-weighted components of the input emap. void add_energy_edge( Size index1, Size index2, EnergyMap const & emap );.
|
inline |
|
inline |
References active_2b_score_types_.
| EnergyGraph & core::scoring::EnergyGraph::operator= | ( | EnergyGraph const & | rhs | ) |
assignment operator – performs a deep copy
References active_2b_score_types_, and active_score_types().
|
inline |
References score_type_2_active_.
Referenced by core::scoring::EnergyEdge::operator[]().
|
private |
Referenced by active_2b_score_types(), active_score_types(), EnergyGraph(), n_active_score_types(), and operator=().
|
private |
Referenced by active_score_types(), array_pool(), count_dynamic_memory(), and deallocate_arraypoolelement().
|
private |
Referenced by create_new_edge(), delete_edge(), and ~EnergyGraph().
|
private |
these are flag values; <0 has a special meaning, so they need to be ints
Referenced by active_score_types(), and score_type_2_active().
1.8.7