Loading...
Searching...
No Matches
NEBSplineExtrema.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13
14#include "ConFileIO.h"
15#include "Eigen.h"
16#include "EigenmodeStrategy.h"
17#include "EonLogger.h"
18#include "Matter.h"
19#include <filesystem>
20#include <limits>
21#include <memory>
22#include <optional>
23#include <readcon-core.hpp>
24#include <string>
25#include <vector>
26
27namespace eonc::neb {
28
30 long numExtrema{0};
31 std::vector<double> positions;
32 std::vector<double> energies;
33 std::vector<double> curvatures;
34};
35
38findSplineExtrema(const std::vector<std::shared_ptr<Matter>> &path,
39 const std::vector<std::shared_ptr<AtomMatrix>> &tangent,
40 long numImages);
41
44[[nodiscard]] AtomMatrix
45interpolatedPeakMode(const std::vector<std::shared_ptr<Matter>> &path,
46 const std::vector<std::shared_ptr<AtomMatrix>> &tangent,
47 long numImages, double posFraction);
48
51 const std::vector<std::shared_ptr<Matter>> &path,
52 const std::vector<std::shared_ptr<AtomMatrix>> &tangent,
53 const std::vector<std::shared_ptr<EigenmodeStrategy>> &eigenmode_solvers,
54 long numImages, bool estimateEigenvalues, bool writeToFile, size_t idx,
55 eonc::log::Scoped log, double referenceEnergy = std::numeric_limits<double>::quiet_NaN());
56
62[[nodiscard]] std::vector<readcon::ConFrame> pathToConFrames(
63 const std::vector<std::shared_ptr<Matter>> &path,
64 const std::vector<std::shared_ptr<AtomMatrix>> &tangent,
65 const std::vector<std::shared_ptr<EigenmodeStrategy>> &eigenmode_solvers,
66 long numImages, bool estimateEigenvalues,
67 std::optional<size_t> bandIndex = std::nullopt,
68 double referenceEnergy = std::numeric_limits<double>::quiet_NaN());
69
72 const std::vector<std::shared_ptr<Matter>> &path,
73 const std::vector<std::shared_ptr<AtomMatrix>> &tangent,
74 const std::vector<std::shared_ptr<EigenmodeStrategy>> &eigenmode_solvers,
75 long numImages, bool estimateEigenvalues, std::string filename,
76 std::optional<size_t> bandIndex = std::nullopt,
77 double referenceEnergy = std::numeric_limits<double>::quiet_NaN());
78
79} // namespace eonc::neb
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
IoStatus
Structured I/O result for the client surface (nanobind-friendly).
Definition ConFileIO.h:29
std::vector< readcon::ConFrame > pathToConFrames(const std::vector< std::shared_ptr< Matter > > &path, const std::vector< std::shared_ptr< AtomMatrix > > &tangent, const std::vector< std::shared_ptr< EigenmodeStrategy > > &eigenmode_solvers, long numImages, bool estimateEigenvalues, std::optional< size_t > bandIndex, double referenceEnergy)
Build stamped ConFrames for a NEB band (same metadata as writePathCon).
AtomMatrix interpolatedPeakMode(const std::vector< std::shared_ptr< Matter > > &path, const std::vector< std::shared_ptr< AtomMatrix > > &tangent, long numImages, double posFraction)
Unit tangent at a fractional image index.
void printImageData(const std::vector< std::shared_ptr< Matter > > &path, const std::vector< std::shared_ptr< AtomMatrix > > &tangent, const std::vector< std::shared_ptr< EigenmodeStrategy > > &eigenmode_solvers, long numImages, bool estimateEigenvalues, bool writeToFile, size_t idx, eonc::log::Scoped log, double referenceEnergy)
Print NEB image data to log and optionally to file.
eonc::io::IoStatus writePathCon(const std::vector< std::shared_ptr< Matter > > &path, const std::vector< std::shared_ptr< AtomMatrix > > &tangent, const std::vector< std::shared_ptr< EigenmodeStrategy > > &eigenmode_solvers, long numImages, bool estimateEigenvalues, std::string filename, std::optional< size_t > bandIndex, double referenceEnergy)
Write a NEB band as a multi-frame .con via readcon ConFrameBuilder::clone().
ExtremaResult findSplineExtrema(const std::vector< std::shared_ptr< Matter > > &path, const std::vector< std::shared_ptr< AtomMatrix > > &tangent, long numImages)
Find extrema along the MEP using cubic spline interpolation.
RAII helper for class-scoped logging.
Definition EonLogger.h:171
std::vector< double > energies
std::vector< double > curvatures
std::vector< double > positions