teqp
0.23.1
Toggle main menu visibility
Loading...
Searching...
No Matches
interface
CPP
model_factory_model_potentials.cpp
Go to the documentation of this file.
1
#include "
teqp/cpp/teqpcpp.hpp
"
2
#include "
teqp/cpp/deriv_adapter.hpp
"
3
4
#include "model_flags.hpp"
// Contains (optionally) macros to disable various models
5
6
#ifndef DISABLE_SQUAREWELL
7
#include "
teqp/models/model_potentials/squarewell.hpp
"
8
#endif
9
#ifndef DISABLE_EXP6
10
#include "
teqp/models/model_potentials/exp6.hpp
"
11
#endif
12
#ifndef DISABLE_2CLJF
13
#include "
teqp/models/model_potentials/2center_ljf.hpp
"
14
#endif
15
#ifndef DISABLE_MIE
16
#include "
teqp/models/mie/mie.hpp
"
17
#endif
18
19
namespace
teqp
{
20
namespace
cppinterface
{
21
using
teqp::cppinterface::adapter::make_owned
;
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
}
2center_ljf.hpp
teqp::FEANN::ChaparroJCP2023
Definition
mie.hpp:79
teqp::Mie::Mie6Pohl2023
Definition
mie.hpp:13
teqp::NotImplementedError
Definition
exceptions.hpp:45
teqp::exp6::Kataoka1992
Definition
exp6.hpp:19
teqp::squarewell::EspindolaHeredia2009
Definition
squarewell.hpp:31
deriv_adapter.hpp
exp6.hpp
mie.hpp
teqp::cppinterface::adapter::make_owned
auto make_owned(const TemplatedModel &tmodel)
Definition
deriv_adapter.hpp:259
teqp::cppinterface
Definition
deriv_adapter.hpp:15
teqp::cppinterface::make_Mie_Pohl2023
std::unique_ptr< teqp::cppinterface::AbstractModel > make_Mie_Pohl2023(const nlohmann::json &spec)
Definition
model_factory_model_potentials.cpp:44
teqp::cppinterface::make_2CLJF
std::unique_ptr< teqp::cppinterface::AbstractModel > make_2CLJF(const nlohmann::json &spec)
Definition
model_factory_model_potentials.cpp:60
teqp::cppinterface::make_2CLJF_Dipole
std::unique_ptr< teqp::cppinterface::AbstractModel > make_2CLJF_Dipole(const nlohmann::json &spec)
Definition
model_factory_model_potentials.cpp:63
teqp::cppinterface::make_SW_EspindolaHeredia2009
std::unique_ptr< teqp::cppinterface::AbstractModel > make_SW_EspindolaHeredia2009(const nlohmann::json &spec)
Definition
model_factory_model_potentials.cpp:24
teqp::cppinterface::make_EXP6_Kataoka1992
std::unique_ptr< teqp::cppinterface::AbstractModel > make_EXP6_Kataoka1992(const nlohmann::json &spec)
Definition
model_factory_model_potentials.cpp:34
teqp::cppinterface::make_2CLJF_Quadrupole
std::unique_ptr< teqp::cppinterface::AbstractModel > make_2CLJF_Quadrupole(const nlohmann::json &spec)
Definition
model_factory_model_potentials.cpp:66
teqp::cppinterface::make_Mie_Chaparro2023
std::unique_ptr< teqp::cppinterface::AbstractModel > make_Mie_Chaparro2023(const nlohmann::json &spec)
Definition
model_factory_model_potentials.cpp:47
teqp::twocenterljf::build_two_center_model
auto build_two_center_model(const std::string &model_version, const double &L=0.0)
Definition
2center_ljf.hpp:410
teqp::twocenterljf::build_two_center_model_dipole
auto build_two_center_model_dipole(const std::string &model_version, const double &L=0.0, const double &mu_sq=0.0)
Definition
2center_ljf.hpp:429
teqp::twocenterljf::build_two_center_model_quadrupole
auto build_two_center_model_quadrupole(const std::string &model_version, const double &L=0.0, const double &Q_sq=0.0)
Definition
2center_ljf.hpp:447
teqp
Definition
ancillary_builder.hpp:8
squarewell.hpp
teqpcpp.hpp
Generated by
1.17.0