High-precision calculations for one- and two-valence atomic systems
Goldstone.hpp
1#pragma once
2#include "Coulomb/YkTable.hpp"
3#include "HF/Breit.hpp"
4#include "HF/HartreeFock.hpp"
5#include "MBPT/SpinorMatrix.hpp"
6#include "Maths/Grid.hpp"
7#include "Wavefunction/DiracSpinor.hpp"
8#include <memory>
9#include <vector>
10
11namespace MBPT {
12
13//------------------------------------------------------------------------------
14/*!
15 @brief Second-order correlation potential, Sigma, from Goldstone diagrams.
16
17 @details
18 Forms the second-order correlation potential for a valence state, as a
19 non-local matrix on a radial sub-grid (every stride-th point of the full
20 grid), by direct summation over a finite basis of internal core (hole) and
21 excited states. Direct and exchange diagrams, with optional effective
22 screening (fk) and hole-particle (etak) factors, and the two-body Breit
23 correction.
24
25 Used by CorrelationPotential: for all diagrams (Goldstone method), or for
26 the exchange and Breit diagrams only (Feynman method).
27*/
28class Goldstone {
29
30 // Pointer to shared radial grid (full grid)
31 std::shared_ptr<const Grid> m_grid;
32
33 using Basis = std::vector<DiracSpinor>;
34 std::pair<Basis, Basis> m_basis;
35 Coulomb::YkTable m_Yeh;
36
37 // Parameters of the sub-grid: initial/final points, stride
38 std::size_t m_i0, m_stride, m_subgrid_points;
39
40 int m_n_min_core;
41 bool m_include_G;
42
43 std::optional<HF::Breit> m_Br{};
44
45public:
46 /*!
47 @brief Splits basis into internal holes and excited states; forms Yk table.
48
49 @details
50 Basis states found in @p core with n >= @p n_min_core are the internal
51 holes; basis states not in @p core are the excited states. Calculates the
52 Yk integrals for each excited-hole pair.
53
54 @param basis Basis for internal lines (core and excited states);
55 must not be empty
56 @param core Core states: used to split @p basis into holes and
57 excited states
58 @param i0 Full-grid index of the first sub-grid point
59 @param stride Sub-grid stride: every stride-th point of the full grid
60 @param size Number of sub-grid points
61 @param n_min_core Minimum n of core states included as internal holes
62 (lower core states are frozen)
63 @param include_G Include small-component (fg, gf, gg) parts of Sigma
64 @param Br Breit operator, for dSigma_Breit2 (copied; nullptr:
65 none)
66 */
67 Goldstone(const std::vector<DiracSpinor> &basis,
68 const std::vector<DiracSpinor> &core, std::size_t i0,
69 std::size_t stride, std::size_t size, int n_min_core = 1,
70 bool include_G = false, const HF::Breit *Br = nullptr);
71
72 /*!
73 @brief Calculate Direct part of correlation potential.
74
75 @details
76 Direct diagrams, summed over internal holes and excited states, at energy
77 @p en_v. Each multipolarity k is scaled by fk[k] * etak[k].
78
79 @param kappa_v Dirac quantum number of the valence state
80 @param en_v Energy at which Sigma is formed
81 @param fk Effective screening factors, for each multipole k
82 (missing: 1)
83 @param etak Effective hole-particle factors, for each k (missing:
84 1)
85 @param n_max_core Maximum n of internal hole states (<= 0: all)
86
87 @return Direct part of Sigma, on the sub-grid.
88 */
89 GMatrix Sigma_direct(int kappa_v, double en_v,
90 const std::vector<double> &fk = {},
91 const std::vector<double> &etak = {},
92 int n_max_core = 99) const;
93
94 /*!
95 @brief Calculate Exchange part of correlation potential.
96
97 @details
98 @p fk are effective screening factors, applied to the multipole k of the
99 outer Coulomb line; with @p fk_both_lines, also to the multipole of the
100 inner line (inside \f$ P^k \f$), i.e., \f$ f_k f_l \f$.
101
102 @return Exchange part of Sigma, on the sub-grid.
103 */
104 GMatrix Sigma_exchange(int kappa_v, double en_v,
105 const std::vector<double> &fk = {},
106 bool fk_both_lines = false) const;
107
108 /*!
109 @brief Calculate both parts (direct + exchange) of correlation potential.
110
111 @details
112 Direct and exchange diagrams formed together, in a single sum. Parameters
113 as for Sigma_direct() and Sigma_exchange(); here, @p n_max_core applies to
114 both the direct and exchange diagrams.
115
116 @return Direct plus exchange parts of Sigma, on the sub-grid.
117 */
118 GMatrix Sigma_both(int kappa_v, double en_v,
119 const std::vector<double> &fk = {},
120 const std::vector<double> &etak = {}, int n_max_core = 99,
121 bool fk_both_lines = false) const;
122
123 /*!
124 @brief Calculates 2-body Breit correction to correlation potential.
125
126 @details
127 Second-order diagrams with one Coulomb line replaced by the two-body
128 Breit interaction (factor of 2: either line), including direct and
129 exchange parts. Each multipolarity k is scaled by fk[k]; etak[k] scales
130 the direct part only.
131
132 @param kappa_v Dirac quantum number of the valence state
133 @param en_v Energy at which Sigma is formed
134 @param fk Effective screening factors, for each multipole k
135 @param etak Effective hole-particle factors, for each k (direct
136 part only)
137 @param n_max_core Maximum n of internal hole states (<= 0: all)
138 @param max_n_breit Maximum n of internal excited states (<= 0: all)
139
140 @return Breit correction to Sigma, on the sub-grid.
141
142 @note Must have Breit: returns zero if no Breit operator was given to the
143 constructor.
144 */
145 GMatrix dSigma_Breit2(int kappa_v, double en_v,
146 const std::vector<double> &fk = {},
147 const std::vector<double> &etak = {},
148 int n_max_core = 99, int max_n_breit = -1) const;
149
150 //! Internal {holes, excited} states (holes: core states with n >= n_min)
151 const std::pair<Basis, Basis> &basis() const { return m_basis; }
152 //! Yk table for each excited-hole pair
153 const Coulomb::YkTable &Yeh() const { return m_Yeh; }
154
155 //! Sub-grid stride: every stride-th point of the full grid
156 std::size_t stride() const { return m_stride; }
157 //! Minimum n of core states included as internal holes
158 int n_min() const { return m_n_min_core; }
159 //! Maximum l of the internal excited states
160 int lmax() const { return DiracSpinor::max_l(m_basis.second); }
161
162private:
163 inline double get_k(int k, const std::vector<double> &f) const {
164 const auto sk = std::size_t(k);
165 return sk < f.size() ? f[sk] : 1.0;
166 }
167};
168
169} // namespace MBPT
Calculates + stores Hartree Y functions + Angular (w/ look-up), taking advantage of symmetry.
Definition YkTable.hpp:46
static int max_l(const std::vector< DiracSpinor > &orbs)
Returns maximum l found in {orbs}.
Definition DiracSpinor.cpp:360
Breit potentials for one- (Hartree-Fock Breit) and two-body Breit integrals.
Definition Breit.hpp:88
Second-order correlation potential, Sigma, from Goldstone diagrams.
Definition Goldstone.hpp:28
GMatrix dSigma_Breit2(int kappa_v, double en_v, const std::vector< double > &fk={}, const std::vector< double > &etak={}, int n_max_core=99, int max_n_breit=-1) const
Calculates 2-body Breit correction to correlation potential.
Definition Goldstone.cpp:291
const Coulomb::YkTable & Yeh() const
Yk table for each excited-hole pair.
Definition Goldstone.hpp:153
int lmax() const
Maximum l of the internal excited states.
Definition Goldstone.hpp:160
GMatrix Sigma_both(int kappa_v, double en_v, const std::vector< double > &fk={}, const std::vector< double > &etak={}, int n_max_core=99, bool fk_both_lines=false) const
Calculate both parts (direct + exchange) of correlation potential.
Definition Goldstone.cpp:126
std::size_t stride() const
Sub-grid stride: every stride-th point of the full grid.
Definition Goldstone.hpp:156
const std::pair< Basis, Basis > & basis() const
Internal {holes, excited} states (holes: core states with n >= n_min)
Definition Goldstone.hpp:151
GMatrix Sigma_direct(int kappa_v, double en_v, const std::vector< double > &fk={}, const std::vector< double > &etak={}, int n_max_core=99) const
Calculate Direct part of correlation potential.
Definition Goldstone.cpp:37
GMatrix Sigma_exchange(int kappa_v, double en_v, const std::vector< double > &fk={}, bool fk_both_lines=false) const
Calculate Exchange part of correlation potential.
Definition Goldstone.cpp:210
int n_min() const
Minimum n of core states included as internal holes.
Definition Goldstone.hpp:158
Many-body perturbation theory.
Definition MatrixElements.hpp:12