Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
PLMD::ves::LinearBasisSetExpansion Class Reference

#include <LinearBasisSetExpansion.h>

Public Member Functions

 LinearBasisSetExpansion (const std::string &, const double, Communicator &, const std::vector< Value * > &, std::vector< BasisFunctions * > &, CoeffsVector *bias_coeffs_pntr_in=NULL)
 
 ~LinearBasisSetExpansion ()
 
double beta () const
 
CoeffsVectorBiasCoeffs () const
 
bool biasCutoffActive () const
 
double calculateReweightFactor () const
 
double getBasisSetConstant ()
 
double getBasisSetValue (const std::vector< double > &, const size_t)
 
void getBasisSetValues (const std::vector< double > &, std::vector< double > &, const bool parallel=true)
 
double getBeta () const
 
double getBias (const std::vector< double > &, bool &, const bool parallel=true)
 
double getBiasAndForces (const std::vector< double > &, bool &, std::vector< double > &)
 
double getBiasAndForces (const std::vector< double > &, bool &, std::vector< double > &, std::vector< double > &)
 
std::vector< unsigned int > getGridBins () const
 
double getKbT () const
 
unsigned int getNumberOfArguments () const
 
std::vector< unsigned int > getNumberOfBasisFunctions () const
 
size_t getNumberOfCoeffs () const
 
std::vector< Value * > getPntrsToArguments () const
 
std::vector< BasisFunctions * > getPntrsToBasisFunctions () const
 
CoeffsVectorgetPntrToBiasCoeffs () const
 
GridgetPntrToBiasGrid () const
 
long int getStepOfLastBiasGridUpdate () const
 
long int getStepOfLastBiasWithoutCutoffGridUpdate () const
 
long int getStepOfLastFesGridUpdate () const
 
double kBT () const
 
void linkAction (Action *)
 
void linkVesBias (VesBias *)
 
void readInRestartTargetDistribution (const std::string &)
 
void resetStepOfLastBiasGridUpdate ()
 
void resetStepOfLastBiasWithoutCutoffGridUpdate ()
 
void resetStepOfLastFesGridUpdate ()
 
void restartTargetDistribution ()
 
void setBiasMaximumToZero ()
 
void setBiasMinimumToZero ()
 
void setGridBins (const std::vector< unsigned int > &)
 
void setGridBins (const unsigned int)
 
void setParallel ()
 
void setSerial ()
 
void setStepOfLastBiasGridUpdate (long int step)
 
void setStepOfLastBiasWithoutCutoffGridUpdate (long int step)
 
void setStepOfLastFesGridUpdate (long int step)
 
void setupBiasGrid (const bool usederiv=false)
 
void setupFesGrid ()
 
void setupFesProjGrid ()
 
void setupTargetDistribution (TargetDistribution *)
 
void setupUniformTargetDistribution ()
 
CoeffsVectorTargetDistAverages () const
 
void updateBiasGrid ()
 
void updateBiasWithoutCutoffGrid ()
 
void updateFesGrid ()
 
void updateTargetDistribution ()
 
void writeBiasGridToFile (OFile &, const bool append=false) const
 
void writeBiasWithoutCutoffGridToFile (OFile &, const bool append=false) const
 
void writeFesGridToFile (OFile &, const bool append=false) const
 
void writeFesProjGridToFile (const std::vector< std::string > &, OFile &, const bool append=false) const
 
void writeLogTargetDistGridToFile (OFile &, const bool append=false) const
 
void writeTargetDistGridToFile (OFile &, const bool append=false) const
 
void writeTargetDistProjGridToFile (const std::vector< std::string > &, OFile &, const bool append=false) const
 
void writeTargetDistributionToFile (const std::string &) const
 

Static Public Member Functions

static double getBasisSetValue (const std::vector< double > &, const size_t, std::vector< BasisFunctions * > &, CoeffsVector *)
 
static void getBasisSetValues (const std::vector< double > &, std::vector< double > &, std::vector< BasisFunctions * > &, CoeffsVector *, Communicator *comm_in=NULL)
 
static double getBiasAndForces (const std::vector< double > &, bool &, std::vector< double > &, std::vector< double > &, std::vector< BasisFunctions * > &, CoeffsVector *, Communicator *comm_in=NULL)
 
static void registerKeywords (Keywords &keys)
 

Private Member Functions

 LinearBasisSetExpansion (const LinearBasisSetExpansion &)
 
void calculateTargetDistAveragesFromGrid (const Grid *)
 
bool isStaticTargetDistFileOutputActive () const
 
LinearBasisSetExpansionoperator= (const LinearBasisSetExpansion &)=delete
 
std::unique_ptr< GridsetupGeneralGrid (const std::string &, const bool usederiv=false)
 

Private Attributes

Actionaction_pntr_
 
std::vector< Value * > args_pntrs_
 
std::vector< BasisFunctions * > basisf_pntrs_
 
double beta_
 
CoeffsVectorbias_coeffs_pntr_
 
std::unique_ptr< Gridbias_grid_pntr_
 
std::unique_ptr< Gridbias_withoutcutoff_grid_pntr_
 
std::unique_ptr< Gridfes_grid_pntr_
 
std::vector< unsigned int > grid_bins_
 
std::vector< std::string > grid_max_
 
std::vector< std::string > grid_min_
 
double kbt_
 
std::string label_
 
Gridlog_targetdist_grid_pntr_
 
Communicatormycomm_
 
unsigned int nargs_
 
std::vector< unsigned int > nbasisf_
 
size_t ncoeffs_
 
bool serial_
 
long int step_of_last_biasgrid_update
 
long int step_of_last_biaswithoutcutoffgrid_update
 
long int step_of_last_fesgrid_update
 
std::unique_ptr< CoeffsVectortargetdist_averages_pntr_
 
std::string targetdist_grid_label_
 
Gridtargetdist_grid_pntr_
 
TargetDistributiontargetdist_pntr_
 
VesBiasvesbias_pntr_
 

Constructor & Destructor Documentation

◆ LinearBasisSetExpansion() [1/2]

PLMD::ves::LinearBasisSetExpansion::LinearBasisSetExpansion ( const std::string &  label,
const double  beta_in,
Communicator cc,
const std::vector< Value * > &  args_pntrs_in,
std::vector< BasisFunctions * > &  basisf_pntrs_in,
CoeffsVector bias_coeffs_pntr_in = NULL 
)
explicit

◆ LinearBasisSetExpansion() [2/2]

PLMD::ves::LinearBasisSetExpansion::LinearBasisSetExpansion ( const LinearBasisSetExpansion )
explicitprivate

◆ ~LinearBasisSetExpansion()

PLMD::ves::LinearBasisSetExpansion::~LinearBasisSetExpansion ( )

Member Function Documentation

◆ beta()

double PLMD::ves::LinearBasisSetExpansion::beta ( ) const
inline

◆ BiasCoeffs()

CoeffsVector& PLMD::ves::LinearBasisSetExpansion::BiasCoeffs ( ) const
inline

◆ biasCutoffActive()

bool PLMD::ves::LinearBasisSetExpansion::biasCutoffActive ( ) const

◆ calculateReweightFactor()

double PLMD::ves::LinearBasisSetExpansion::calculateReweightFactor ( ) const

◆ calculateTargetDistAveragesFromGrid()

void PLMD::ves::LinearBasisSetExpansion::calculateTargetDistAveragesFromGrid ( const Grid targetdist_grid_pntr)
private

◆ getBasisSetConstant()

double PLMD::ves::LinearBasisSetExpansion::getBasisSetConstant ( )
inline

◆ getBasisSetValue() [1/2]

double PLMD::ves::LinearBasisSetExpansion::getBasisSetValue ( const std::vector< double > &  args_values,
const size_t  basisset_index 
)
inline

◆ getBasisSetValue() [2/2]

double PLMD::ves::LinearBasisSetExpansion::getBasisSetValue ( const std::vector< double > &  args_values,
const size_t  index,
std::vector< BasisFunctions * > &  basisf_pntrs_in,
CoeffsVector coeffs_pntr_in 
)
static

◆ getBasisSetValues() [1/2]

void PLMD::ves::LinearBasisSetExpansion::getBasisSetValues ( const std::vector< double > &  args_values,
std::vector< double > &  basisset_values,
const bool  parallel = true 
)
inline

◆ getBasisSetValues() [2/2]

void PLMD::ves::LinearBasisSetExpansion::getBasisSetValues ( const std::vector< double > &  args_values,
std::vector< double > &  basisset_values,
std::vector< BasisFunctions * > &  basisf_pntrs_in,
CoeffsVector coeffs_pntr_in,
Communicator comm_in = NULL 
)
static

◆ getBeta()

double PLMD::ves::LinearBasisSetExpansion::getBeta ( ) const
inline

◆ getBias()

double PLMD::ves::LinearBasisSetExpansion::getBias ( const std::vector< double > &  args_values,
bool &  all_inside,
const bool  parallel = true 
)
inline

◆ getBiasAndForces() [1/3]

double PLMD::ves::LinearBasisSetExpansion::getBiasAndForces ( const std::vector< double > &  args_values,
bool &  all_inside,
std::vector< double > &  forces 
)
inline

◆ getBiasAndForces() [2/3]

double PLMD::ves::LinearBasisSetExpansion::getBiasAndForces ( const std::vector< double > &  args_values,
bool &  all_inside,
std::vector< double > &  forces,
std::vector< double > &  coeffsderivs_values 
)
inline

◆ getBiasAndForces() [3/3]

double PLMD::ves::LinearBasisSetExpansion::getBiasAndForces ( const std::vector< double > &  args_values,
bool &  all_inside,
std::vector< double > &  forces,
std::vector< double > &  coeffsderivs_values,
std::vector< BasisFunctions * > &  basisf_pntrs_in,
CoeffsVector coeffs_pntr_in,
Communicator comm_in = NULL 
)
static

◆ getGridBins()

std::vector<unsigned int> PLMD::ves::LinearBasisSetExpansion::getGridBins ( ) const
inline

◆ getKbT()

double PLMD::ves::LinearBasisSetExpansion::getKbT ( ) const
inline

◆ getNumberOfArguments()

unsigned int PLMD::ves::LinearBasisSetExpansion::getNumberOfArguments ( ) const
inline

◆ getNumberOfBasisFunctions()

std::vector<unsigned int> PLMD::ves::LinearBasisSetExpansion::getNumberOfBasisFunctions ( ) const
inline

◆ getNumberOfCoeffs()

size_t PLMD::ves::LinearBasisSetExpansion::getNumberOfCoeffs ( ) const
inline

◆ getPntrsToArguments()

std::vector<Value*> PLMD::ves::LinearBasisSetExpansion::getPntrsToArguments ( ) const
inline

◆ getPntrsToBasisFunctions()

std::vector<BasisFunctions*> PLMD::ves::LinearBasisSetExpansion::getPntrsToBasisFunctions ( ) const
inline

◆ getPntrToBiasCoeffs()

CoeffsVector* PLMD::ves::LinearBasisSetExpansion::getPntrToBiasCoeffs ( ) const
inline

◆ getPntrToBiasGrid()

Grid* PLMD::ves::LinearBasisSetExpansion::getPntrToBiasGrid ( ) const
inline

◆ getStepOfLastBiasGridUpdate()

long int PLMD::ves::LinearBasisSetExpansion::getStepOfLastBiasGridUpdate ( ) const
inline

◆ getStepOfLastBiasWithoutCutoffGridUpdate()

long int PLMD::ves::LinearBasisSetExpansion::getStepOfLastBiasWithoutCutoffGridUpdate ( ) const
inline

◆ getStepOfLastFesGridUpdate()

long int PLMD::ves::LinearBasisSetExpansion::getStepOfLastFesGridUpdate ( ) const
inline

◆ isStaticTargetDistFileOutputActive()

bool PLMD::ves::LinearBasisSetExpansion::isStaticTargetDistFileOutputActive ( ) const
private

◆ kBT()

double PLMD::ves::LinearBasisSetExpansion::kBT ( ) const
inline

◆ linkAction()

void PLMD::ves::LinearBasisSetExpansion::linkAction ( Action action_pntr_in)

◆ linkVesBias()

void PLMD::ves::LinearBasisSetExpansion::linkVesBias ( VesBias vesbias_pntr_in)

◆ operator=()

LinearBasisSetExpansion& PLMD::ves::LinearBasisSetExpansion::operator= ( const LinearBasisSetExpansion )
privatedelete

◆ readInRestartTargetDistribution()

void PLMD::ves::LinearBasisSetExpansion::readInRestartTargetDistribution ( const std::string &  grid_fname)

◆ registerKeywords()

void PLMD::ves::LinearBasisSetExpansion::registerKeywords ( Keywords keys)
static

◆ resetStepOfLastBiasGridUpdate()

void PLMD::ves::LinearBasisSetExpansion::resetStepOfLastBiasGridUpdate ( )
inline

◆ resetStepOfLastBiasWithoutCutoffGridUpdate()

void PLMD::ves::LinearBasisSetExpansion::resetStepOfLastBiasWithoutCutoffGridUpdate ( )
inline

◆ resetStepOfLastFesGridUpdate()

void PLMD::ves::LinearBasisSetExpansion::resetStepOfLastFesGridUpdate ( )
inline

◆ restartTargetDistribution()

void PLMD::ves::LinearBasisSetExpansion::restartTargetDistribution ( )

◆ setBiasMaximumToZero()

void PLMD::ves::LinearBasisSetExpansion::setBiasMaximumToZero ( )

◆ setBiasMinimumToZero()

void PLMD::ves::LinearBasisSetExpansion::setBiasMinimumToZero ( )

◆ setGridBins() [1/2]

void PLMD::ves::LinearBasisSetExpansion::setGridBins ( const std::vector< unsigned int > &  grid_bins_in)

◆ setGridBins() [2/2]

void PLMD::ves::LinearBasisSetExpansion::setGridBins ( const unsigned int  nbins)

◆ setParallel()

void PLMD::ves::LinearBasisSetExpansion::setParallel ( )
inline

◆ setSerial()

void PLMD::ves::LinearBasisSetExpansion::setSerial ( )
inline

◆ setStepOfLastBiasGridUpdate()

void PLMD::ves::LinearBasisSetExpansion::setStepOfLastBiasGridUpdate ( long int  step)
inline

◆ setStepOfLastBiasWithoutCutoffGridUpdate()

void PLMD::ves::LinearBasisSetExpansion::setStepOfLastBiasWithoutCutoffGridUpdate ( long int  step)
inline

◆ setStepOfLastFesGridUpdate()

void PLMD::ves::LinearBasisSetExpansion::setStepOfLastFesGridUpdate ( long int  step)
inline

◆ setupBiasGrid()

void PLMD::ves::LinearBasisSetExpansion::setupBiasGrid ( const bool  usederiv = false)

◆ setupFesGrid()

void PLMD::ves::LinearBasisSetExpansion::setupFesGrid ( )

◆ setupFesProjGrid()

void PLMD::ves::LinearBasisSetExpansion::setupFesProjGrid ( )

◆ setupGeneralGrid()

std::unique_ptr< Grid > PLMD::ves::LinearBasisSetExpansion::setupGeneralGrid ( const std::string &  label_suffix,
const bool  usederiv = false 
)
private

◆ setupTargetDistribution()

void PLMD::ves::LinearBasisSetExpansion::setupTargetDistribution ( TargetDistribution targetdist_pntr_in)

◆ setupUniformTargetDistribution()

void PLMD::ves::LinearBasisSetExpansion::setupUniformTargetDistribution ( )

◆ TargetDistAverages()

CoeffsVector& PLMD::ves::LinearBasisSetExpansion::TargetDistAverages ( ) const
inline

◆ updateBiasGrid()

void PLMD::ves::LinearBasisSetExpansion::updateBiasGrid ( )

◆ updateBiasWithoutCutoffGrid()

void PLMD::ves::LinearBasisSetExpansion::updateBiasWithoutCutoffGrid ( )

◆ updateFesGrid()

void PLMD::ves::LinearBasisSetExpansion::updateFesGrid ( )

◆ updateTargetDistribution()

void PLMD::ves::LinearBasisSetExpansion::updateTargetDistribution ( )

◆ writeBiasGridToFile()

void PLMD::ves::LinearBasisSetExpansion::writeBiasGridToFile ( OFile ofile,
const bool  append = false 
) const

◆ writeBiasWithoutCutoffGridToFile()

void PLMD::ves::LinearBasisSetExpansion::writeBiasWithoutCutoffGridToFile ( OFile ofile,
const bool  append = false 
) const

◆ writeFesGridToFile()

void PLMD::ves::LinearBasisSetExpansion::writeFesGridToFile ( OFile ofile,
const bool  append = false 
) const

◆ writeFesProjGridToFile()

void PLMD::ves::LinearBasisSetExpansion::writeFesProjGridToFile ( const std::vector< std::string > &  proj_arg,
OFile ofile,
const bool  append = false 
) const

