PROFASI  Version 1.5
Public Member Functions | List of all members
prf::PeriodicObs Class Reference

Minimize another Observable with respect to the periodoc box. More...

#include <PeriodicObs.hh>

Inheritance diagram for prf::PeriodicObs:
Inheritance graph

Public Member Functions

int init_obs ()
 All observables must implement one initialize routine.
void set_mesh_size (int i1)
 attach to two atoms given by their unique ids.
double evaluate ()
 Actual calculation of the value of the observable.
void rangeEstimate (double &xmin, double &xmax)
 Estimate a range in which values of this observable are expected.
- Public Member Functions inherited from prf::Observable
void set (std::string cmd)
 Give the object an instruction to process during initialization.
virtual void refresh ()
 Necessary before an observable value is used.
virtual double delta (Update *u)
 Quick estimate of the change in an Observable due to an update.
double operator() ()
 Retrieve the value of the observable.
double Value ()
 Retrieve the value of the observable.
void disable_stats ()
 Stop collecting statistical data like averages and histograms.
void enable_stats ()
 Start collecting statistical data like averages and histograms.
- Public Member Functions inherited from prf::Named
 Named ()
 Create an object with name "unnamed".
 Named (const char *st)
 Create an object with name st given as a C string.
 Named (std::string st)
 Create an object with a name given as a string.
std::string Name () const
 Retrive the name of an object.
void Name (std::string gnm)
 Assign a new name to an object.

Detailed Description

Measurements such as the radius of gyration present a problem for for multi-chain systems. If there are two chains touching each other they might end up near opposite walls of the periodic box. Their centre of mass would be at the centre of the box, so translating to the centre of mass would not change anything. The system would appear have a very large radius of gyration although as far as the force field goes, it is a very compact system. Sometimes, one wants to move the periodic box a bit, so that the chains appear at the middle of the box, and radius of gyration evaluates to a small value. This is the purpose of this class.

In this preliminary version, there is no smart algorithm to do this. This class works by searching. It moves the periodic box around on a mesh, and tries to find the position that minimizes something. This something has to be another Observable, known to this class through a pointer.

It is worth noting that since this class works with a search, it should be avoided during a simulation, and used only to extract information during a post-run analysis. So, it should be added to the settings file only for the extract_props program.

Member Function Documentation

int prf::PeriodicObs::init_obs ( )

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::PeriodicObs::rangeEstimate ( double &  x1,
double &  x2 

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.5
© (2005-2016) Anders Irbäck and Sandipan Mohanty
Documentation generated on Mon Jul 18 2016 using Doxygen version 1.8.2