Public Member Functions | Private Attributes | List of all members
PLMD::BiasRepresentation Class Reference

this class implements a general purpose class that aims to provide a Grid/list transparently add gaussians to a bias More...

#include <BiasRepresentation.h>

Public Member Functions

 BiasRepresentation (const std::vector< Value *> &tmpvalues, Communicator &cc)
 create a bias representation from a list of pointer to values More...
 
 BiasRepresentation (const std::vector< Value *> &tmpvalues, Communicator &cc, const std::vector< double > &sigma)
 create a bias using explicit sigma in input (needed for histogram building) More...
 
 BiasRepresentation (const std::vector< Value *> &tmpvalues, Communicator &cc, const std::vector< std::string > &gmin, const std::vector< std::string > &gmax, const std::vector< unsigned > &nbin, bool doInt, double lowI_, double uppI_)
 create a bias containing a grid representation More...
 
 BiasRepresentation (const std::vector< Value *> &tmpvalues, Communicator &cc, const std::vector< std::string > &gmin, const std::vector< std::string > &gmax, const std::vector< unsigned > &nbin, const std::vector< double > &sigma)
 create a histogram with grid representation and sigmas in input More...
 
 ~BiasRepresentation ()
 destructor More...
 
unsigned getNumberOfDimensions ()
 retrieve the number of dimension of the representation More...
 
void addGrid (const std::vector< std::string > &gmin, const std::vector< std::string > &gmax, const std::vector< unsigned > &nbin)
 add the grid to the representation More...
 
void pushKernel (IFile *ff)
 push a kernel on the representation (includes widths and height) More...
 
void setRescaledToBias (bool rescaled)
 set the flag that rescales the free energy to the bias More...
 
const bool & isRescaledToBias ()
 check if the representation is rescaled to the bias More...
 
bool hasSigmaInInput ()
 check if the sigma values are already provided (in case of a histogram representation with input sigmas) More...
 
std::vector< std::string > getNames ()
 get the names of the variables More...
 
const std::vector< Value * > & getPtrToValues ()
 get the pointer to the values More...
 
int getNumberOfKernels ()
 get the number of kernels contained in the representation More...
 
const std::string & getName (unsigned i)
 get the name of the i-th value More...
 
ValuegetPtrToValue (unsigned i)
 get a pointer to a specific value More...
 
GridgetGridPtr ()
 get the pointer to the grid More...
 
KernelFunctionsreadFromPoint (IFile *ifile)
 get a new histogram point from a file More...
 
void getMinMaxBin (std::vector< double > &vmin, std::vector< double > &vmax, std::vector< unsigned > &vbin)
 get an automatic min/max from the set so to know how to configure the grid More...
 
void clear ()
 clear the representation (grid included) More...
 

Private Attributes

int ndim
 
bool hasgrid
 
bool rescaledToBias
 
bool doInt_
 
double lowI_
 
double uppI_
 
std::vector< Value * > values
 
std::vector< std::string > names
 
std::vector< KernelFunctions * > hills
 
std::vector< double > biasf
 
std::vector< double > histosigma
 
Communicatormycomm
 
GridBiasGrid_
 

Detailed Description

this class implements a general purpose class that aims to provide a Grid/list transparently add gaussians to a bias

Constructor & Destructor Documentation

◆ BiasRepresentation() [1/4]

PLMD::BiasRepresentation::BiasRepresentation ( const std::vector< Value *> &  tmpvalues,
Communicator cc 
)

create a bias representation from a list of pointer to values

the constructor here

◆ BiasRepresentation() [2/4]

PLMD::BiasRepresentation::BiasRepresentation ( const std::vector< Value *> &  tmpvalues,
Communicator cc,
const std::vector< double > &  sigma 
)

create a bias using explicit sigma in input (needed for histogram building)

overload the constructor: add the sigma at constructor time

◆ BiasRepresentation() [3/4]

PLMD::BiasRepresentation::BiasRepresentation ( const std::vector< Value *> &  tmpvalues,
Communicator cc,
const std::vector< std::string > &  gmin,
const std::vector< std::string > &  gmax,
const std::vector< unsigned > &  nbin,
bool  doInt,
double  lowI_,
double  uppI_ 
)

create a bias containing a grid representation

overload the constructor: add the grid at constructor time

◆ BiasRepresentation() [4/4]

PLMD::BiasRepresentation::BiasRepresentation ( const std::vector< Value *> &  tmpvalues,
Communicator cc,
const std::vector< std::string > &  gmin,
const std::vector< std::string > &  gmax,
const std::vector< unsigned > &  nbin,
const std::vector< double > &  sigma 
)

create a histogram with grid representation and sigmas in input

overload the constructor with some external sigmas: needed for histogram

◆ ~BiasRepresentation()

PLMD::BiasRepresentation::~BiasRepresentation ( )

destructor

Member Function Documentation

◆ addGrid()

void PLMD::BiasRepresentation::addGrid ( const std::vector< std::string > &  gmin,
const std::vector< std::string > &  gmax,
const std::vector< unsigned > &  nbin 
)

add the grid to the representation

◆ clear()

void PLMD::BiasRepresentation::clear ( )

clear the representation (grid included)

◆ getGridPtr()

Grid * PLMD::BiasRepresentation::getGridPtr ( )

get the pointer to the grid

◆ getMinMaxBin()

void PLMD::BiasRepresentation::getMinMaxBin ( std::vector< double > &  vmin,
std::vector< double > &  vmax,
std::vector< unsigned > &  vbin 
)

get an automatic min/max from the set so to know how to configure the grid

◆ getName()

const string & PLMD::BiasRepresentation::getName ( unsigned  i)

get the name of the i-th value

◆ getNames()

vector< string > PLMD::BiasRepresentation::getNames ( )

get the names of the variables

◆ getNumberOfDimensions()

unsigned PLMD::BiasRepresentation::getNumberOfDimensions ( )

retrieve the number of dimension of the representation

◆ getNumberOfKernels()

int PLMD::BiasRepresentation::getNumberOfKernels ( )

get the number of kernels contained in the representation

◆ getPtrToValue()

Value * PLMD::BiasRepresentation::getPtrToValue ( unsigned  i)

get a pointer to a specific value

◆ getPtrToValues()

const vector< Value * > & PLMD::BiasRepresentation::getPtrToValues ( )

get the pointer to the values

◆ hasSigmaInInput()

bool PLMD::BiasRepresentation::hasSigmaInInput ( )

check if the sigma values are already provided (in case of a histogram representation with input sigmas)

◆ isRescaledToBias()

const bool & PLMD::BiasRepresentation::isRescaledToBias ( )

check if the representation is rescaled to the bias

◆ pushKernel()

void PLMD::BiasRepresentation::pushKernel ( IFile ff)

push a kernel on the representation (includes widths and height)

◆ readFromPoint()

KernelFunctions * PLMD::BiasRepresentation::readFromPoint ( IFile ifile)

get a new histogram point from a file

◆ setRescaledToBias()

void PLMD::BiasRepresentation::setRescaledToBias ( bool  rescaled)

set the flag that rescales the free energy to the bias

Member Data Documentation

◆ biasf

std::vector<double> PLMD::BiasRepresentation::biasf
private

◆ BiasGrid_

Grid* PLMD::BiasRepresentation::BiasGrid_
private

◆ doInt_

bool PLMD::BiasRepresentation::doInt_
private

◆ hasgrid

bool PLMD::BiasRepresentation::hasgrid
private

◆ hills

std::vector<KernelFunctions*> PLMD::BiasRepresentation::hills
private

◆ histosigma

std::vector<double> PLMD::BiasRepresentation::histosigma
private

◆ lowI_

double PLMD::BiasRepresentation::lowI_
private

◆ mycomm

Communicator& PLMD::BiasRepresentation::mycomm
private

◆ names

std::vector<std::string> PLMD::BiasRepresentation::names
private

◆ ndim

int PLMD::BiasRepresentation::ndim
private

◆ rescaledToBias

bool PLMD::BiasRepresentation::rescaledToBias
private

◆ uppI_

double PLMD::BiasRepresentation::uppI_
private

◆ values

std::vector<Value*> PLMD::BiasRepresentation::values
private

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