21 #include "ElasticBand.h"
22 #include "CVs/CVManager.h"
36 for(
size_t i = 0; i < cvs.size(); ++i)
40 auto& grad = cv->GetGradient();
43 auto diff = cv->GetDifference(
centers_[i]);
47 for(
size_t j = 0; j < forces.size(); ++j)
48 for(
int k = 0; k < forces[j].size(); ++k)
49 forces[j][k] -= D*grad[j][k];
84 std::vector<double> lcv0, ucv0, tngt;
92 for(
size_t ii = 0; ii<
centers_.size(); ii++)
94 tngt[ii] = ucv0[ii] - lcv0[ii];
95 norm+=tngt[ii]*tngt[ii];
100 for(
size_t ii = 0; ii <
centers_.size(); ii++) {
107 for(
size_t ii = 0; ii <
centers_.size(); ii++)
Collective variable manager.
unsigned int nsampled_
Number samples actually sampled.
Class containing a snapshot of the current simulation in time.
void GatherNeighbors(std::vector< double > *lcv0, std::vector< double > *ucv0)
Gather neighbors over MPI.
std::vector< double > centers_
CV starting location values.
uint iteration_
The global method iteration.
std::vector< double > newcenters_
CV starting location values.
mxx::comm world_
Global MPI communicator.
bool CheckEnd(const CVList &CV)
Check if method reached one of the exit criteria.
double tau_
Time step of string change.
void StringUpdate()
Updates the nudged elastic band string.
int mpiid_
The node this belongs to.
void UpdateWorldString(const CVList &cvs)
Update the world string over MPI.
std::vector< CollectiveVariable * > GetCVs(const std::vector< uint > &mask=std::vector< uint >()) const
Get CV iterator.
void PrintString(const CVList &CV)
Prints the CV positions to file.
unsigned int iterator_
The local method iterator.
std::vector< double > cvspring_
Vector of spring constants.
std::vector< uint > cvmask_
Mask which identifies which CVs to act on.
void PostIntegration(Snapshot *snapshot, const class CVManager &cvmanager) override
Post-integration hook.
unsigned int equilibrate_
unsigned int nsamples_
Block iterations.
const std::vector< Vector3 > & GetForces() const
Access the per-particle forces.
double stringspring_
String spring constant.