teqp 0.23.1
Loading...
Searching...
No Matches
model_factory_model_potentials.cpp
Go to the documentation of this file.
3
4#include "model_flags.hpp" // Contains (optionally) macros to disable various models
5
6#ifndef DISABLE_SQUAREWELL
8#endif
9#ifndef DISABLE_EXP6
11#endif
12#ifndef DISABLE_2CLJF
14#endif
15#ifndef DISABLE_MIE
17#endif
18
19namespace teqp{
20 namespace cppinterface{
22
23#ifndef DISABLE_SQUAREWELL
24 std::unique_ptr<teqp::cppinterface::AbstractModel> make_SW_EspindolaHeredia2009(const nlohmann::json &spec){
25 return make_owned(squarewell::EspindolaHeredia2009(spec.at("lambda")));
26 }
27#else
28 std::unique_ptr<teqp::cppinterface::AbstractModel> make_SW_EspindolaHeredia2009(const nlohmann::json &){
29 throw teqp::NotImplementedError("The squarewell model from Espindola-Heredia has been disabled");
30 }
31#endif
32
33#ifndef DISABLE_EXP6
34 std::unique_ptr<teqp::cppinterface::AbstractModel> make_EXP6_Kataoka1992(const nlohmann::json &spec){
35 return make_owned(exp6::Kataoka1992(spec.at("alpha")));
36 }
37#else
38 std::unique_ptr<teqp::cppinterface::AbstractModel> make_EXP6_Kataoka1992(const nlohmann::json &){
39 throw teqp::NotImplementedError("The EXP-6 model from Espindola-Heredia has been disabled");
40 }
41#endif
42
43#ifndef DISABLE_MIE
44 std::unique_ptr<teqp::cppinterface::AbstractModel> make_Mie_Pohl2023(const nlohmann::json &spec){
45 return make_owned(Mie::Mie6Pohl2023(spec.at("lambda_r")));
46 }
47 std::unique_ptr<teqp::cppinterface::AbstractModel> make_Mie_Chaparro2023(const nlohmann::json &spec){
48 return make_owned(FEANN::ChaparroJCP2023(spec.at("lambda_r"), spec.at("lambda_a")));
49 }
50#else
51 std::unique_ptr<teqp::cppinterface::AbstractModel> make_Mie_Pohl2023(const nlohmann::json &){
52 throw teqp::NotImplementedError("The Mie model from Pohl has been disabled");
53 }
54 std::unique_ptr<teqp::cppinterface::AbstractModel> make_Mie_Chaparro2023(const nlohmann::json &){
55 throw teqp::NotImplementedError("The Mie model from Chaparro has been disabled");
56 }
57#endif
58
59#ifndef DISABLE_2CLJF
60 std::unique_ptr<teqp::cppinterface::AbstractModel> make_2CLJF(const nlohmann::json &spec){
61 return make_owned(twocenterljf::build_two_center_model(spec.at("author"), spec.at("L^*")));
62 }
63 std::unique_ptr<teqp::cppinterface::AbstractModel> make_2CLJF_Dipole(const nlohmann::json &spec){
64 return make_owned(twocenterljf::build_two_center_model_dipole(spec.at("author"), spec.at("L^*"), spec.at("(mu^*)^2")));
65 }
66 std::unique_ptr<teqp::cppinterface::AbstractModel> make_2CLJF_Quadrupole(const nlohmann::json &spec){
67 return make_owned(twocenterljf::build_two_center_model_quadrupole(spec.at("author"), spec.at("L^*"), spec.at("(Q^*)^2")));
68 }
69#else
70 std::unique_ptr<teqp::cppinterface::AbstractModel> make_2CLJF(const nlohmann::json &){
71 throw teqp::NotImplementedError("The 2CLJF model has been disabled");
72 }
73 std::unique_ptr<teqp::cppinterface::AbstractModel> make_2CLJF_Dipole(const nlohmann::json &){
74 throw teqp::NotImplementedError("The 2CLJF+dipole model has been disabled");
75 }
76 std::unique_ptr<teqp::cppinterface::AbstractModel> make_2CLJF_Quadrupole(const nlohmann::json &){
77 throw teqp::NotImplementedError("The 2CLJF+quadrupole model has been disabled");
78 }
79#endif
80 }
81}
auto make_owned(const TemplatedModel &tmodel)
std::unique_ptr< teqp::cppinterface::AbstractModel > make_Mie_Pohl2023(const nlohmann::json &spec)
std::unique_ptr< teqp::cppinterface::AbstractModel > make_2CLJF(const nlohmann::json &spec)
std::unique_ptr< teqp::cppinterface::AbstractModel > make_2CLJF_Dipole(const nlohmann::json &spec)
std::unique_ptr< teqp::cppinterface::AbstractModel > make_SW_EspindolaHeredia2009(const nlohmann::json &spec)
std::unique_ptr< teqp::cppinterface::AbstractModel > make_EXP6_Kataoka1992(const nlohmann::json &spec)
std::unique_ptr< teqp::cppinterface::AbstractModel > make_2CLJF_Quadrupole(const nlohmann::json &spec)
std::unique_ptr< teqp::cppinterface::AbstractModel > make_Mie_Chaparro2023(const nlohmann::json &spec)
auto build_two_center_model(const std::string &model_version, const double &L=0.0)
auto build_two_center_model_dipole(const std::string &model_version, const double &L=0.0, const double &mu_sq=0.0)
auto build_two_center_model_quadrupole(const std::string &model_version, const double &L=0.0, const double &Q_sq=0.0)