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//! Class to construct Feynman diagrams, Green's functions and polarisation op.
15class Goldstone {
16
17 // Pointer to shared radial grid (full grid)
18 std::shared_ptr<const Grid> m_grid;
19
20 using Basis = std::vector<DiracSpinor>;
21 std::pair<Basis, Basis> m_basis;
22 Coulomb::YkTable m_Yeh;
23
24 // Parameters of the sub-grid: initial/final points, stride
25 std::size_t m_i0, m_stride, m_subgrid_points;
26
27 int m_n_min_core;
28 bool m_include_G;
29
30 std::optional<HF::Breit> m_Br{};
31
32public:
33 Goldstone(const std::vector<DiracSpinor> &basis,
34 const std::vector<DiracSpinor> &core, std::size_t i0,
35 std::size_t stride, std::size_t size, int n_min_core = 1,
36 bool include_G = false, const HF::Breit *Br = nullptr);
37
38 //! Calculate Direct part of correlation potential
39 GMatrix Sigma_direct(int kappa_v, double en_v,
40 const std::vector<double> &fk = {},
41 const std::vector<double> &etak = {},
42 int n_max_core = 99) const;
43
44 //! Calculate Exchange part of correlation potential.
45 //! @details fk are effective screening factors, applied to the multipole k
46 //! of the outer Coulomb line; with fk_both_lines, also to the multipole of
47 //! the inner line (inside P^k), i.e., f_k * f_l.
48 GMatrix Sigma_exchange(int kappa_v, double en_v,
49 const std::vector<double> &fk = {},
50 bool fk_both_lines = false) const;
51
52 // Calculate both parts of correlation potential.
53 GMatrix Sigma_both(int kappa_v, double en_v,
54 const std::vector<double> &fk = {},
55 const std::vector<double> &etak = {}, int n_max_core = 99,
56 bool fk_both_lines = false) const;
57
58 // Calculates 2-body Breit correction to correlation potential. Must have Breit
59 GMatrix dSigma_Breit2(int kappa_v, double en_v,
60 const std::vector<double> &fk = {},
61 const std::vector<double> &etak = {},
62 int n_max_core = 99, int m_max_n_breit = -1) const;
63
64 const std::pair<Basis, Basis> &basis() const { return m_basis; }
65 const Coulomb::YkTable &Yeh() const { return m_Yeh; }
66
67 std::size_t stride() const { return m_stride; }
68 int n_min() const { return m_n_min_core; }
69 int lmax() const { return DiracSpinor::max_l(m_basis.second); }
70
71private:
72 inline double get_k(int k, const std::vector<double> &f) const {
73 const auto sk = std::size_t(k);
74 return sk < f.size() ? f[sk] : 1.0;
75 }
76};
77
78} // 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:279
Breit potentials for one- (Hartree-Fock Breit) and two-body Breit integrals.
Definition Breit.hpp:88
Class to construct Feynman diagrams, Green's functions and polarisation op.
Definition Goldstone.hpp:15
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
Many-body perturbation theory.
Definition MatrixElements.hpp:12