Loading...
Searching...
No Matches
MetatomicDynPot.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** Thin host-side Potential: all torch/metatomic work happens in
7** libmetatomic_pot.so via C ABI (dlopen).
8*/
9#pragma once
10
11#include "eon/Potential.h"
12#include "metatomic_c_abi.h"
13
14namespace eonc {
15
16class MetatomicDynPot : public Potential {
17public:
18 explicit MetatomicDynPot(const Parameters &params);
19 ~MetatomicDynPot() override;
20
21 void force(long nAtoms, const double *positions, const int *atomicNrs,
22 double *forces, double *energy, double *variance,
23 const double *box) override;
24
25 [[nodiscard]] bool isThreadSafe() const noexcept override { return false; }
26 [[nodiscard]] bool needsPerImageInstance() const noexcept override {
27 return false;
28 }
29
30private:
32};
33
34} // namespace eonc
void force(long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, double *variance, const double *box) override
MetatomicDynPot(const Parameters &params)
bool needsPerImageInstance() const noexcept override
Whether NEB should create separate Potential instances per image for true parallel force evaluation.
bool isThreadSafe() const noexcept override
Whether this potential's force() can be called from multiple threads on the SAME instance.
Potential(PotType a_ptype)
Definition Potential.h:35
RAII resource manager for the ARTn C library with global synchronization.