13namespace fs = std::filesystem;
17 std::string_view what) {
21 throw std::invalid_argument(std::format(
22 "NEB: {} do not have the same number of atoms ({} vs {})", what,
29std::vector<Matter>
filePathInit(
const std::vector<fs::path> &fsrcs,
30 const Matter &refImg,
const size_t nimgs);
44std::vector<Matter>
resamplePath(
const std::vector<Matter> &densePath,
65std::vector<std::filesystem::path>
72 bool use_zbl =
false);
75 const Matter &finalImg,
size_t nimgs,
77 bool use_zbl =
false);
81 bool use_zbl =
false);
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
long int numberOfAtoms() const
AtomMatrix cubicInterpolate(const AtomMatrix &P0, const AtomMatrix &T0, const AtomMatrix &P1, const AtomMatrix &T1, double f)
Interpolates positions using a cubic Hermite spline.
std::vector< Matter > resamplePath(const std::vector< Matter > &densePath, size_t targetCount)
std::vector< Matter > sidppPath(const Matter &initImg, const Matter &finalImg, size_t target_nimgs, const Parameters ¶ms, bool use_zbl)
void resamplePathInPlace(std::span< std::shared_ptr< Matter > > path)
In-place path reparameterization for NEB shared_ptr paths.
Matter interpolateImage(const Matter &A, const Matter &B, double fraction)
std::shared_ptr< Potential > createZBLPotential()
std::vector< Matter > linearPath(const Matter &initImg, const Matter &finalImg, const size_t nimgs)
MatrixXd getDistanceMatrix(const Matter &m)
void ensureDistinctAdjacentImages(const std::vector< Matter > &path, double min_sep)
Adjacent images closer than min_sep (RMSD, PBC) are a collapsed path.
void requireSameAtomCount(const Matter &a, const Matter &b, std::string_view what)
Abort before Eigen subtracts two position matrices of different size.
std::vector< Matter > filePathInit(const std::vector< fs::path > &fsrcs, const Matter &refImg, const size_t nimgs)
std::vector< Matter > idppPath(const Matter &initImg, const Matter &finalImg, const size_t nimgs, const Parameters ¶ms, bool use_zbl)
std::vector< Matter > idppCollectivePath(const Matter &initImg, const Matter &finalImg, size_t nimgs, const Parameters ¶ms, bool use_zbl)
std::vector< fs::path > readFilePaths(const std::string &listFilePath)
Reads a file where each line contains a path to another file.
RAII resource manager for the ARTn C library with global synchronization.