SSAGES  0.9.3
Software Suite for Advanced General Ensemble Simulations
FiniteTempString.h
1 
21 #pragma once
22 
23 #include "StringMethod.h"
24 #include <fstream>
25 
26 namespace SSAGES
27 {
29 
36  {
37  private:
38 
40  double kappa_;
41 
43  unsigned int blockiterations_;
44 
46  double tau_;
47 
50 
53 
55  unsigned int umbrella_iter_;
56 
58  std::vector<double> prev_CVs_;
59 
61 
66  bool InCell(const CVList& cvs) const;
67 
69  void StringUpdate() override;
70 
73 
74  public:
76 
90  FiniteTempString(const MPI_Comm& world,
91  const MPI_Comm& comm,
92  const std::vector<double>& centers,
93  unsigned int maxiterations,
94  unsigned int blockiterations,
95  double tau,
96  const std::vector<double> cvspring,
97  double kappa,
98  unsigned int springiter,
99  unsigned int frequency) :
100  StringMethod(world, comm, centers, maxiterations, cvspring, frequency),
101  kappa_(kappa), blockiterations_(blockiterations), tau_(tau),
102  min_num_umbrella_steps_(springiter), run_umbrella_(true),
104  {
106  prev_positions_.resize(1);
107 
109  prev_velocities_.resize(1);
110 
111  prev_IDs_.resize(1);
112 
113  }
114 
117  void PostIntegration(Snapshot* snapshot, const class CVManager& cvmanager) override;
118 
121  };
122 }
123 
Collective variable manager.
Definition: CVManager.h:43
Finite Temperature Spring Method.
unsigned int min_num_umbrella_steps_
Minimum number of steps to apply umbrella sampling.
unsigned int blockiterations_
Number of steps to block average the CV's postions over.
double tau_
Time step of string change.
std::vector< double > prev_CVs_
Stores the last positions of the CVs.
bool InCell(const CVList &cvs) const
Checks if CV is in Voronoi cell.
void PostIntegration(Snapshot *snapshot, const class CVManager &cvmanager) override
Method call post integration.
bool reset_for_umbrella
Flag for whether a system was to run umbrella sampling before checking against other systems.
int run_umbrella_
Flag to run umbrella or not during post-integration.
FiniteTempString(const MPI_Comm &world, const MPI_Comm &comm, const std::vector< double > &centers, unsigned int maxiterations, unsigned int blockiterations, double tau, const std::vector< double > cvspring, double kappa, unsigned int springiter, unsigned int frequency)
Constructor.
double kappa_
String modification parameter.
unsigned int umbrella_iter_
Iterator that keeps track of umbrella iterations.
void StringUpdate() override
Updates the string according to the FTS method.
Class containing a snapshot of the current simulation in time.
Definition: Snapshot.h:48
String base class for FTS, Swarm, and elastic band.
Definition: StringMethod.h:39
std::vector< std::vector< double > > prev_velocities_
Store velocities for starting trajectories.
Definition: StringMethod.h:88
std::vector< std::vector< double > > prev_positions_
Store positions for starting trajectories.
Definition: StringMethod.h:85
std::vector< std::vector< int > > prev_IDs_
Store atom IDs for starting trajectories.
Definition: StringMethod.h:91
std::vector< CollectiveVariable * > CVList
List of Collective Variables.
Definition: types.h:51