Loading...
Searching...
No Matches
NEBInitialPaths.hpp
Go to the documentation of this file.
1#pragma once
2#include "Matter.h"
3#include <filesystem>
4#include <memory>
5#include <span>
6
7namespace eonc {
8
9namespace helpers::neb_paths {
10namespace fs = std::filesystem;
11std::vector<Matter> linearPath(const Matter &initImg, const Matter &finalImg,
12 const size_t nimgs);
13
14std::vector<Matter> filePathInit(const std::vector<fs::path> &fsrcs,
15 const Matter &refImg, const size_t nimgs);
16
26 const AtomMatrix &P1, const AtomMatrix &T1,
27 double f);
28
29std::vector<Matter> resamplePath(const std::vector<Matter> &densePath,
30 size_t targetCount);
31
41void resamplePathInPlace(std::span<std::shared_ptr<Matter>> path);
42
50std::vector<std::filesystem::path>
51readFilePaths(const std::string &listFilePath);
52
53MatrixXd getDistanceMatrix(const Matter &m);
54
55std::vector<Matter> idppPath(const Matter &initImg, const Matter &finalImg,
56 size_t nimgs, const Parameters &params,
57 bool use_zbl = false);
58
59std::vector<Matter> idppCollectivePath(const Matter &initImg,
60 const Matter &finalImg, size_t nimgs,
61 const Parameters &params,
62 bool use_zbl = false);
63
64std::vector<Matter> sidppPath(const Matter &initImg, const Matter &finalImg,
65 size_t target_nimgs, const Parameters &params,
66 bool use_zbl = false);
67
68// Helper to insert an image linearly between two others
69Matter interpolateImage(const Matter &A, const Matter &B, double fraction);
70// Helper to construct ZBL potentials
71std::shared_ptr<Potential> createZBLPotential();
72
73} // namespace helpers::neb_paths
74
75} // namespace eonc
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition Eigen.h:33
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
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 &params, 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)
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 &params, bool use_zbl)
std::vector< Matter > idppCollectivePath(const Matter &initImg, const Matter &finalImg, size_t nimgs, const Parameters &params, 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.