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

A vector for storing energy data, initially all values are 0. More...

#include <EnergyMap.hh>

Collaboration diagram for core::scoring::EMapVector:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Real const * const_iterator
typedef Realiterator

Public Member Functions

 EMapVector ()
 default constructor, initializes the energies to 0
 EMapVector (EMapVector const &src)
EMapVector const & operator= (EMapVector const &rhs)
const_iterator begin () const
 const-iterator to the begining of the vector of energies
const_iterator end () const
 const-iterator to the end of the vector of energies
iterator begin ()
 non-const-iterator to the begining of the vector of energies
iterator end ()
 non-const-iterator to the end of the vector of energies
Real get (ScoreType st)
 Returns the value for ScoreType <st>
Real set (ScoreType st, Real val)
 Sets the value for ScoreType <st> to <val>
Realoperator[] (ScoreType st)
 [] operator for getting a non-const reference to the energy for a ScoreType
Real operator[] (ScoreType st) const
 [] operator for getting the value for a ScoreType
void zero (ScoreTypes const &l)
 Zero a subset of the positions, as in calibrating a scale.
void zero ()
 Set every value to zero.
void clear ()
 Set every value to zero.
Real dot (EMapVector const &src) const
 Returns the dot product of this object with EMapVector <src>
Real dot (EMapVector const &src, ScoreTypes const &l) const
 dot product of two EMapVectors over a subset of the score types
void operator+= (EMapVector const &src)
 += operator, for summing energies
void operator-= (EMapVector const &src)
 -= operator, for subtracting energies
void operator*= (Real scalar)
 *= operator, for performing multiplication of a vector by a scalar
void operator*= (EMapVector const &src)
 *= operator, for performing element-by-element multiplication of two vectors
EMapVector operator* (Real scalar)
 * operator, for performing multiplication of a vector by a scalar
EMapVector operator* (EMapVector const &src)
 * operator, for performing element-by-element multiplication of two vectors
bool operator== (EMapVector const &src) const
 == operator for comparing two energy maps element by element
bool operator!= (EMapVector const &src) const
 != operator for comparing two energy maps element by element
void print () const
 print the contents of an emap vector to standard out
void accumulate (EMapVector const &src, ScoreTypes const &l)
 accumulate a subset of the positions
void accumulate (EMapVector const &src, ScoreTypes const &l, Real const wt)
 accumulate a subset of the positions with a common weight factor
Real sum ()
 Returns the sum of this vector.
Real norm_squared (ScoreTypes const &l)
 accumulate the squared values of a subset of the positions
void show_nonzero (std::ostream &out) const
 Prints the non-zero positions of the energy map.
std::string show_nonzero () const
 convert the non-zero positions of the energy map to a string
void show_if_nonzero_weight (std::ostream &out, EMapVector const &weights) const
 write the energies in this energy map to the output stream for those score types that have non-zero values in the "weights" energy map.
void show_weighted (std::ostream &out, EMapVector const &weights) const
 write the weighted energies in this energy map to the output stream for those score types that have non-zero values in the "weights" energy map.
std::string weighted_string_of (EMapVector const &weights) const
 convert the weighted energies in this energy map to a string for those score types that have non-zero values in the "weights" energy map.

Detailed Description

A vector for storing energy data, initially all values are 0.

Note:
: several methods using EMapVector objects add in values, be sure to use the zero method between uses

Common Methods: EMapVector.zero


Member Typedef Documentation


Constructor & Destructor Documentation

core::scoring::EMapVector::EMapVector ( ) [inline]

default constructor, initializes the energies to 0

References clear().

core::scoring::EMapVector::EMapVector ( EMapVector const &  src) [inline]

Member Function Documentation

void core::scoring::EMapVector::accumulate ( EMapVector const &  src,
ScoreTypes const &  l 
) [inline]
void core::scoring::EMapVector::accumulate ( EMapVector const &  src,
ScoreTypes const &  l,
Real const  wt 
) [inline]

accumulate a subset of the positions with a common weight factor

References operator[]().

iterator core::scoring::EMapVector::begin ( ) [inline]

non-const-iterator to the begining of the vector of energies

const_iterator core::scoring::EMapVector::begin ( ) const [inline]
void core::scoring::EMapVector::clear ( ) [inline]
Real core::scoring::EMapVector::dot ( EMapVector const &  src) const [inline]

Returns the dot product of this object with EMapVector <src>

Note:
: useful for multiplying weights with scores

example(s): we = scorefxn.weights() emap.dot(we) See also: EMapVector ScoreFunction ScoreFunction.weights create_score_function

References core::scoring::n_score_types.

Referenced by protocols::flexpack::rotamer_set::FlexbbRotamerSet::bump_check(), core::pack::rotamer_set::RotamerSet_::bump_check(), core::pack::compare_mingraph_and_energy_graph(), core::pack::compare_simple_inteaction_graph_alt_state_and_energy_graph(), core::pack::interaction_graph::SimpleEdge::compute_energy(), core::pack::rotamer_set::symmetry::SymmetricRotamerSet_::compute_one_body_energies(), core::pack::rotamer_set::RotamerSet_::compute_one_body_energies(), core::pack::interaction_graph::OnTheFlyNode::compute_rotamer_pair_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(), protocols::match::downstream::ScoringSecMatchRPE::eval_cd_2b_residues(), core::scoring::methods::TwoBodyEnergy::evaluate_rotamer_background_energies(), core::scoring::methods::ShortRangeTwoBodyEnergy::evaluate_rotamer_background_energies(), core::scoring::methods::PairEnergy::evaluate_rotamer_background_energies(), core::scoring::methods::LK_BallEnergy::evaluate_rotamer_background_energies(), core::scoring::methods::TwoBodyEnergy::evaluate_rotamer_intrares_energies(), core::scoring::methods::TwoBodyEnergy::evaluate_rotamer_pair_energies(), core::scoring::methods::ShortRangeTwoBodyEnergy::evaluate_rotamer_pair_energies(), core::scoring::methods::LK_BallEnergy::evaluate_rotamer_pair_energies(), core::pack::rotamer_set::RotamerSets::get_bb_bbE(), core::pack::rotamer_set::RotamerSets::get_sc_bbE(), core::scoring::ScoreFunction::get_sub_score(), core::scoring::symmetry::SymmetricScoreFunction::operator()(), core::scoring::ScoreFunction::operator()(), core::scoring::DockingScoreFunction::operator()(), core::pose::metrics::simple_calculators::InterfaceDeltaEnergeticsCalculator::recompute(), core::scoring::methods::UnfoldedStateEnergy::residue_energy(), protocols::toolbox::pose_metric_calculators::SemiExplicitWaterUnsatisfiedPolarsCalculator::semiexpl_water_hbgeom_score(), protocols::toolbox::pose_metric_calculators::EnergiesData::weighted_total(), and protocols::toolbox::pose_metric_calculators::EnergiesData::weighted_total_no_master().

Real core::scoring::EMapVector::dot ( EMapVector const &  src,
ScoreTypes const &  l 
) const [inline]

dot product of two EMapVectors over a subset of the score types

References operator[]().

iterator core::scoring::EMapVector::end ( ) [inline]

non-const-iterator to the end of the vector of energies

References core::scoring::n_score_types.

const_iterator core::scoring::EMapVector::end ( ) const [inline]

const-iterator to the end of the vector of energies

References core::scoring::n_score_types.

Referenced by protocols::moves::MCShowMover::apply(), core::scoring::operator<<(), and core::scoring::Energies::show().

Real core::scoring::EMapVector::get ( ScoreType  st) [inline]

Returns the value for ScoreType <st>

example(s): emap.get(fa_sol) See also: EMapVector EMapVector.set ScoreFunction create_score_function

Referenced by core::scoring::DockingScoreFunction::operator()(), and core::scoring::ScoreFunction::reset_energy_methods().

Real core::scoring::EMapVector::norm_squared ( ScoreTypes const &  l) [inline]

accumulate the squared values of a subset of the positions

bool core::scoring::EMapVector::operator!= ( EMapVector const &  src) const [inline]

