102 double distance(
const std::vector<double>& x,
const std::vector<double>& y)
const
105 for (
size_t i = 0; i < x.size(); i++)
122 void GatherNeighbors(std::vector<double> *lcv0, std::vector<double> *ucv0);
145 for(
size_t i = 0; i <
centers_.size(); i++)
177 const MPI_Comm& comm,
178 const std::vector<double>& centers,
179 unsigned int maxiterations,
180 const std::vector<double> cvspring,
181 unsigned int frequency) :
216 const MPI_Comm& world,
217 const MPI_Comm& comm,
218 const std::string& path);
Collective variable manager.
Interface for Method implementations.
Class containing a snapshot of the current simulation in time.
String base class for FTS, Swarm, and elastic band.
std::vector< std::vector< double > > worldstring_
The world's strings centers for each CV.
bool TolCheck() const
Check whether tolerance criteria have been met.
std::ofstream stringout_
Output stream for string data.
int recneigh_
Neighbor to gain info from.
void SetTolerance(std::vector< double > tol)
Set the tolerance for quitting method.
int mpiid_
The node this belongs to.
std::vector< double > cvspring_
Vector of spring constants.
StringMethod(const MPI_Comm &world, const MPI_Comm &comm, const std::vector< double > ¢ers, unsigned int maxiterations, const std::vector< double > cvspring, unsigned int frequency)
Constructor.
void UpdateWorldString(const CVList &cvs)
Update the world string over MPI.
virtual void StringUpdate()=0
Updates the position of the string.
void SetSendRecvNeighbors()
Communicate neighbor lists over MPI.
std::vector< double > tol_
Tolerance criteria for determining when to stop string (default 0 if no tolerance criteria)
virtual void PostIntegration(Snapshot *snapshot, const class CVManager &cvmanager) override=0
Method call post integration.
static StringMethod * Build(const Json::Value &json, const MPI_Comm &world, const MPI_Comm &comm, const std::string &path)
Build a derived method from JSON node.
std::vector< std::vector< double > > prev_velocities_
Store velocities for starting trajectories.
std::vector< double > centers_
CV starting location values.
bool CheckEnd(const CVList &CV)
Check if method reached one of the exit criteria.
unsigned int iteration_
The global method iteration.
void PostSimulation(Snapshot *snapshot, const class CVManager &cvmanager) override
Method call post simulation.
void PrintString(const CVList &CV)
Prints the CV positions to file.
int sendneigh_
Neighbor to send info to.
double distance(const std::vector< double > &x, const std::vector< double > &y) const
Helper function for calculating distances.
void GatherNeighbors(std::vector< double > *lcv0, std::vector< double > *ucv0)
Gather neighbors over MPI.
void PreSimulation(Snapshot *snapshot, const class CVManager &cvmanager) override
Method call prior to simulation initiation.
virtual ~StringMethod()
Destructor.
std::vector< std::vector< double > > prev_positions_
Store positions for starting trajectories.
std::vector< std::vector< int > > prev_IDs_
Store atom IDs for starting trajectories.
int numnodes_
Number of nodes on a string.
unsigned int iterator_
The local method iterator.
unsigned int maxiterator_
Maximum cap on number of string method iterations performed.
std::vector< double > newcenters_
CV starting location values.
void StringReparam(double alpha_star)
Reparameterize the string.
std::vector< CollectiveVariable * > CVList
List of Collective Variables.