eOn 3.2.0
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
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
16
#include "
eon/SurrogatePotential.h
"
17
18
#include <pybind11/eigen.h>
19
#include <pybind11/embed.h>
20
#include <pybind11/pybind11.h>
21
22
namespace
py = pybind11;
23
24
class
CatLearnPot
:
public
eonc::SurrogatePotential
{
25
26
public
:
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
};
MatrixXd
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition
Eigen.h:33
SurrogatePotential.h
CatLearnPot::train_optimize
void train_optimize(const MatrixXd &features, const MatrixXd &targets) override
Definition
CatLearnPot.cpp:32
CatLearnPot::force
void force(long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, double *variance, const double *box) override
Definition
CatLearnPot.cpp:38
CatLearnPot::m_gpmod
py::object m_gpmod
Definition
CatLearnPot.h:36
CatLearnPot::isThreadSafe
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::CatLearnPot
CatLearnPot(const eonc::Parameters &a_params)
Definition
CatLearnPot.cpp:17
eonc::Parameters
Definition
Parameters.h:35
eonc::SurrogatePotential
Definition
SurrogatePotential.h:18
include
eon
potentials
CatLearnPot
CatLearnPot.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf