High-precision calculations for one- and two-valence atomic systems
DiracContinuum.hpp
1#pragma once
2#include "Maths/Hypergeometric.hpp" // for has_flint
3#include <utility>
4
5/*!
6 @brief Exact relativistic continuum (en > 0) hydrogen-like (Coulomb)
7 wavefunctions
8
9 @details In the form
10 \f[
11 \psi_{\en\kappa m}(\vb{r}) = \frac{1}{r}
12 \begin{pmatrix} f_{\en\kappa}(r)\,\Omega_{\kappa m}(\hat n) \\
13 i\,g_{\en\kappa}(r)\,\Omega_{-\kappa,m}(\hat n) \end{pmatrix},
14 \f]
15
16 normalised on the energy scale,
17
18 \f[
19 \int_0^\infty (f_\en f_{\en'} + g_\en g_{\en'})\,dr
20 = \delta(\en - \en').
21 \f]
22
23 See Methods for full definitions.
24
25 \par Non-relativistic limit
26 Passing \f$ \alpha \le 0 \f$ selects the non-relativistic limit directly:
27 the large component reduces to the energy-normalised Coulomb function
28 (f = P_el, see @ref P_el), the small component vanishes (g = 0). This path
29 does not require FLINT.
30
31 @note Requires the FLINT library (for confluent hypergeometric functions of
32 complex argument); available at compile time via the constexpr flag
33 DiracContinuum::available. (Not required for the non-relativistic limit.)
34
35 @warning Without FLINT, calling f and g may abort, or return NaN.
36 Use @ref DiracContinuum::available to check if available.
37
38 The optional electron mass parameter @p m defaults to 1 (atomic units).
39 The full relativistic energy is E = m*c^2 + en = m/alpha^2 + en, with
40 en > 0 for continuum states.
41*/
42namespace DiracContinuum {
43
44//! True if compiled with FLINT support; f, g, and fg return NaN otherwise
46
47//! Relativistic factor gamma = Sqrt[kappa^2 - (aZ)^2]
48double gamma(int kappa, double zeff, double alpha);
49
50/*!
51 @brief Equivalent momentum: pe = Sqrt[en*(2m + en*alpha^2)].
52 @details @p en is the energy without rest mass (en > 0); @p m is the
53 electron mass (default 1 a.u.).
54*/
55double pe(double en, double alpha, double m = 1.0);
56
57/*!
58 @brief Both radial components {f, g} at radius r.
59 @details More efficient than separate calls to f() and g(), since the
60 (expensive) hypergeometric factors are shared. For \f$ \alpha \le 0 \f$
61 returns the non-relativistic limit {P_el, 0} (see @ref P_el), which does not
62 require FLINT.
63 @return std::pair {f, g}
64 @note alpha <= 0 selects the non-relativistic limit: f = P_el, g = 0
65 @warning For alpha > 0: prints a warning and returns {NaN, NaN} if compiled
66 without FLINT (see DiracContinuum::available)
67*/
68std::pair<double, double> fg(double r, double en, int kappa, double zeff,
69 double alpha, double m = 1.0);
70
71/*!
72 @brief Upper (large) radial component.
73 @details @p m is the electron mass (default 1 a.u.).
74 @note alpha <= 0 selects the non-relativistic limit: f = P_el
75*/
76double f(double r, double en, int kappa, double zeff, double alpha,
77 double m = 1.0);
78
79/*!
80 @brief Lower (small) radial component.
81 @details @p m is the electron mass (default 1 a.u.).
82 @note alpha <= 0 selects the non-relativistic limit: g = 0
83*/
84double g(double r, double en, int kappa, double zeff, double alpha,
85 double m = 1.0);
86
87/*!
88 @brief Large-r asymptotic form of f.
89 @details f ~ Sqrt[pe/(pi*en)] * cos(pe*r + nu*ln(2*pe*r) - Delta).
90 Does not require FLINT.
91*/
92double f_asymptotic(double r, double en, int kappa, double zeff, double alpha,
93 double m = 1.0);
94
95/*!
96 @brief Large-r asymptotic form of g.
97 @details g ~ -alpha * Sqrt[en/(pi*pe)] * sin(pe*r + nu*ln(2*pe*r) - Delta).
98 Does not require FLINT.
99*/
100double g_asymptotic(double r, double en, int kappa, double zeff, double alpha,
101 double m = 1.0);
102
103/*!
104 @brief Nonrelativistic continuum radial function, energy normalised.
105 @details P_el = Sqrt[2m/(pi*p)] * F_l(-Z*m/p, p*r), with p = Sqrt[2*m*en]
106 and F_l the regular Coulomb function. Does not require FLINT.
107*/
108double P_el(double r, double en, int l, double zeff, double m = 1.0);
109
110} // namespace DiracContinuum
Exact relativistic continuum (en > 0) hydrogen-like (Coulomb) wavefunctions.
Definition DiracContinuum.cpp:12
double f(double r, double en, int kappa, double zeff, double alpha, double m)
Upper (large) radial component.
Definition DiracContinuum.cpp:147
double f_asymptotic(double r, double en, int kappa, double zeff, double alpha, double m)
Large-r asymptotic form of f.
Definition DiracContinuum.cpp:157
double gamma(int kappa, double zeff, double alpha)
Relativistic factor gamma = Sqrt[kappa^2 - (aZ)^2].
Definition DiracContinuum.cpp:78
constexpr bool available
True if compiled with FLINT support; f, g, and fg return NaN otherwise.
Definition DiracContinuum.hpp:45
double pe(double en, double alpha, double m)
Equivalent momentum: pe = Sqrt[en*(2m + en*alpha^2)].
Definition DiracContinuum.cpp:84
double g_asymptotic(double r, double en, int kappa, double zeff, double alpha, double m)
Large-r asymptotic form of g.
Definition DiracContinuum.cpp:167
double P_el(double r, double en, int l, double zeff, double m)
Nonrelativistic continuum radial function, energy normalised.
Definition DiracContinuum.cpp:177
std::pair< double, double > fg(double r, double en, int kappa, double zeff, double alpha, double m)
Both radial components {f, g} at radius r.
Definition DiracContinuum.cpp:89
double g(double r, double en, int kappa, double zeff, double alpha, double m)
Lower (small) radial component.
Definition DiracContinuum.cpp:152
constexpr bool has_flint
True if compiled with FLINT support; complex H1f1 returns zero otherwise.
Definition Hypergeometric.hpp:8