Generated on Tue Dec 16 13:34:50 2008 for ell-3.0.0 by doxygen 1.5.1

ell::LT_MinimaSet Class Reference

#include <LT_MinimaSet.hh>

Inheritance diagram for ell::LT_MinimaSet:

Inheritance graph
[legend]

Detailed Description

This class represents ONLY the set of minima of an energy landscape.

Adjacency information between them that is submitted to an object of this class is ignored.

Definition at line 20 of file LT_MinimaSet.hh.

Public Types

typedef std::map< int, size_t > Int2SizeT_MAP

Public Member Functions

virtual const size_t addMin (const State *const m)
virtual bool addSaddle (const State *const m_i, const State *const m_j, const State *const s)
virtual bool addSaddle (const size_t i, const size_t j, const State *const s)
virtual void clear ()
virtual const std::vector<
const State * > & 
getAllMin () const
virtual double getDistance (const LandscapeTopology *const lt) const
virtual const State *const getMFEState () const
virtual const State *const getMin (size_t i) const
virtual const size_t getMinCount () const
virtual const size_t getMinIndex (const State *const m) const
virtual bool isSorted () const
 LT_MinimaSet (const LT_MinimaSet &toCopy)
 LT_MinimaSet ()
virtual LT_MinimaSetoperator= (const LT_MinimaSet &toCopy)
virtual std::pair< int, std::string > read (std::istream &in, const State *const templateState)
virtual void sort ()
virtual void write (std::ostream &out, const bool writeGraph=false) const
virtual ~LT_MinimaSet ()

Static Public Member Functions

static std::pair< int, std::string > parseBarrier (LandscapeTopology &toFill, const std::string &line, const State *const templateState, const Int2SizeT_MAP &idx2min)
static std::pair< int, std::string > parseHeader (const std::string &line, std::string &LT_ID, size_t &minNumber, std::string &StateDescription)
static std::pair< int, std::string > parseMinimum (LandscapeTopology &toFill, const std::string &line, const State *const templateState, Int2SizeT_MAP &idx2min)
static std::pair< int, std::string > parseSaddle (LandscapeTopology &toFill, const std::string &line, const State *const templateState, const Int2SizeT_MAP &idx2min)
static void writeBarrier (std::ostream &out, const State *const barrier, const size_t index, const std::vector< size_t > &minConnected)
static void writeHeader (std::ostream &out, const std::string &LT_ID, const size_t minNumber, const std::string &StateDescription)
static void writeMinimum (std::ostream &out, const std::vector< const State * > &minima, const size_t index)
static void writeMinimum (std::ostream &out, const State *const minimum, const size_t index)
static void writeSaddle (std::ostream &out, const State *const saddle, const size_t index, const std::vector< size_t > &minConnected)

Static Public Attributes

static const double AVOGADRO_CONSTANT_NA
static const double BOLTZMANN_CONSTANT_KB
static double BOLTZMANN_KT
static const double GAS_CONSTANT_R
static const size_t INVALID_INDEX
static const std::string LT_ID
static double MISSING_MINIMUM_PENALTY

Static Protected Member Functions

static double getSortedMinimaDistance (const std::vector< const State * > &m1, const std::vector< const State * > &m2)
static std::pair< State *,
std::string > 
parseConnection (const std::string &line, const State *const templateState, const Int2SizeT_MAP &idx2min, const std::string &connectionKey, std::vector< size_t > &connectedMinima)
static void writeConnection (std::ostream &out, const State *const connectionState, const size_t index, const std::vector< size_t > &minConnected, const std::string &connectionKey)

Protected Attributes

size_t mfeIndex
bool sorted
std::vector< const State * > vMinima

Static Protected Attributes

static const std::string OUTPUT_KEY_BARRIER
static const std::string OUTPUT_KEY_ELL_HEAD
static const std::string OUTPUT_KEY_MINIMUM
static const std::string OUTPUT_KEY_SADDLE


Member Typedef Documentation

typedef std::map< int, size_t > ell::LandscapeTopology::Int2SizeT_MAP [inherited]

Definition at line 30 of file LandscapeTopology.hh.


Constructor & Destructor Documentation

ell::LT_MinimaSet::LT_MinimaSet (  ) 

Constructs an empty minima set.

Definition at line 17 of file LT_MinimaSet.cc.

ell::LT_MinimaSet::LT_MinimaSet ( const LT_MinimaSet toCopy  ) 

Copy construction.

Definition at line 22 of file LT_MinimaSet.cc.

ell::LT_MinimaSet::~LT_MinimaSet (  )  [virtual]

Destruction.

Definition at line 61 of file LT_MinimaSet.cc.


Member Function Documentation

const size_t ell::LT_MinimaSet::addMin ( const State *const  m  )  [virtual]

Adds an UNKNOWN minimum to the topology. NOTE : this operation should NOT change the indices of already existing minima in the topology ! FURTHER : the minimum is not checked if it is already known

Parameters:
m the first minimum to add
Returns:
the index of the minimum in the landscape

Implements ell::LandscapeTopology.

Reimplemented in ell::LT_BarrierTree.

Definition at line 78 of file LT_MinimaSet.cc.

bool ell::LT_MinimaSet::addSaddle ( const State *const  m_i,
const State *const  m_j,
const State *const  s 
) [virtual]

Sets a saddle point that connects two minima

Parameters:
m_i the first minimum to connect
m_j the second minimum to connect
s the State representating the saddle point
Returns:
whether or not the data structure has been changed

Implements ell::LandscapeTopology.

Reimplemented in ell::LT_BarrierTree.

Definition at line 72 of file LT_MinimaSet.cc.

bool ell::LT_MinimaSet::addSaddle ( const size_t  i,
const size_t  j,
const State *const  s 
) [virtual]

Sets a saddle point that connects two minima

Parameters:
i index of the first minimum to connect
j index of the second minimum to connect
s the State representating the saddle point
Returns:
whether or not the data structure has been changed

Implements ell::LandscapeTopology.

Reimplemented in ell::LT_BarrierTree.

Definition at line 66 of file LT_MinimaSet.cc.

void ell::LT_MinimaSet::clear (  )  [virtual]

Clears the data structure and removes all stored information to be filled again afterwards.

Implements ell::LandscapeTopology.

Reimplemented in ell::LT_BarrierTree.

Definition at line 53 of file LT_MinimaSet.cc.

const std::vector< const State * > & ell::LT_MinimaSet::getAllMin (  )  const [virtual]

Access to all minima.

Returns:
a vector representation of all minima

Definition at line 137 of file LT_MinimaSet.cc.

double ell::LT_MinimaSet::getDistance ( const LandscapeTopology *const  lt  )  const [virtual]

Calculates the relative 'distance' between landscape topologies. On the LandscapeTopology level it is done on the minima only. For each minimum m present in only one of the two LTs a value of MISSING_MINIMUM_PENALTY*(e^(-energy(m)/BOLTZMANN_KT)) is summed. The resulting sum is normalized by the number of (unique) minima in both topologies.

Parameters:
lt the landscape topology to calculate the distance to
Returns:
the distance

Reimplemented from ell::LandscapeTopology.

Reimplemented in ell::LT_BarrierTree.

Definition at line 153 of file LT_MinimaSet.cc.

const State *const ell::LT_MinimaSet::getMFEState (  )  const [virtual]

Access to the global minimum of the landscape with minimal free energy (mfe).

Returns:
the minimum with smallest energy (and smallest string representation for tiebreaking)

Implements ell::LandscapeTopology.

Definition at line 131 of file LT_MinimaSet.cc.

const State *const ell::LT_MinimaSet::getMin ( size_t  i  )  const [virtual]

Access to a minimum.

Parameters:
i index of the minimum to access
Returns:
the State with the specified minimum index

Implements ell::LandscapeTopology.

Definition at line 106 of file LT_MinimaSet.cc.

const size_t ell::LT_MinimaSet::getMinCount (  )  const [virtual]

Access to the number of stored minima.

Returns:
the number of minima

Implements ell::LandscapeTopology.

Definition at line 125 of file LT_MinimaSet.cc.

const size_t ell::LT_MinimaSet::getMinIndex ( const State *const  m  )  const [virtual]

Access to the minimum index.

Parameters:
m the minimum of that the index should be accessed
Returns:
the index of the minimum, or INVALID_INDEX if 'm' is no known minimum

Implements ell::LandscapeTopology.

Definition at line 114 of file LT_MinimaSet.cc.

double ell::LandscapeTopology::getSortedMinimaDistance ( const std::vector< const State * > &  m1,
const std::vector< const State * > &  m2 
) [static, protected, inherited]

Definition at line 121 of file LandscapeTopology.cc.

bool ell::LT_MinimaSet::isSorted (  )  const [virtual]

Check if the minima of the landscape are sorted ascendingly by their energy (mfe minimum gets index 0). If energy is equal they are sorted by their string representation.

Implements ell::LandscapeTopology.

Definition at line 213 of file LT_MinimaSet.cc.

LT_MinimaSet & ell::LT_MinimaSet::operator= ( const LT_MinimaSet toCopy  )  [virtual]

Assignment operator.

Parameters:
toCopy the minima set this object should be a copy of
Returns:
access to the changed this object

Reimplemented in ell::LT_BarrierTree.

Definition at line 31 of file LT_MinimaSet.cc.

std::pair< int, std::string > ell::LandscapeTopology::parseBarrier ( LandscapeTopology toFill,
const std::string &  line,
const State *const  templateState,
const Int2SizeT_MAP idx2min 
) [static, inherited]

Parses a barrier string encoding produced by 'writeBarrier' method and adds the encoded BARRIER as a SADDLE to the topology given.

Parameters:
toFill the landscape topology to add the barrier to
line the string that encodes the barrier (encoding follows 'write' method)
templateState the State template to create new State objects via its 'fromString' function
idx2min the mapping of minima indices in the string to the indices in the given landscape topology 'toFill'
Returns:
an error encoding and an error string : 0 = no error occured, read was successfull -3 = read error (see error string)

Definition at line 458 of file LandscapeTopology.cc.

std::pair< State *, std::string > ell::LandscapeTopology::parseConnection ( const std::string &  line,
const State *const  templateState,
const Int2SizeT_MAP idx2min,
const std::string &  connectionKey,
std::vector< size_t > &  connectedMinima 
) [static, protected, inherited]

Parses a string encoding of a minima connection of a topology produced by 'writeBarrier' method and returns the connection state and the list of minima connected.

Parameters:
line the string that encodes the connection (encoding follows 'write' method)
templateState the State template to create new State objects via its 'fromString' function
idx2min the mapping of minima indices in the string to the indices in the given landscape topology 'toFill'
connectionKey the key used to encode the connection
connectedMinima OUTPUT parameter where the indices of the connected minima of the parsed connection are stored to
Returns:
a the parsed connection State and an error string if an error occured and the State is NULL

Definition at line 533 of file LandscapeTopology.cc.

std::pair< int, std::string > ell::LandscapeTopology::parseHeader ( const std::string &  line,
std::string &  LT_ID,
size_t &  minNumber,
std::string &  StateDescription 
) [static, inherited]

Parses the descriptive header of a landscape topology produced by 'writeHeader' method.

Parameters:
line the string that encodes the header information (encoding follows 'write' method)
LT_ID the ID string of the topology in stream
minNumber the number of minima the topology in stream holds, if minima are grouped in the topology the number of groups is given.
StateDescription a string description of the State model represented by the topology in the stream
Returns:
an error encoding and an error string : 0 = no error occured, read was successfull, the string contains the remaining line content, -3 = read error (see error string)

Definition at line 204 of file LandscapeTopology.cc.

std::pair< int, std::string > ell::LandscapeTopology::parseMinimum ( LandscapeTopology toFill,
const std::string &  line,
const State *const  templateState,
Int2SizeT_MAP idx2min 
) [static, inherited]

Parses a minimum string encoding produced by 'writeMinimum' method and adds the encoded minimum state to the given topology. Furthermore, it returns the remaining line content that can contain further minima that were merged with the first (already added) 'main' minimum. Thus a further parsing can be done later if necessary.

