eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
Create.hpp
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
#include "
eon/SurrogatePotential.h
"
14
15
#ifdef WITH_CATLEARN
16
#include "
eon/potentials/CatLearnPot/CatLearnPot.h
"
17
#endif
18
19
namespace
helpers::create
{
20
template
<
typename
... Args>
21
std::shared_ptr<SurrogatePotential>
22
makeSurrogatePotential
(
PotType
a_ptype,
const
Parameters
&a_params,
23
Args &&...a_args) {
24
switch
(a_ptype) {
25
// TODO: Every potential must know their own type
26
#ifdef WITH_CATLEARN
27
case
PotType::CatLearn
: {
28
return
(std::make_shared<CatLearnPot>(a_params));
29
break
;
30
}
31
#endif
32
default
:
33
throw
std::runtime_error(
34
"No known surrogate potential could be constructed"
);
35
break
;
36
}
37
}
38
}
// namespace helpers::create
CatLearnPot.h
SurrogatePotential.h
eonc::Parameters
Definition
Parameters.h:28
eonc::PotType
PotType
Definition
BaseStructures.h:36
eonc::PotType::CatLearn
@ CatLearn
Definition
BaseStructures.h:62
helpers::create
Definition
Create.hpp:19
helpers::create::makeSurrogatePotential
std::shared_ptr< SurrogatePotential > makeSurrogatePotential(PotType a_ptype, const Parameters &a_params, Args &&...a_args)
Definition
Create.hpp:22
include
eon
helpers
Create.hpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf