Loading...
Searching...
No Matches
NEBOcinebController.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 "Parameters.h"
16
17namespace eonc {
18class NudgedElasticBand; // forward declaration
19}
20
21namespace eonc::neb {
22
27public:
37
38 static Config fromParams(const Parameters &params);
39 explicit OCINEBController(const Config &cfg);
40
41 void initBaseline(double baseline_force);
42
43 bool shouldTrigger(double convForce, bool ci_active, long climbingImage,
44 long numImages, int ciStabilityCounter) const;
45
51
52 MMFResult run(eonc::NudgedElasticBand &neb, double convForce);
53
55 void updateStability(long climbingImage);
56 int stabilityCount() const { return ciStabilityCounter_; }
57 double threshold() const { return current_threshold_; }
58
59private:
61 double current_threshold_{-1.0};
62 double baseline_force_{-1.0};
66
67 // Warm-start: cache converged eigenvector for next dimer call
68 bool has_cached_mode_{false};
70
71 int runDimer(eonc::NudgedElasticBand &neb, double &alignment);
72 void updateThresholdSuccess(double convForce, double newForce);
73 void updateThresholdBackoff(double alignment);
74};
75
76} // namespace eonc::neb
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
bool shouldTrigger(double convForce, bool ci_active, long climbingImage, long numImages, int ciStabilityCounter) const
static Config fromParams(const Parameters &params)
void updateThresholdSuccess(double convForce, double newForce)
void updateStability(long climbingImage)
MMFResult run(eonc::NudgedElasticBand &neb, double convForce)
int runDimer(eonc::NudgedElasticBand &neb, double &alignment)
void initBaseline(double baseline_force)
void updateThresholdBackoff(double alignment)
RAII resource manager for the ARTn C library with global synchronization.