24 #include "Grids/Histogram.h"
52 value(value), map(map)
77 const std::vector<double>&
derivs) :
78 values(values), derivs(derivs)
241 const MPI_Comm& comm,
243 const std::vector<unsigned int>& polyord,
244 const std::vector<double>& restraint,
245 const std::vector<double>& boundUp,
246 const std::vector<double>& boundLow,
247 unsigned int cyclefreq,
248 unsigned int frequency,
249 const std::string bnme,
250 const std::string cnme,
251 const double temperature,
305 void SetBasis(
const std::vector<double>&coeff, std::vector<double>&unbias)
313 const MPI_Comm& world,
314 const MPI_Comm& comm,
315 const std::string& path);
double value
The coefficient value.
Histogram< int > * hist_
Histogram of visited states.
std::vector< double > derivatives_
Derivatives of the bias potential.
void PostSimulation(Snapshot *snapshot, const class CVManager &cvmanager) override
Post-simulation hook.
Collective variable manager.
BasisLUT(const std::vector< double > &values, const std::vector< double > &derivs)
Constructor.
unsigned int cyclefreq_
Frequency of coefficient updates.
std::vector< CollectiveVariable * > CVList
List of Collective Variables.
uint iteration_
Iteration counter.
void PrintBias(const CVList &cvs, const double beta)
Prints the current bias to a defined file from the JSON.
std::vector< double > boundUp_
Upper position of the spring restraint.
void SetIteration(const int iter)
Set the current iteration.
Class containing a snapshot of the current simulation in time.
Basis Function Sampling Algorithm.
Map(const std::vector< int > &map, double value)
Constructor.
Interface for Method implementations.
void UpdateBias(const CVList &cvs, const double)
Updates the bias projection of the PMF.
std::vector< BasisLUT > LUT_
The Basis set lookup table, also defined globally.
void PreSimulation(Snapshot *snapshot, const class CVManager &cvmanager) override
Pre-simulation hook.
std::vector< double > coeff_arr_
The coefficient array for restart runs.
Map for histogram and coefficients.
void SetBasis(const std::vector< double > &coeff, std::vector< double > &unbias)
Set the values for the basis.
void BasisInit(const CVList &cvs)
Initializes the look up tables for polynomials.
unsigned int mpiid_
The node that the current system belongs to, primarily for printing and debugging.
double tol_
The tolerance criteria for the system .
Look-up table for basis functions.
std::ofstream basisout_
Output stream for basis projection data.
void PostIntegration(Snapshot *snapshot, const class CVManager &cvmanager) override
Post-integration hook.
std::vector< double > restraint_
Spring constants for restrained system.
static Basis * Build(const Json::Value &json, const MPI_Comm &world, const MPI_Comm &comm, const std::string &path)
std::vector< double > values
The values of the basis sets.
std::ofstream coeffout_
Output stream for coefficients (for reading purposes)
std::vector< double > derivs
The values of the derivatives of the basis sets.
void CalcBiasForce(const CVList &cvs)
Computes the bias force.
std::vector< unsigned int > polyords_
The order of the basis polynomials.
std::vector< Map > coeff_
Globally located coefficient values.
double temperature_
Self-defined temperature.
Basis(const MPI_Comm &world, const MPI_Comm &comm, Histogram< int > *hist, const std::vector< unsigned int > &polyord, const std::vector< double > &restraint, const std::vector< double > &boundUp, const std::vector< double > &boundLow, unsigned int cyclefreq, unsigned int frequency, const std::string bnme, const std::string cnme, const double temperature, const double tol, const double weight, bool converge)
Constructor.
double weight_
Weighting for potentially faster sampling.
bool converge_exit_
A check to see if you want the system to end when it reaches the convergence criteria.
std::vector< int > map
The mapping in an array of integers.
bool bounds_
A variable to check to see if the simulation is in bounds or not.
std::vector< double > boundLow_
Lower position of the spring restraint.
std::vector< double > unbias_
The biased histogram of states.
std::string cnme_
Coefficient filename.