SSAGES  0.8.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  bool InCell(const CVList& cvs) const;
62 
64  void StringUpdate() override;
65 
68 
69  public:
71 
85  FiniteTempString(const MPI_Comm& world,
86  const MPI_Comm& comm,
87  const std::vector<double>& centers,
88  unsigned int maxiterations,
89  unsigned int blockiterations,
90  double tau,
91  const std::vector<double> cvspring,
92  double kappa,
93  unsigned int springiter,
94  unsigned int frequency) :
95  StringMethod(world, comm, centers, maxiterations, cvspring, frequency),
96  kappa_(kappa), blockiterations_(blockiterations), tau_(tau),
97  min_num_umbrella_steps_(springiter), run_umbrella_(true),
98  umbrella_iter_(1), reset_for_umbrella(false)
99  {
101  prev_positions_.resize(1);
102 
104  prev_velocities_.resize(1);
105 
106  prev_IDs_.resize(1);
107 
108  }
109 
111  void PostIntegration(Snapshot* snapshot, const class CVManager& cvmanager) override;
112 
115  };
116 }
117 
Collective variable manager.
Definition: CVManager.h:40
Finite Temperature Spring Method.
int run_umbrella_
Flag to run umbrella or not during post-integration.
void PostIntegration(Snapshot *snapshot, const class CVManager &cvmanager) override
Post-integration hook.
void StringUpdate() override
Updates the string according to the FTS method.
std::vector< CollectiveVariable * > CVList
List of Collective Variables.
Definition: types.h:51
String base class for FTS, Swarm, and elastic band.
Definition: StringMethod.h:38
std::vector< std::vector< double > > prev_velocities_
Store velocities for starting trajectories.
Definition: StringMethod.h:88
unsigned int min_num_umbrella_steps_
Minimum number of steps to apply umbrella sampling.
Class containing a snapshot of the current simulation in time.
Definition: Snapshot.h:43
unsigned int blockiterations_
Number of steps to block average the CV&#39;s postions over.
std::vector< std::vector< int > > prev_IDs_
Store atom IDs for starting trajectories.
Definition: StringMethod.h:91
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.
bool InCell(const CVList &cvs) const
Checks if CV is in voronoi cell.
double tau_
Time step of string change.
std::vector< double > prev_CVs_
Stores the last positions of the CVs.
bool reset_for_umbrella
Flag for whether a system was to run umbrella sampling before checking against other systems...
unsigned int umbrella_iter_
Iterator that keeps track of umbrella iterations.
std::vector< std::vector< double > > prev_positions_
Store positions for starting trajectories.
Definition: StringMethod.h:85
double kappa_
String modification parameter.