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
14
15#ifdef WITH_CATLEARN
17#endif
18
19namespace helpers::create {
20template <typename... Args>
21std::shared_ptr<SurrogatePotential>
22makeSurrogatePotential(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
std::shared_ptr< SurrogatePotential > makeSurrogatePotential(PotType a_ptype, const Parameters &a_params, Args &&...a_args)
Definition Create.hpp:22