Parameters:
toFill the barrier tree to add the barrier to
line the string that encodes the minimum (encoding follows 'write' method)
templateState the State template to create new State objects via its 'fromString' function
idx2min the mapping of minima indices in the string to the indices in the given landscape topology 'toFill'
Returns:
an error encoding and an error string : 0 = no error occured, read was successfull, the string contains the remaining line content, -3 = read error (see error string)

Definition at line 315 of file LandscapeTopology.cc.

std::pair< int, std::string > ell::LandscapeTopology::parseSaddle ( LandscapeTopology toFill,
const std::string &  line,
const State *const  templateState,
const Int2SizeT_MAP idx2min 
) [static, inherited]

Parses a saddle string encoding produced by 'writeBarrier' method and adds the encoded direct saddle to the topology given.

Parameters:
toFill the landscape topology to add the saddle to
line the string that encodes the saddle (encoding follows 'write' method)
templateState the State template to create new State objects via its 'fromString' function
idx2min the mapping of minima indices in the string to the indices in the given landscape topology 'toFill'
Returns:
an error encoding and an error string : 0 = no error occured, read was successfull -3 = read error (see error string)

Definition at line 494 of file LandscapeTopology.cc.

std::pair< int, std::string > ell::LT_MinimaSet::read ( std::istream &  in,
const State *const  templateState 
) [virtual]

Fills the landscape topology from stream.

Parameters:
in the input stream to read from.
templateState the State template to create new State objects via its 'fromString' function
Returns:
an error encoding and an error string : 0 = no error occured, read was successfull -1 = landscape topology type not supported -2 = state description differs from the given one -3 = other read errors

parse input stream

if graphViz data starts.. end the reading

Implements ell::LandscapeTopology.

Reimplemented in ell::LT_BarrierTree.

Definition at line 218 of file LT_MinimaSet.cc.

void ell::LT_MinimaSet::sort (  )  [virtual]

Sorts the minima ascending by their energy (mfe minimum gets index 0). If energy is equal they are sorted by their string representation.

Implements ell::LandscapeTopology.

Definition at line 200 of file LT_MinimaSet.cc.

void ell::LT_MinimaSet::write ( std::ostream &  out,
const bool  writeGraph = false 
) const [virtual]

Writes the current landscape topology to stream.

Parameters:
out the output stream to write to.
writeGraph whether or not the output should contain a graph representation of the topology in graphviz DOT format

step 1: save the datastructure for later reconstruction as comments in graphviz file

step 2: write the graph in DOT language

Implements ell::LandscapeTopology.

Reimplemented in ell::LT_BarrierTree.

Definition at line 336 of file LT_MinimaSet.cc.

void ell::LandscapeTopology::writeBarrier ( std::ostream &  out,
const State *const  barrier,
const size_t  index,
const std::vector< size_t > &  minConnected 
) [static, inherited]

Writes a barrier of a landscape topology to stream.

Parameters:
out the output stream to write to.
barrier the barrier to add
index the index of the barrier
minConnected the minima connected by the barrier

Definition at line 398 of file LandscapeTopology.cc.

void ell::LandscapeTopology::writeConnection ( std::ostream &  out,
const State *const  connectionState,
const size_t  index,
const std::vector< size_t > &  minConnected,
const std::string &  connectionKey 
) [static, protected, inherited]

Writes a minima connection of a landscape topology to stream.

Parameters:
out the output stream to write to.
connectionState the State representing the connection
index the index of the connection
minConnected the minima connected
connectionKey the key used to encode the connection

Definition at line 430 of file LandscapeTopology.cc.

void ell::LandscapeTopology::writeHeader ( std::ostream &  out,
const std::string &  LT_ID,
const size_t  minNumber,
const std::string &  StateDescription 
) [static, inherited]

Writes the descriptive header of a landscape topology to stream.

Parameters:
out the output stream to write to.
LT_ID the ID string of the topology to write
minNumber the number of minima the topology holds, if minima are grouped in the topology the number of groups has to be given.
StateDescription a string description of the State model represented by the topology

Definition at line 188 of file LandscapeTopology.cc.

void ell::LandscapeTopology::writeMinimum ( std::ostream &  out,
const std::vector< const State * > &  minima,
const size_t  index 
) [static, inherited]

Writes a group of minima of a landscape topology to stream. NOTE: The FIRST minimum is the only one read by the read function and thus the representative for the whole group!

