Loading...
Searching...
No Matches
SurrogatePotential.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 "Potential.h"
15
16namespace eonc {
17
19
20public:
21 SurrogatePotential(PotType a_ptype, const Parameters &a_params)
22 : Potential(a_ptype, a_params) {}
23 virtual ~SurrogatePotential() = default;
24 [[nodiscard]] bool isSurrogate() const noexcept override { return true; }
25 std::tuple<double, AtomMatrix, double> // energy, forces, energy variance
26 get_ef_var(const AtomMatrix pos, const VectorXi atmnrs, const Matrix3d box);
27 virtual void train_optimize(const MatrixXd &a_features,
28 const MatrixXd &a_targets) = 0;
29};
30
31} // namespace eonc
32
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition Eigen.h:33
Eigen::Matrix< double, 3, 3, eOnStorageOrder > Matrix3d
Definition Eigen.h:35
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
Potential(PotType a_ptype)
Definition Potential.h:35
virtual void train_optimize(const MatrixXd &a_features, const MatrixXd &a_targets)=0
bool isSurrogate() const noexcept override
Whether this is a surrogate (GP) potential.
std::tuple< double, AtomMatrix, double > get_ef_var(const AtomMatrix pos, const VectorXi atmnrs, const Matrix3d box)
virtual ~SurrogatePotential()=default
SurrogatePotential(PotType a_ptype, const Parameters &a_params)
RAII resource manager for the ARTn C library with global synchronization.