Rosetta 3.4
Public Types | Public Member Functions | Protected Member Functions
core::scoring::EnergyEdge Class Reference

#include <EnergyGraph.hh>

Inheritance diagram for core::scoring::EnergyEdge:
Inheritance graph
[legend]
Collaboration diagram for core::scoring::EnergyEdge:
Collaboration graph
[legend]

List of all members.

Public Types

typedef graph::Edge parent
typedef scoring::EnergyMap EnergyMap

Public Member Functions

 EnergyEdge (EnergyGraph *owner, Size n1, Size n2)
 Energy edge ctor.
 EnergyEdge (EnergyGraph *owner, EnergyEdge const &example_edge)
virtual ~EnergyEdge ()
 virtual dstor; The EnergyEdge must free the array pool element it holds before it disappears.
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.
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.
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.
EnergyMap fill_energy_map () const
 Load an energy map with the non-zero.
void add_to_energy_map (EnergyMap &emap) const
 Add the non-zero elements into the energy map.
void add_to_energy_map (EnergyMap &emap, ScoreTypes const &subset) const
 Add the non-zero elements into the energy map.
Real operator[] (ScoreType st) const
 Read the value stored on this edge for a particular score type.
Real dot (EnergyMap const &weights) const
 Compute the weighted energy for the components stored on this edge.
DistanceSquared square_distance () const
void square_distance (DistanceSquared dsqr)
void mark_energies_computed ()
 set energies_computed_ to true for an edge
void mark_energies_uncomputed ()
 set energies_computed_ to false for an edge
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
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.

Protected Member Functions

EnergyGraph const * get_energy_owner () const
 Downcasts.
EnergyGraphget_energy_owner ()

Detailed Description

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.


Member Typedef Documentation


Constructor & Destructor Documentation

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 
)
core::scoring::EnergyEdge::~EnergyEdge ( ) [virtual]

virtual dstor; The EnergyEdge must free the array pool element it holds before it disappears.

References core::scoring::EnergyGraph::deallocate_arraypoolelement(), and get_energy_owner().


Member Function Documentation

void core::scoring::EnergyEdge::add_to_energy_map ( EnergyMap emap) const [inline]
void core::scoring::EnergyEdge::add_to_energy_map ( EnergyMap emap,
ScoreTypes const &  subset 
) const [inline]

Add the non-zero elements into the energy map.

References get_energy_owner().

void core::scoring::EnergyEdge::copy_from ( parent const *  source) [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.

References core::graph::ArrayPoolElement< T >::copy_array_contents().

Size core::scoring::EnergyEdge::count_dynamic_memory ( ) const [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.

References core::graph::Edge::count_dynamic_memory().

Size core::scoring::EnergyEdge::count_static_memory ( ) const [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.

References EnergyEdge().

Real core::scoring::EnergyEdge::dot ( EnergyMap const &  weights) const [inline]
bool core::scoring::EnergyEdge::energies_not_yet_computed ( ) const [inline]
EnergyMap core::scoring::EnergyEdge::fill_energy_map ( ) const [inline]
EnergyGraph const * core::scoring::EnergyEdge::get_energy_owner ( ) const [inline, protected]
EnergyGraph * core::scoring::EnergyEdge::get_energy_owner ( ) [inline, protected]
void core::scoring::EnergyEdge::mark_energies_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.

Real core::scoring::EnergyEdge::operator[] ( ScoreType  st) const [inline]

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 get_energy_owner(), and core::scoring::EnergyGraph::score_type_2_active().

void core::scoring::EnergyEdge::square_distance ( DistanceSquared  dsqr) [inline]
DistanceSquared core::scoring::EnergyEdge::square_distance ( ) const [inline]
void core::scoring::EnergyEdge::store_active_energies ( EnergyMap const &  emap) [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 get_energy_owner().

Referenced by core::scoring::symmetry::SymmetricScoreFunction::eval_twobody_neighbor_energies(), and core::scoring::ScoreFunction::eval_twobody_neighbor_energies().

void core::scoring::EnergyEdge::store_active_energies ( EnergyMap const &  emap,
ScoreTypes const &  subset 
) [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 get_energy_owner().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines