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

Public Types | |
| typedef utility::graph::Edge | parent |
| typedef scoring::EnergyMap | EnergyMap |
Public Member Functions | |
| EnergyEdge (EnergyGraph *owner, Size n1, Size n2) | |
| Energy edge ctor. More... | |
| EnergyEdge (EnergyGraph *owner, EnergyEdge const &example_edge) | |
| ~EnergyEdge () override | |
| virtual dstor; The EnergyEdge must free the array pool element it holds before it disappears. More... | |
| void | copy_from (parent const *source) override |
| Copy the data held on the example edge, source. The source edge must be castable to class EnergyEdge. More... | |
| void | store_active_energies (EnergyMap const &emap) |
| Store the energies held in the input emap on this edge; only those ScoreTypes which are active are stored. More... | |
| void | store_active_energies (EnergyMap const &emap, ScoreTypes const &subset) |
| Store the intersection of the energies held in the input emap on this edge: The intersection is between the set of active ScoreTypes and the ScoreTypes given in the input "subset" list. subset need not be sorted. More... | |
| EnergyMap | fill_energy_map () const |
| Load an energy map with the non-zero. More... | |
| void | add_to_energy_map (EnergyMap &emap) const |
| Add the non-zero elements into the energy map. More... | |
| void | add_to_energy_map (EnergyMap &emap, ScoreTypes const &subset) const |
| Add the non-zero elements into the energy map. More... | |
| Real | operator[] (ScoreType st) const |
| Read the value stored on this edge for a particular score type. More... | |
| Real | dot (EnergyMap const &weights) const |
| Compute the weighted energy for the components stored on this edge. More... | |
| Real | dot_abs (EnergyMap const &weights) const |
| Compute the weighted energy for the absolute value of the components stored on this edge. More... | |
| DistanceSquared | square_distance () const |
| void | square_distance (DistanceSquared dsqr) |
| void | mark_energies_computed () |
| set energies_computed_ to true for an edge More... | |
| void | mark_energies_uncomputed () |
| set energies_computed_ to false for an edge More... | |
| bool | energies_not_yet_computed () const |
| Size | count_static_memory () const override |
| virtual call to determine the static size of an Edge object dynamic memory use is counted through the recursive count_dynamic_memory() calling path More... | |
| Size | count_dynamic_memory () const override |
| virtual call to determine the amount of dynamic memory allocated by an edge; this function must recurse to the parent class to determine how much memory the parent class is responsible for. Do not account for the size of the ArrayPool array here; instead, that is accounted for in the EnergyGraph::count_dynamic_memory method. More... | |
Protected Member Functions | |
| EnergyGraph const * | get_energy_owner () const |
| Downcasts. More... | |
| EnergyGraph * | get_energy_owner () |
Private Attributes | |
| bool | energies_not_yet_computed_ |
| DistanceSquared | dsqr_ |
| utility::graph::ArrayPoolElement < Real > | array_ |
Class EnergyEdge holds scores for pair interactions for short-ranged energy functions. It also records whether or not it has been scored – when an edge is added to the graph, it sets "energies_computed_" as false, and the ScoreFunction class marks edges as having their energies computed once it computes them.
| typedef utility::graph::Edge core::scoring::EnergyEdge::parent |
| core::scoring::EnergyEdge::EnergyEdge | ( | EnergyGraph * | owner, |
| Size | n1, | ||
| Size | n2 | ||
| ) |
Energy edge ctor.
when first added to the graph, sets its enegies_not_yet_computed_ to true the responsibility of marking the energies as having been computed falls on class ScoringFunction
Referenced by count_static_memory().
| core::scoring::EnergyEdge::EnergyEdge | ( | EnergyGraph * | owner, |
| EnergyEdge const & | example_edge | ||
| ) |
References array_.
|
override |
virtual dstor; The EnergyEdge must free the array pool element it holds before it disappears.
References array_, core::scoring::EnergyGraph::deallocate_arraypoolelement(), and get_energy_owner().
|
inline |
Add the non-zero elements into the energy map.
References array_, and get_energy_owner().
Referenced by protocols::pose_metric_calculators::DecomposeAndReweightEnergiesCalculator::recompute(), and core::scoring::ScoreFunction::setup_for_minimizing_sr2b_enmeths_for_minedge().
|
inline |
Add the non-zero elements into the energy map.
References array_, and get_energy_owner().
|
override |
Copy the data held on the example edge, source. The source edge must be castable to class EnergyEdge.
copies data from EnergyEdge const * source;
called from the copy ctor and operator= methods defined in the Graph base class
References array_, dsqr_, and energies_not_yet_computed_.
|
override |
virtual call to determine the amount of dynamic memory allocated by an edge; this function must recurse to the parent class to determine how much memory the parent class is responsible for. Do not account for the size of the ArrayPool array here; instead, that is accounted for in the EnergyGraph::count_dynamic_memory method.
|
override |
virtual call to determine the static size of an Edge object dynamic memory use is counted through the recursive count_dynamic_memory() calling path
References EnergyEdge().
Compute the weighted energy for the components stored on this edge.
References array_, and get_energy_owner().
Referenced by protocols::enzdes::SecondaryMatchProtocol::add_enz_cst_interaction_to_pose(), protocols::enzdes::PackRotamersMoverPartGreedy::choose_n_best(), protocols::simple_filters::ResidueIEFilter::compute(), protocols::enzdes::EnzdesFlexibleRegion::extract_lig_designability_score(), and protocols::calc_taskop_filters::RotamerBoltzmannWeight::interface_interaction_energy().
Compute the weighted energy for the absolute value of the components stored on this edge.
References array_, and get_energy_owner().
|
inline |
References energies_not_yet_computed_.
|
inline |
Load an energy map with the non-zero.
Only load the non-zero terms – the zero entries are already
References array_, and get_energy_owner().
Referenced by core::simple_metrics::metrics::InteractionEnergyMetric::calculate(), and core::simple_metrics::per_residue_metrics::PerResidueClashMetric::calculate().
|
inlineprotected |
Downcasts.
Referenced by add_to_energy_map(), dot(), dot_abs(), fill_energy_map(), operator[](), store_active_energies(), and ~EnergyEdge().
|
inlineprotected |
| void core::scoring::EnergyEdge::mark_energies_computed | ( | ) |
set energies_computed_ to true for an edge
References energies_not_yet_computed_.
| void core::scoring::EnergyEdge::mark_energies_uncomputed | ( | ) |
set energies_computed_ to false for an edge
this function would allow edges to be marked as dirty without deleting it from the graph. Currently, edges are not marked as dirty; they are simply deleted (and if still needed) returned to the graph. If edge addition and deletion starts to show up as a hotspot, we will examine if simply marking edges as dirty is faster. For now, this function is not used.
References energies_not_yet_computed_.
Read the value stored on this edge for a particular score type.
The owner stores a map from score types to indices indicating score types not represented in the mapping with an index of -1.
References array_, get_energy_owner(), and core::scoring::EnergyGraph::score_type_2_active().
|
inline |
References dsqr_.
|
inline |
References dsqr_.
|
inline |
Store the energies held in the input emap on this edge; only those ScoreTypes which are active are stored.
Store only the active terms – active meaning with non-zero weight.
References array_, and get_energy_owner().
|
inline |
Store the intersection of the energies held in the input emap on this edge: The intersection is between the set of active ScoreTypes and the ScoreTypes given in the input "subset" list. subset need not be sorted.
Subset may specify ScoreTypes that are not active, but only the active ScoreTypes have their eneriges stored.
References array_, and get_energy_owner().
|
private |
Referenced by add_to_energy_map(), copy_from(), dot(), dot_abs(), EnergyEdge(), fill_energy_map(), operator[](), store_active_energies(), and ~EnergyEdge().
|
private |
Referenced by copy_from(), and square_distance().
|
private |
Referenced by copy_from(), energies_not_yet_computed(), mark_energies_computed(), and mark_energies_uncomputed().
1.8.7