Loading...
Searching...
No Matches
NestedEngineOracle.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) gpridge developers
3// See LICENSE for details.
4
5#ifndef GPR_POTENTIALS_NESTEDENGINEORACLE_H_
6#define GPR_POTENTIALS_NESTEDENGINEORACLE_H_
7
8#include <cstddef>
9#include <memory>
10#include <string>
11#include <vector>
12
13#include "ActiveGP.h"
14#include "EnginePotential.h"
15
16namespace pot {
17
32public:
36 static std::unique_ptr<NestedEngineOracle> open(
37 const std::string& library, const std::vector<unsigned char>& config,
38 std::string& err);
39
43
45 [[nodiscard]] ActiveGP::OracleFn asOracle();
46
47 [[nodiscard]] const std::string& library() const noexcept;
48
49private:
50 NestedEngineOracle() = default;
51
52 std::unique_ptr<EnginePotential> engine_;
53};
54
60std::string engineLibraryForSpecArm(const std::string& arm_name);
61
62} // namespace pot
63
64#endif
std::function< int(long n_atoms, const double *positions, const int *atomic_nrs, const double *box, double *energy, double *forces)> OracleFn
Definition ActiveGP.h:59
const std::string & library() const noexcept
ActiveGP::OracleFn asOracle()
Ground truth in the shape ActiveGP consumes.
NestedEngineOracle(const NestedEngineOracle &)=delete
static std::unique_ptr< NestedEngineOracle > open(const std::string &library, const std::vector< unsigned char > &config, std::string &err)
NestedEngineOracle & operator=(const NestedEngineOracle &)=delete
Potential wrappers and the batched oracle interface.
std::string engineLibraryForSpecArm(const std::string &arm)
STL namespace.