ampsci
c++ program for high-precision atomic structure calculations of single-valence systems
Loading...
Searching...
No Matches
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//------------------------------------------------------------------------------
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
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 GMatrix Sigma_exchange(int kappa_v, double en_v,
46 const std::vector<double> &fk = {}) const;
47
48 // Calculate both parts of correlation potential.
49 GMatrix Sigma_both(int kappa_v, double en_v,
50 const std::vector<double> &fk = {},
51 const std::vector<double> &etak = {},
52 int n_max_core = 99) const;
53
54 // Calculates 2-body Breit correction to correlation potential. Must have Breit
55 GMatrix dSigma_Breit2(int kappa_v, double en_v,
56 const std::vector<double> &fk = {},
57 const std::vector<double> &etak = {},
58 int n_max_core = 99, int m_max_n_breit = -1) const;
59
60 const std::pair<Basis, Basis> &basis() const { return m_basis; }
61 const Coulomb::YkTable &Yeh() const { return m_Yeh; }
62
63 std::size_t stride() const { return m_stride; }
64 int n_min() const { return m_n_min_core; }
65 int lmax() const { return DiracSpinor::max_l(m_basis.second); }
66
67private:
68 inline double get_k(int k, const std::vector<double> &f) const {
69 const auto sk = std::size_t(k);
70 return sk < f.size() ? f[sk] : 1.0;
71 }
72};
73
74} // namespace MBPT
Calculates + stores Hartree Y functions + Angular (w/ look-up), taking advantage of symmetry.
Definition YkTable.hpp:26
static int max_l(const std::vector< DiracSpinor > &orbs)
Returns maximum l found in {orbs}.
Definition DiracSpinor.cpp:272
Breit (Hartree-Fock Breit) interaction potential.
Definition Breit.hpp:52
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:33
Many-body perturbation theory.
Definition CI_Integrals.hpp:9