Loading...
Searching...
No Matches
CatLearnPot.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#define PYBIND11_DETAILED_ERROR_MESSAGES
15
17
18#include <pybind11/eigen.h>
19#include <pybind11/embed.h>
20#include <pybind11/pybind11.h>
21
22namespace py = pybind11;
23
25
26public:
27 CatLearnPot(const eonc::Parameters &a_params);
28
29 // Functions
30 void train_optimize(const MatrixXd &features,
31 const MatrixXd &targets) override;
32 void force(long nAtoms, const double *positions, const int *atomicNrs,
33 double *forces, double *energy, double *variance,
34 const double *box) override;
35 [[nodiscard]] bool isThreadSafe() const noexcept override { return false; }
36 py::object m_gpmod;
37};
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition Eigen.h:33
void train_optimize(const MatrixXd &features, const MatrixXd &targets) override
void force(long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, double *variance, const double *box) override
py::object m_gpmod
Definition CatLearnPot.h:36
bool isThreadSafe() const noexcept override
Whether this potential's force() can be called from multiple threads on the SAME instance.
Definition CatLearnPot.h:35
CatLearnPot(const eonc::Parameters &a_params)