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/RDMatrix.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 int m_max_n_breit;
32
33public:
34 Goldstone(const std::vector<DiracSpinor> &basis,
35 const std::vector<DiracSpinor> &core, std::size_t i0,
36 std::size_t stride, std::size_t size, int n_min_core = 1,
37 bool include_G = false, const HF::Breit *Br = nullptr,
38 int max_n_breit = -1);
39
41 GMatrix Sigma_direct(int kappa_v, double en_v,
42 const std::vector<double> &fk = {},
43 const std::vector<double> &etak = {},
44 int n_max_core = 99) const;
45
46 // nb: can be a little faster by combining w/ direct?
47 GMatrix Sigma_exchange(int kappa_v, double en_v,
48 const std::vector<double> &fk = {}) const;
49
50 GMatrix Sigma_both(int kappa_v, double en_v,
51 const std::vector<double> &fk = {},
52 const std::vector<double> &etak = {},
53 int n_max_core = 99) const;
54
55 const std::pair<Basis, Basis> &basis() const { return m_basis; }
56 const Coulomb::YkTable &Yeh() const { return m_Yeh; }
57
58 std::size_t stride() const { return m_stride; }
59 int n_min() const { return m_n_min_core; }
60 int lmax() const { return DiracSpinor::max_l(m_basis.second); }
61
62private:
63 inline double get_k(int k, const std::vector<double> &f) const {
64 const auto sk = std::size_t(k);
65 return sk < f.size() ? f[sk] : 1.0;
66 }
67};
68
69} // 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:45
Many-body perturbation theory.
Definition CI_Integrals.hpp:9