eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
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
16
namespace
eonc
{
17
18
class
SurrogatePotential
:
public
Potential
{
19
20
public
:
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
33
using
eonc::SurrogatePotential
;
MatrixXd
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition
Eigen.h:33
Matrix3d
Eigen::Matrix< double, 3, 3, eOnStorageOrder > Matrix3d
Definition
Eigen.h:35
AtomMatrix
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition
Eigen.h:37
Potential.h
eonc::Parameters
Definition
Parameters.h:28
eonc::Potential::Potential
Potential(PotType a_ptype)
Definition
Potential.h:35
eonc::SurrogatePotential
Definition
SurrogatePotential.h:18
eonc::SurrogatePotential::train_optimize
virtual void train_optimize(const MatrixXd &a_features, const MatrixXd &a_targets)=0
eonc::SurrogatePotential::isSurrogate
bool isSurrogate() const noexcept override
Whether this is a surrogate (GP) potential.
Definition
SurrogatePotential.h:24
eonc::SurrogatePotential::get_ef_var
std::tuple< double, AtomMatrix, double > get_ef_var(const AtomMatrix pos, const VectorXi atmnrs, const Matrix3d box)
Definition
SurrogatePotential.cpp:15
eonc::SurrogatePotential::~SurrogatePotential
virtual ~SurrogatePotential()=default
eonc::SurrogatePotential::SurrogatePotential
SurrogatePotential(PotType a_ptype, const Parameters &a_params)
Definition
SurrogatePotential.h:21
eonc
RAII resource manager for the ARTn C library with global synchronization.
Definition
ARTnSaddleSearch.cpp:19
eonc::PotType
PotType
Definition
BaseStructures.h:36
include
eon
SurrogatePotential.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf