ampsci
High-precision calculations for one- and two-valence atomic systems
CoulombBreit.hpp
1#pragma once
2#include "Wavefunction/DiracSpinor.hpp"
3#include <vector>
4
5// Functions for computing Breit-related Coulomb integrals
6
7namespace Coulomb {
8
9//! Breit b^k function: (0,r) and (r,inf) part stored sepperately (in/out)
10void bk_ab(const int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
11 std::vector<double> &b0, std::vector<double> &binf,
12 const std::size_t maxi = 0);
13
14//! Breit g^k function: (0,r) + (r,inf) part stored together (in/out)
15void gk_ab(const int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
16 std::vector<double> &g0, std::vector<double> &ginf,
17 const std::size_t maxi = 0);
18
19/*!
20 @brief Frequency-dependent Breit screening function g^k_ab(r,w), X_ab density.
21 @details
22 Computes the frequency-dependent Breit screening function using the X_ab
23 radial density [arXiv:2602.17129](https://arxiv.org/abs/2602.17129):
24 \f[
25 X_{ab}(r) = f_a(r)\,g_b(r) + g_a(r)\,f_b(r).
26 \f]
27 The static radial kernel \f$r_<^k/r_>^{k+1}\f$ is replaced by the
28 frequency-dependent form:
29 \f[
30 \frac{r_<^k}{r_>^{k+1}} \to -\omega(2k+1)\,j_k(\omega r_<)\,y_k(\omega r_>),
31 \f]
32 where \f$j_k\f$ and \f$y_k\f$ are spherical Bessel functions of the first and
33 second kind.
34 This screening function enters the frequency-dependent \f$u^k_{abcd}\f$
35 integral.
36 The \f$(0,r)\f$ and \f$(r,\infty)\f$ parts of the inner integral are stored
37 separately in @p g0 and @p ginf.
38
39 Refer to [arXiv:2602.17129](https://arxiv.org/abs/2602.17129) for details.
40*/
41void gk_ab_freqw(const int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
42 std::vector<double> &g0, std::vector<double> &ginf,
43 const std::size_t maxi = 0, const double w = 0.0);
44
45/*!
46 @brief Frequency-dependent Breit screening function h^k_ab(r,w), Y_ab density.
47 @details
48 Same as gk_ab_freqw but uses the Y_ab radial density
49 [arXiv:2602.17129](https://arxiv.org/abs/2602.17129):
50 \f[
51 Y_{ab}(r) = f_a(r)\,g_b(r) - g_a(r)\,f_b(r),
52 \f]
53 with the same frequency-dependent kernel replacement:
54 \f[
55 \frac{r_<^k}{r_>^{k+1}} \to -\omega(2k+1)\,j_k(\omega r_<)\,y_k(\omega r_>).
56 \f]
57 Together with gk_ab_freqw, this is used to construct the \f$P^k\f$ and
58 \f$Q^k\f$ screening functions that enter the
59 \f$s^k_{abcd}\f$ and \f$t^k_{abcd}\f$ radial integrals.
60 The \f$(0,r)\f$ and \f$(r,\infty)\f$ parts are stored separately in @p g0 and @p ginf.
61
62 Refer to [arXiv:2602.17129](https://arxiv.org/abs/2602.17129) for details.
63*/
64void hk_ab_freqw(const int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
65 std::vector<double> &g0, std::vector<double> &ginf,
66 const std::size_t maxi = 0, const double w = 0.0);
67
68/*!
69 @brief Frequency-dependent Breit v^k_ab(r,w): four partial screening integrals.
70 @details
71 Computes the frequency-dependent replacement of the \f$v^k_{abcd}\f$ radial
72 integral [arXiv:2602.17129](https://arxiv.org/abs/2602.17129).
73 The \f$P^k_{ij}\f$ and \f$Q^k_{ij}\f$ densities are
74 constructed internally from @p Fi and @p Fj:
75 \f[
76 P^k_{ij}(r) = \frac{\kappa_i-\kappa_j}{k}\,X_{ij}(r) - Y_{ij}(r), \qquad
77 Q^k_{ij}(r) = \frac{\kappa_i-\kappa_j}{k+1}\,X_{ij}(r) + Y_{ij}(r).
78 \f]
79
80 The four outputs correspond to the four double-integral terms:
81 \f{align*}{
82 &-2\!\int_0^\infty\!\!dr_1\!\int_0^{r_1}\!\!dr_2
83 \left\{\left[\omega j_{k-1}(\omega r_<)y_{k+1}(\omega r_>)
84 + \tfrac{2k+1}{\omega^2}\tfrac{r_<^{k-1}}{r_>^{k+2}}\right]
85 Q^k_{ac}(r_1)P^k_{ij}(r_2)
86 + \omega j_{k+1}(\omega r_<)y_{k-1}(\omega r_>)
87 P^k_{ac}(r_1)Q^k_{ij}(r_2)\right\}\\
88 &-2\!\int_0^\infty\!\!dr_1\!\int_{r_1}^{\infty}\!\!dr_2
89 \left\{\left[\omega j_{k-1}(\omega r_<)y_{k+1}(\omega r_>)
90 + \tfrac{2k+1}{\omega^2}\tfrac{r_<^{k-1}}{r_>^{k+2}}\right]
91 P^k_{ac}(r_1)Q^k_{ij}(r_2)
92 + \omega j_{k+1}(\omega r_<)y_{k-1}(\omega r_>)
93 Q^k_{ac}(r_1)P^k_{ij}(r_2)\right\},
94 \f}
95 split as screening functions of \f$r_1\f$ (with \f$r_2\f$ integrated out):
96 - @p v1: \f$(0,r)\f$ integral over \f$P^k_{ij}\f$; contracted externally with \f$Q^k_{ac}(r)\f$
97 - @p v2: \f$(0,r)\f$ integral over \f$Q^k_{ij}\f$; contracted externally with \f$P^k_{ac}(r)\f$
98 - @p v3: \f$(r,\infty)\f$ integral over \f$Q^k_{ij}\f$; contracted externally with \f$P^k_{ac}(r)\f$
99 - @p v4: \f$(r,\infty)\f$ integral over \f$P^k_{ij}\f$; contracted externally with \f$Q^k_{ac}(r)\f$
100
101 Refer to [arXiv:2602.17129](https://arxiv.org/abs/2602.17129) for details.
102
103 @note For \f$\omega \leq \alpha\f$, a low-\f$\omega\f$ Taylor expansion of the
104 Bessel functions is used to avoid numerical cancellation from divergent
105 leading-order Bessel behaviour as \f$\omega\to 0\f$.
106*/
107void vk_ab_freqw(const int k, const DiracSpinor &Fi, const DiracSpinor &Fj,
108 const Grid &gr, std::vector<double> &v1,
109 std::vector<double> &v2, std::vector<double> &v3,
110 std::vector<double> &v4, std::size_t maxi, const double w);
111
112} // namespace Coulomb
Stores radial Dirac spinor: F_nk = (f, g)
Definition DiracSpinor.hpp:42
Holds grid, including type + Jacobian (dr/du)
Definition Grid.hpp:31
Functions (+classes) for computing Coulomb integrals.
Definition CoulombBreit.cpp:13
void gk_ab_freqw(const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, std::vector< double > &g0, std::vector< double > &ginf, const std::size_t maxi, const double w)
Frequency-dependent Breit screening function g^k_ab(r,w), X_ab density.
Definition CoulombBreit.cpp:373
void bk_ab(const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, std::vector< double > &b0, std::vector< double > &binf, std::size_t maxi)
Breit b^k function: (0,r) and (r,inf) part stored sepperately (in/out)
Definition CoulombBreit.cpp:309
void hk_ab_freqw(const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, std::vector< double > &b0, std::vector< double > &binf, std::size_t maxi, const double w)
Frequency-dependent Breit screening function h^k_ab(r,w), Y_ab density.
Definition CoulombBreit.cpp:386
void gk_ab(const int k, const DiracSpinor &Fa, const DiracSpinor &Fb, std::vector< double > &g0, std::vector< double > &ginf, const std::size_t maxi)
Breit g^k function: (0,r) + (r,inf) part stored together (in/out)
Definition CoulombBreit.cpp:341
void vk_ab_freqw(const int k, const DiracSpinor &Fi, const DiracSpinor &Fj, const Grid &gr, std::vector< double > &v1, std::vector< double > &v2, std::vector< double > &v3, std::vector< double > &v4, std::size_t maxi, const double w)
Frequency-dependent Breit v^k_ab(r,w): four partial screening integrals.
Definition CoulombBreit.cpp:399