Loading...
Searching...
No Matches
XtsciBand.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
17#include <cstdint>
18#include <vector>
19
20struct RgsaddleBand;
21
22namespace eonc {
23
25
28class XtsciBand {
29public:
31 ~XtsciBand();
32
33 XtsciBand(const XtsciBand &) = delete;
34 XtsciBand &operator=(const XtsciBand &) = delete;
35
37 void syncFromPath();
39 void reset();
41 void step(double maxMove);
42
43private:
44 friend int xtsciBandSurface(void *user, void *request);
45 friend int xtsciSolidBandSurface(void *user, void *request);
46 // Solid-state step (rgsaddle ABI minor 17): positions and cells move.
47 void stepSolid();
48 // True when the session's band is the host path, bit for bit.
49 bool sessionMatchesPath() const;
50 // work(0) .. work(n - 1), on the image pool with [Main] parallel.
51 template <typename Work> void forImages(int64_t n, Work &&work);
52
54 RgsaddleBand *m_band{nullptr};
55 std::vector<double> m_springKs;
56 std::vector<double> m_cell;
57 std::vector<AtomMatrix> m_fixed;
58 double m_maxMove{0.2};
59 // The band carries one cell per image (NEB solid_state).
60 bool m_solid{false};
61 // [Main] parallel: the surface evaluates its images on the image pool.
62 bool m_threads{false};
63};
64
65} // namespace eonc
bool sessionMatchesPath() const
XtsciBand & operator=(const XtsciBand &)=delete
NudgedElasticBand * m_neb
Definition XtsciBand.h:53
friend int xtsciSolidBandSurface(void *user, void *request)
friend int xtsciBandSurface(void *user, void *request)
void reset()
Drop stepper history after a host reparameterization.
RgsaddleBand * m_band
Definition XtsciBand.h:54
void forImages(int64_t n, Work &&work)
std::vector< double > m_cell
Definition XtsciBand.h:56
XtsciBand(NudgedElasticBand &neb, const Parameters &params)
std::vector< AtomMatrix > m_fixed
Definition XtsciBand.h:57
double m_maxMove
Definition XtsciBand.h:58
XtsciBand(const XtsciBand &)=delete
void step(double maxMove)
Assemble the band force and take one stepper step.
void syncFromPath()
Copy the current path into the session.
std::vector< double > m_springKs
Definition XtsciBand.h:55
RAII resource manager for the ARTn C library with global synchronization.