!= operator for comparing two energy maps element by element

References core::scoring::n_score_types.

EMapVector core::scoring::EMapVector::operator* ( Real  scalar) [inline]

* operator, for performing multiplication of a vector by a scalar

EMapVector core::scoring::EMapVector::operator* ( EMapVector const &  src) [inline]

* operator, for performing element-by-element multiplication of two vectors

void core::scoring::EMapVector::operator*= ( Real  scalar) [inline]

*= operator, for performing multiplication of a vector by a scalar

References core::scoring::n_score_types.

void core::scoring::EMapVector::operator*= ( EMapVector const &  src) [inline]

*= operator, for performing element-by-element multiplication of two vectors

References core::scoring::n_score_types.

void core::scoring::EMapVector::operator+= ( EMapVector const &  src) [inline]

+= operator, for summing energies

References core::scoring::n_score_types.

void core::scoring::EMapVector::operator-= ( EMapVector const &  src) [inline]

-= operator, for subtracting energies

References core::scoring::n_score_types.

EMapVector const& core::scoring::EMapVector::operator= ( EMapVector const &  rhs) [inline]
bool core::scoring::EMapVector::operator== ( EMapVector const &  src) const [inline]

== operator for comparing two energy maps element by element

References core::scoring::n_score_types.

Real& core::scoring::EMapVector::operator[] ( ScoreType  st) [inline]

[] operator for getting a non-const reference to the energy for a ScoreType

References core::scoring::n_score_types.

Referenced by accumulate(), dot(), and zero().

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

[] operator for getting the value for a ScoreType

References core::scoring::n_score_types.

void core::scoring::EMapVector::print ( ) const

print the contents of an emap vector to standard out

References core::scoring::n_score_types, and core::scoring::name_from_score_type().

Real core::scoring::EMapVector::set ( ScoreType  st,
Real  val 
) [inline]

Sets the value for ScoreType <st> to <val>

example(s): emap.set(fa_sol,13.37) See also: EMapVector EMapVector.get ScoreFunction create_score_function

void core::scoring::EMapVector::show_if_nonzero_weight ( std::ostream &  out,
EMapVector const &  weights 
) const

write the energies in this energy map to the output stream for those score types that have non-zero values in the "weights" energy map.

References core::scoring::n_score_types.

Referenced by protocols::moves::MonteCarlo::boltzmann(), core::pack::compare_mingraph_and_energy_graph(), core::pack::compare_simple_inteaction_graph_alt_state_and_energy_graph(), and protocols::moves::MonteCarlo::score_function().

std::string core::scoring::EMapVector::show_nonzero ( ) const [inline]

convert the non-zero positions of the energy map to a string

void core::scoring::EMapVector::show_nonzero ( std::ostream &  out) const [inline]
void core::scoring::EMapVector::show_weighted ( std::ostream &  out,
EMapVector const &  weights 
) const

write the weighted energies in this energy map to the output stream for those score types that have non-zero values in the "weights" energy map.

References core::scoring::n_score_types.

Referenced by protocols::flexpack::FlexPacker::apply(), core::optimization::symmetry::SymAtomTreeMultifunc::dump(), core::optimization::CartesianMultifunc::dump(), core::optimization::AtomTreeMultifunc::dump(), core::pack::min_pack(), and weighted_string_of().

Real core::scoring::EMapVector::sum ( ) [inline]

Returns the sum of this vector.

example(s): emap.sum() See also: EMapVector EMapVector.get EMapVector.set ScoreFunction create_score_function

References core::scoring::n_score_types.

Referenced by protocols::simple_filters::ScoreCutoffFilter::get_score(), and protocols::simple_filters::ScoreCutoffFilter::report().

std::string core::scoring::EMapVector::weighted_string_of ( EMapVector const &  weights) const
void core::scoring::EMapVector::zero ( ScoreTypes const &  l) [inline]
void core::scoring::EMapVector::zero ( ) [inline]

Set every value to zero.

example(s): emap.zero() See also: EMapVector EMapVector.get EMapVector.set ScoreFunction create_score_function

References clear().


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