◆ writeLogTargetDistGridToFile()

void PLMD::ves::LinearBasisSetExpansion::writeLogTargetDistGridToFile ( OFile ofile,
const bool  append = false 
) const

◆ writeTargetDistGridToFile()

void PLMD::ves::LinearBasisSetExpansion::writeTargetDistGridToFile ( OFile ofile,
const bool  append = false 
) const

◆ writeTargetDistProjGridToFile()

void PLMD::ves::LinearBasisSetExpansion::writeTargetDistProjGridToFile ( const std::vector< std::string > &  proj_arg,
OFile ofile,
const bool  append = false 
) const

◆ writeTargetDistributionToFile()

void PLMD::ves::LinearBasisSetExpansion::writeTargetDistributionToFile ( const std::string &  filename) const

Member Data Documentation

◆ action_pntr_

Action* PLMD::ves::LinearBasisSetExpansion::action_pntr_
private

◆ args_pntrs_

std::vector<Value*> PLMD::ves::LinearBasisSetExpansion::args_pntrs_
private

◆ basisf_pntrs_

std::vector<BasisFunctions*> PLMD::ves::LinearBasisSetExpansion::basisf_pntrs_
private

◆ beta_

double PLMD::ves::LinearBasisSetExpansion::beta_
private

◆ bias_coeffs_pntr_

CoeffsVector* PLMD::ves::LinearBasisSetExpansion::bias_coeffs_pntr_
private

◆ bias_grid_pntr_

std::unique_ptr<Grid> PLMD::ves::LinearBasisSetExpansion::bias_grid_pntr_
private

◆ bias_withoutcutoff_grid_pntr_

std::unique_ptr<Grid> PLMD::ves::LinearBasisSetExpansion::bias_withoutcutoff_grid_pntr_
private

◆ fes_grid_pntr_

std::unique_ptr<Grid> PLMD::ves::LinearBasisSetExpansion::fes_grid_pntr_
private

◆ grid_bins_

std::vector<unsigned int> PLMD::ves::LinearBasisSetExpansion::grid_bins_
private

◆ grid_max_

std::vector<std::string> PLMD::ves::LinearBasisSetExpansion::grid_max_
private

◆ grid_min_

std::vector<std::string> PLMD::ves::LinearBasisSetExpansion::grid_min_
private

◆ kbt_

double PLMD::ves::LinearBasisSetExpansion::kbt_
private

◆ label_

std::string PLMD::ves::LinearBasisSetExpansion::label_
private

◆ log_targetdist_grid_pntr_

Grid* PLMD::ves::LinearBasisSetExpansion::log_targetdist_grid_pntr_
private

◆ mycomm_

Communicator& PLMD::ves::LinearBasisSetExpansion::mycomm_
private

◆ nargs_

unsigned int PLMD::ves::LinearBasisSetExpansion::nargs_
private

◆ nbasisf_

std::vector<unsigned int> PLMD::ves::LinearBasisSetExpansion::nbasisf_
private

◆ ncoeffs_

size_t PLMD::ves::LinearBasisSetExpansion::ncoeffs_
private

◆ serial_

bool PLMD::ves::LinearBasisSetExpansion::serial_
private

◆ step_of_last_biasgrid_update

long int PLMD::ves::LinearBasisSetExpansion::step_of_last_biasgrid_update
private

◆ step_of_last_biaswithoutcutoffgrid_update

long int PLMD::ves::LinearBasisSetExpansion::step_of_last_biaswithoutcutoffgrid_update
private

◆ step_of_last_fesgrid_update

long int PLMD::ves::LinearBasisSetExpansion::step_of_last_fesgrid_update
private

◆ targetdist_averages_pntr_

std::unique_ptr<CoeffsVector> PLMD::ves::LinearBasisSetExpansion::targetdist_averages_pntr_
private

◆ targetdist_grid_label_

std::string PLMD::ves::LinearBasisSetExpansion::targetdist_grid_label_
private

◆ targetdist_grid_pntr_

Grid* PLMD::ves::LinearBasisSetExpansion::targetdist_grid_pntr_
private

◆ targetdist_pntr_

TargetDistribution* PLMD::ves::LinearBasisSetExpansion::targetdist_pntr_
private

◆ vesbias_pntr_

VesBias* PLMD::ves::LinearBasisSetExpansion::vesbias_pntr_
private

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