Loading...
Searching...
No Matches
NEBSpringForce.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 "Eigen.h"
15#include "Matter.h"
16#include "Parameters.h"
17#include "SafeMath.h"
18#include <variant>
19#include <vector>
20
21namespace eonc::neb {
22
25 AtomMatrix forceSpringPar; // Parallel (tangent) spring force
26 AtomMatrix forceSpring; // Full spring force (needed for DNEB)
27};
28
31 double ksp;
32
33 SpringResult compute(long i, const AtomMatrix &tangent, double distNext,
34 double distPrev, const AtomMatrix &posDiffNext,
35 const AtomMatrix &posDiffPrev,
36 const std::shared_ptr<Matter> &image) const;
37};
38
43 double ksp;
44
45 SpringResult compute(long i, const AtomMatrix &tangent, double distNext,
46 double distPrev) const;
47};
48
51 std::vector<double> springConstants;
52
53 SpringResult compute(long i, const AtomMatrix &tangent, double distNext,
54 double distPrev) const;
55};
56
59 double base_k;
60 std::vector<AtomMatrix> L_vecs;
61
62 SpringResult compute(long i, const AtomMatrix &tangent,
63 const AtomMatrix &posNext, const AtomMatrix &posPrev,
64 const AtomMatrix &pos,
65 const std::shared_ptr<Matter> &image) const;
66};
67
70
75 const std::vector<std::shared_ptr<Matter>> &path,
76 long numImages, int atoms, double maxEnergy, double E_ref);
77
78} // namespace eonc::neb
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
SpringStrategy buildSpringStrategy(const Parameters &params, const std::vector< std::shared_ptr< Matter > > &path, long numImages, int atoms, double maxEnergy, double E_ref)
Build the appropriate spring strategy from parameters and current path state.
std::variant< UniformSpring, WeightedSpring, GeometricSpring, OnsagerMachlupSpring > SpringStrategy
Cubic-potential spring.
SpringResult compute(long i, const AtomMatrix &tangent, double distNext, double distPrev) const
Onsager-Machlup action-based springs (Mandelli & Parrinello 2021).
SpringResult compute(long i, const AtomMatrix &tangent, const AtomMatrix &posNext, const AtomMatrix &posPrev, const AtomMatrix &pos, const std::shared_ptr< Matter > &image) const
std::vector< AtomMatrix > L_vecs
Result of spring force computation for a single image.
Uniform spring constant for all images.
SpringResult compute(long i, const AtomMatrix &tangent, double distNext, double distPrev, const AtomMatrix &posDiffNext, const AtomMatrix &posDiffPrev, const std::shared_ptr< Matter > &image) const
Energy-weighted spring constants (variable per segment).
std::vector< double > springConstants
SpringResult compute(long i, const AtomMatrix &tangent, double distNext, double distPrev) const