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"
13
14namespace eonc {
15
17
19public:
21 explicit MetatomicDynPot(const eonc::Parameters &params);
24 ~MetatomicDynPot() override;
25
26 void force(long nAtoms, const double *positions, const int *atomicNrs,
27 double *forces, double *energy, double *variance,
28 const double *box) override;
29
30 [[nodiscard]] bool isThreadSafe() const noexcept override { return false; }
31 [[nodiscard]] bool needsPerImageInstance() const noexcept override {
32 return false;
33 }
34
35private:
38};
39
40} // namespace eonc
void force(long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, double *variance, const double *box) override
bool needsPerImageInstance() const noexcept override
Whether NEB should create separate Potential instances per image for true parallel force evaluation.
IMetatomicLoader & loader_
bool isThreadSafe() const noexcept override
Whether this potential's force() can be called from multiple threads on the SAME instance.
MetatomicDynPot(const eonc::Parameters &params)
Production: process-default MetatomicLoader::instance().
RAII resource manager for the ARTn C library with global synchronization.