prf::AtomDistance Class Reference
[Measurements]

Distance between two designated atoms. More...

#include <AtomDistance.hh>

Inherits prf::Observable.

Inheritance diagram for prf::AtomDistance:

Inheritance graph
[legend]
List of all members.

Public Member Functions

int init_obs ()
 All observables must implement one initialize routine.
void set_atoms (int i1, int i2)
 attach to two atoms given by their unique ids.
void refresh (int curT)
 Necessary before an observable value is used.
void rangeEstimate (double &xmin, double &xmax)
 Estimate a range in which values of this observable are expected.

Detailed Description

A somewhat more general observable than the end-to-end distance. This could represent the end-to-end distance, if you just initialize it with the two end atoms of the relevant backbone. But end-to-end distance could just be more noisy in some situations, when there are loose unstructured loops at the ends of the chain. One might then want to use the distance between the structured end-points of the chain. This class allows one to use any two atoms for this distance. It knows nothing about atoms however, as it blindly takes the integer id of the atoms, and asks AtomCoordinates class to return the distance between those to ids. It is your responsibility to make sure that the two indices you pass make sense.


Member Function Documentation

int prf::AtomDistance::init_obs (  )  [virtual]

Even if it seems that one particular observable might need additional arguments during initialization, it is advantageous to have a uniform syntax for all of them. So, when additional arguments are needed, one should provide them in a separate function called before initialization, and then call init_obs without arguments. The name init_obs instead of a more natural "init" or "initialize" is because an Observable often inherits from other classes which represent its character more fundamentally. So, the names such as "init" are kept free for such base classes.

Reimplemented from prf::Observable.

void prf::AtomDistance::refresh ( int  curT  )  [virtual]

This is done because complex observables like RMSD are not evaluated at every step. A call to refresh() would make sure that the Observable has its most current value. The optional argument tindx was introduced in version 1.1 when management of histograms was relocated from ObsHandler class to the Observable class. The argument tells the Observable object about a "temperature index" which it can use to put the current data in the appropriate histogram block.

Reimplemented from prf::Observable.

void prf::AtomDistance::rangeEstimate ( double &  xmin,
double &  xmax 
) [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.


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