prf::Energy Class Reference
[Energy Classes]

Energy base class. More...

#include <Energy.hh>

Inherits prf::Observable.

Inherited by prf::Bias, prf::ExVol, prf::HBMM, prf::HBMS, prf::Hydrophobicity, and prf::LocExVol.

Inheritance diagram for prf::Energy:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual void Connect (Population *pl)
 Connect the energy term with one population.
void refresh (int curT)
 Over-rides the virtual member from the Observable class.
double value ()
 return result from last calculation
virtual double evaluate ()
 do a new ab initio calculation
virtual double deltaE (Update *)
 Calculate change in energy for a given update.
virtual double deltaEwithlimit (Update *, double)
 Like deltaE, but stop if change exceeds a given limit.
virtual void Accept (Update *)
 Accept a proposed update.
virtual void Revert (Update *)
 Reject a proposed update.
virtual void rangeEstimate (double &x1, double &x2)
 Estimate a range in which values of this observable are expected.

Detailed Description

The Energy base class declares an interface for different energy terms which can be used, for instance, to decide whether a certain update is to be accepted. All energy terms in the model are implemented as derived classes of this class.


Member Function Documentation

void prf::Energy::Accept ( Update  )  [virtual]

PROFASI uses many local contribution matrices and backup variables to quickly evaluate the change caused to any energy term by a given update. Those backup variables and the contribution matrices need to be kept in sync with the current system configuration. So, each energy class has an accept and a reject method, which are called when an update is accepted or rejected. What is done inside these functions depends on the energy term and optimization trick used therein.

Reimplemented in prf::Bias, prf::ExVol, prf::HBMM, prf::HBMS, prf::Hydrophobicity, and prf::LocExVol.

void prf::Energy::rangeEstimate ( double &  x1,
double &  x2 
) [virtual]

The default is between 0 and 1. So, for observables with values always between 0 and 1, you need not over-write this virtual function. Sometimes the observable will have a different fixed range, determined by its definition. Sometimes the range can not be determined perfectly. In such a case, let this function just return something reasonable.

Reimplemented from prf::Observable.

Reimplemented in prf::Bias, prf::ExVol, prf::HBMM, prf::HBMS, prf::Hydrophobicity, and prf::LocExVol.


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

PROFASI: Protein Folding and Aggregation Simulator, Version 1.1
© (2005-2008) Anders Irbäck and Sandipan Mohanty
Documentation generated on 10 Oct 2008 using Doxygen version 1.5.0