24 #include "Utility/Basis.h"
25 #include "Grids/Grid.h"
181 BFS(
const MPI_Comm& world,
182 const MPI_Comm& comm,
184 Grid<std::vector<double>> *f,
186 const std::vector<BasisFunction*>& functions,
187 const std::vector<double>& restraint,
188 const std::vector<double>& boundUp,
189 const std::vector<double>& boundLow,
190 unsigned int cyclefreq,
191 unsigned int frequency,
192 const std::string bnme,
193 const double temperature,
197 Method(frequency, world, comm),
235 void SetBasis(
const std::vector<double>&coeff, std::vector<double>&unbias)
242 static BFS*
Build(
const Json::Value& json,
243 const MPI_Comm& world,
244 const MPI_Comm& comm,
245 const std::string& path);
Basis Function Sampling Algorithm.
double weight_
Weighting for potentially faster sampling.
unsigned int cyclefreqTmp_
Temporary cyclefrequency that ensures sweeps are of proper length for restrained simulations.
void PostSimulation(Snapshot *snapshot, const class CVManager &cvmanager) override
Method call post simulation.
bool convergeExit_
A check to see if you want the system to end when it reaches the convergence criteria.
std::vector< double > restraint_
Spring constants for restrained system.
double temperature_
Self-defined temperature.
Grid< unsigned int > * h_
Grid of visited states.
Grid< std::vector< double > > * f_
Stored gradients.
BasisEvaluator evaluator_
The basis evaluator class.
void ProjectBias(const CVList &cvs, const double beta)
The functions which calculates the updated bias and coefficients and then stores them.
Grid< double > * b_
Stored bias potential.
std::vector< double > coeffArr_
The coefficient array for restart runs.
std::vector< double > boundUp_
Upper position of the spring restraint.
double tol_
The tolerance criteria for the system .
unsigned int cyclefreq_
Frequency of coefficient updates.
void SetIteration(const int iter)
Set the current iteration.
void PostIntegration(Snapshot *snapshot, const class CVManager &cvmanager) override
Method call post integration.
unsigned int iteration_
Iteration counter.
void InBounds(const CVList &cvs)
A function which checks to see if the CVs are still in bounds.
unsigned int step_
Step counter for the cyclefrequency.
BFS(const MPI_Comm &world, const MPI_Comm &comm, Grid< unsigned int > *h, Grid< std::vector< double >> *f, Grid< double > *b, const std::vector< BasisFunction * > &functions, 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 double temperature, const double tol, const double weight, bool converge)
Constructor.
std::vector< double > boundLow_
Lower position of the spring restraint.
static BFS * Build(const Json::Value &json, const MPI_Comm &world, const MPI_Comm &comm, const std::string &path)
Build a derived method from JSON node.
void PrintBias(const CVList &cvs, const double beta)
Prints the current bias to a defined file from the JSON.
void PreSimulation(Snapshot *snapshot, const class CVManager &cvmanager) override
Method call prior to simulation initiation.
void SetBasis(const std::vector< double > &coeff, std::vector< double > &unbias)
Set the values for the basis.
unsigned int mpiid_
The node that the current system belongs to, primarily for printing and debugging.
std::vector< double > unbias_
The biased histogram of states.
bool bounds_
A variable to check to see if the simulation is in bounds or not.
Calculates the inner product of all the basis functions and the histogram.
void SetCoeff(const std::vector< double > &coeff)
Set the coefficient array in the event of a restart run.
Collective variable manager.
Interface for Method implementations.
Class containing a snapshot of the current simulation in time.
std::vector< CollectiveVariable * > CVList
List of Collective Variables.