Parameters:
out the output stream to write to.
minima the minima to add
index the index of the minimum

Definition at line 296 of file LandscapeTopology.cc.

void ell::LandscapeTopology::writeMinimum ( std::ostream &  out,
const State *const  minimum,
const size_t  index 
) [static, inherited]

Writes a minimum of a landscape topology to stream.

Parameters:
out the output stream to write to.
minimum the minimum to add
index the index of the minimum

Definition at line 280 of file LandscapeTopology.cc.

void ell::LandscapeTopology::writeSaddle ( std::ostream &  out,
const State *const  saddle,
const size_t  index,
const std::vector< size_t > &  minConnected 
) [static, inherited]

Writes a saddle of a landscape topology to stream.

Parameters:
out the output stream to write to.
saddle the saddle to write
index the index of the saddle
minConnected the minima connected by the saddle

Definition at line 414 of file LandscapeTopology.cc.


Field Documentation

const double ell::LandscapeTopology::AVOGADRO_CONSTANT_NA [static, inherited]

Avogadro constant N_A = 6.02214179 * 10^(23) unit : 1/mol

Definition at line 41 of file LandscapeTopology.hh.

const double ell::LandscapeTopology::BOLTZMANN_CONSTANT_KB [static, inherited]

Boltzmann constant K_b = R / N_A = 1.3806504 * 10^(-23) unit : Joule / Kelvin

Definition at line 47 of file LandscapeTopology.hh.

double ell::LandscapeTopology::BOLTZMANN_KT [static, inherited]

The kT value used to calculate the Boltzmann weight e^(-E/kT) of a state in the landscape with an energy of E. NOTE: Has to be set according to the used energy function !!!

Definition at line 54 of file LandscapeTopology.hh.

const double ell::LandscapeTopology::GAS_CONSTANT_R [static, inherited]

Gas constant R = 8.314472 unit : Joule / (Kelvin * mol)

Definition at line 44 of file LandscapeTopology.hh.

const size_t ell::LandscapeTopology::INVALID_INDEX [static, inherited]

Index value that is used to propagate the information about invalid indexing.

Definition at line 37 of file LandscapeTopology.hh.

const std::string ell::LT_MinimaSet::LT_ID [static]

the landscape topology id string used in the output header to identify a minima set

Reimplemented in ell::LT_BarrierTree.

Definition at line 34 of file LT_MinimaSet.hh.

size_t ell::LT_MinimaSet::mfeIndex [protected]

index of the global minimum (with minimal free energy)

Definition at line 26 of file LT_MinimaSet.hh.

The penalty used to score a missing minimum when comparing two landscape topologies using the 'getDistance' method. NOTE: Has to be set according to the used energy function and the weighting of missing minima in the distance score. If missing minima are of no relevance set this value to 0.0!

Definition at line 61 of file LandscapeTopology.hh.

const std::string ell::LandscapeTopology::OUTPUT_KEY_BARRIER [static, protected, inherited]

keyword used by the read and write method to identify information on a barrier

Definition at line 347 of file LandscapeTopology.hh.

const std::string ell::LandscapeTopology::OUTPUT_KEY_ELL_HEAD [static, protected, inherited]

keyword used by the read and write method to identify information on the landscape topology type etc.

Definition at line 341 of file LandscapeTopology.hh.

const std::string ell::LandscapeTopology::OUTPUT_KEY_MINIMUM [static, protected, inherited]

keyword used by the read and write method to identify information on a minimum

Definition at line 344 of file LandscapeTopology.hh.

const std::string ell::LandscapeTopology::OUTPUT_KEY_SADDLE [static, protected, inherited]

keyword used by the read and write method to identify information on a saddle point

Definition at line 350 of file LandscapeTopology.hh.

bool ell::LT_MinimaSet::sorted [protected]

internal flag that stores if vMinima is sorted or not

Definition at line 28 of file LT_MinimaSet.hh.

std::vector<const State*> ell::LT_MinimaSet::vMinima [mutable, protected]

the vector of all known minima

Definition at line 24 of file LT_MinimaSet.hh.


The documentation for this class was generated from the following files: