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...
 
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 clear ()
 clear the representation (grid included) More...
 
GridgetGridPtr ()
 get the pointer to the grid 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...
 
const std::string & getName (unsigned i)
 get the name of the i-th value More...
 
std::vector< std::string > getNames ()
 get the names of the variables More...
 
unsigned getNumberOfDimensions ()
 retrieve the number of dimension of the representation More...
 
int getNumberOfKernels ()
 get the number of kernels contained in the representation More...
 
ValuegetPtrToValue (unsigned i)
 get a pointer to a specific value More...
 
const std::vector< Value * > & getPtrToValues ()
 get the pointer to the values More...
 
bool hasSigmaInInput ()
 check if the sigma values are already provided (in case of a histogram representation with input sigmas) More...
 
const bool & isRescaledToBias ()
 check if the representation is rescaled to the bias More...
 
void pushKernel (IFile *ff)
 push a kernel on the representation (includes widths and height) More...
 
std::unique_ptr< KernelFunctionsreadFromPoint (IFile *ifile)
 get a new histogram point from a file More...
 
void setRescaledToBias (bool rescaled)
 set the flag that rescales the free energy to the bias More...
 

Private Attributes

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

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

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()

std::unique_ptr< 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_

std::unique_ptr<Grid> PLMD::BiasRepresentation::BiasGrid_
private

◆ doInt_

bool PLMD::BiasRepresentation::doInt_
private

◆ hasgrid

bool PLMD::BiasRepresentation::hasgrid
private

◆ hills

std::vector<std::unique_ptr<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: