|
Rosetta 3.5
|
#include <EnergyGraph.hh>


Public Types | |
| typedef graph::Edge | parent |
| typedef scoring::EnergyMap | EnergyMap |
Public Types inherited from core::graph::Edge | |
| typedef EdgeListIterator | EdgeListIter |
Public Member Functions | |
| EnergyEdge (EnergyGraph *owner, Size n1, Size n2) | |
| Energy edge ctor. More... | |
| EnergyEdge (EnergyGraph *owner, EnergyEdge const &example_edge) | |
| virtual | ~EnergyEdge () |
| virtual dstor; The EnergyEdge must free the array pool element it holds before it disappears. More... | |
| virtual void | copy_from (parent const *source) |
| 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... | |
| 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 |
| virtual Size | count_static_memory () const |
| 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... | |
| virtual Size | count_dynamic_memory () const |
| 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... | |
Public Member Functions inherited from core::graph::Edge | |
| virtual | ~Edge () |
| destructor More... | |
| Edge (Graph *owner, platform::Size first_node_ind, platform::Size second_node_ind) | |
| Main edge constructor. This should only be invoked by create_new_edge, which itself is only called by add_edge. The ONLY way an edge should be added to a graph is through add_edge. NOTE: edges should be only be deleted by a call to the Graph's delete_edge method, and this method absolutely must be implemented by derived Graph classes. More... | |
| platform::Size | get_other_ind (platform::Size node_index) const |
| returns the index of the one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon. More... | |
| Node const * | get_other_node (platform::Size node_index) const |
| returns a const pointer to one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon. More... | |
| Node * | get_other_node (platform::Size node_index) |
| returns a non-const pointer to one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon. More... | |
| platform::Size | get_first_node_ind () const |
| returns the index of the lower node More... | |
| platform::Size | get_second_node_ind () const |
| returns the index of the upper node More... | |
| void | set_pos_in_owners_list (EdgeListIter edge_iterator) |
| called only by class Graph, this function gives the Edge the data it needs to later delete itself from its owner's edge list in constant time. More... | |
| bool | same_edge (platform::Size node1, platform::Size node2) const |
| Is this the same edge as another edge (node1,node2)? Note: this graph does not work for multi-graphs. Edges must be unique. More... | |
| bool | is_loop () const |
| Is this edge a loop? In Pseudographs, loop edges are incident twice on a single vertex. More... | |
Protected Member Functions | |
| EnergyGraph const * | get_energy_owner () const |
| Downcasts. More... | |
| EnergyGraph * | get_energy_owner () |
Protected Member Functions inherited from core::graph::Edge | |
| platform::Size | get_node_index (platform::Size index) const |
| get the node index for one of the two nodes this edge is incident upon uses c-style index-from-0. More... | |
| Node const * | get_node (platform::Size index) const |
| get a const * to one node that this edge is incident upon uses c-style index-from-0 for these two nodes More... | |
| Node * | get_node (platform::Size index) |
| get a non-const * to one node that this edge is incident upon uses c-style index-from-0 for these two nodes More... | |
| Graph const * | get_owner () const |
| get a const * to the owning graph More... | |
| Graph * | get_owner () |
| get a non-const * to the owning graph More... | |
Private Attributes | |
| bool | energies_not_yet_computed_ |
| DistanceSquared | dsqr_ |
| 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.
Definition at line 67 of file EnergyGraph.hh.
Definition at line 71 of file EnergyGraph.hh.
Definition at line 70 of file EnergyGraph.hh.
| 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
Definition at line 79 of file EnergyGraph.cc.
Referenced by count_static_memory().
| core::scoring::EnergyEdge::EnergyEdge | ( | EnergyGraph * | owner, |
| EnergyEdge const & | example_edge | ||
| ) |
Definition at line 90 of file EnergyGraph.cc.
References array_, and core::graph::ArrayPoolElement< T >::copy_array_contents().
|
virtual |
virtual dstor; The EnergyEdge must free the array pool element it holds before it disappears.
Definition at line 106 of file EnergyGraph.cc.
References array_, core::scoring::EnergyGraph::deallocate_arraypoolelement(), and get_energy_owner().
|
inline |
Add the non-zero elements into the energy map.
Definition at line 279 of file EnergyGraph.hh.
References array_, and get_energy_owner().
Referenced by protocols::toolbox::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.
Definition at line 290 of file EnergyGraph.hh.
References array_, and get_energy_owner().
|
virtual |
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
Reimplemented from core::graph::Edge.
Definition at line 114 of file EnergyGraph.cc.
References array_, core::graph::ArrayPoolElement< T >::copy_array_contents(), dsqr_, and energies_not_yet_computed_.
|
virtual |
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.
Reimplemented from core::graph::Edge.
Definition at line 151 of file EnergyGraph.cc.
References core::graph::Edge::count_dynamic_memory().
|
virtual |
virtual call to determine the static size of an Edge object dynamic memory use is counted through the recursive count_dynamic_memory() calling path
Reimplemented from core::graph::Edge.
Definition at line 141 of file EnergyGraph.cc.
References EnergyEdge().
Compute the weighted energy for the components stored on this edge.
Definition at line 320 of file EnergyGraph.hh.
References array_, and get_energy_owner().
Referenced by core::scoring::Energies::accumulate_residue_total_energy(), 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(), core::scoring::ScoreFunction::get_sub_score(), protocols::simple_filters::RotamerBoltzmannWeight::interface_interaction_energy(), and protocols::toolbox::pose_metric_calculators::NonlocalContactsCalculator::recompute().
|
inline |
Definition at line 114 of file EnergyGraph.hh.
References energies_not_yet_computed_.
Referenced by core::scoring::symmetry::SymmetricScoreFunction::eval_twobody_neighbor_energies(), and core::scoring::ScoreFunction::eval_twobody_neighbor_energies().
|
inline |
Load an energy map with the non-zero.
Only load the non-zero terms – the zero entries are already
Definition at line 266 of file EnergyGraph.hh.
References array_, and get_energy_owner().
Referenced by protocols::pack_daemon::PackDaemon::calculate_background_energies(), core::pack::compare_mingraph_and_energy_graph(), core::pack::compare_simple_inteaction_graph_alt_state_and_energy_graph(), protocols::simple_filters::ResidueSetChainEnergyFilter::compute(), core::scoring::ScoreFunction::get_sub_score(), and core::pose::metrics::simple_calculators::InterfaceDeltaEnergeticsCalculator::recompute().
|
inlineprotected |
Downcasts.
Definition at line 333 of file EnergyGraph.hh.
References core::graph::Edge::get_owner().
Referenced by add_to_energy_map(), dot(), fill_energy_map(), operator[](), store_active_energies(), and ~EnergyEdge().
|
inlineprotected |
Definition at line 339 of file EnergyGraph.hh.
References core::graph::Edge::get_owner().
| void core::scoring::EnergyEdge::mark_energies_computed | ( | ) |
set energies_computed_ to true for an edge
Definition at line 127 of file EnergyGraph.cc.
References energies_not_yet_computed_.
Referenced by core::scoring::symmetry::SymmetricScoreFunction::eval_twobody_neighbor_energies(), and core::scoring::ScoreFunction::eval_twobody_neighbor_energies().
| 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.
Definition at line 136 of file EnergyGraph.cc.
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.
Definition at line 308 of file EnergyGraph.hh.
References array_, get_energy_owner(), and core::scoring::EnergyGraph::score_type_2_active().
|
inline |
Definition at line 108 of file EnergyGraph.hh.
References dsqr_.
Referenced by core::scoring::EnvPairPotential::compute_centroid_environment(), core::scoring::SmoothEnvPairPotential::compute_centroid_environment(), core::scoring::SmoothEnvPairPotential::compute_dcentroid_environment(), protocols::scoring::Interface::protein_calculate(), and protocols::scoring::Interface::symmetric_protein_calculate().
|
inline |
Definition at line 109 of file EnergyGraph.hh.
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.
Definition at line 237 of file EnergyGraph.hh.
References array_, and get_energy_owner().
Referenced by core::scoring::symmetry::SymmetricScoreFunction::eval_twobody_neighbor_energies(), and core::scoring::ScoreFunction::eval_twobody_neighbor_energies().
|
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.
Definition at line 249 of file EnergyGraph.hh.
References array_, and get_energy_owner().
|
private |
Definition at line 134 of file EnergyGraph.hh.
Referenced by add_to_energy_map(), copy_from(), dot(), EnergyEdge(), fill_energy_map(), operator[](), store_active_energies(), and ~EnergyEdge().
|
private |
Definition at line 133 of file EnergyGraph.hh.
Referenced by copy_from(), and square_distance().
|
private |
Definition at line 132 of file EnergyGraph.hh.
Referenced by copy_from(), energies_not_yet_computed(), mark_energies_computed(), and mark_energies_uncomputed().
1.8.4