2#include "Angular/CkTable.hpp"
3#include "Angular/SixJTable.hpp"
4#include "Coulomb/YkTable.hpp"
5#include "IO/FRW_fileReadWrite.hpp"
6#include "MBPT/Feynman.hpp"
7#include "MBPT/Goldstone.hpp"
8#include "MBPT/SpinorMatrix.hpp"
9#include "Wavefunction/DiracSpinor.hpp"
18 SpinorMatrix<double> Sigma;
23enum class SigmaMethod { Goldstone, Feynman };
28 std::size_t stride{4};
33class CorrelationPotential {
35 std::vector<DiracSpinor> m_basis;
36 std::vector<SigmaData> m_Sigmas{};
39 std::size_t m_i0, m_size;
45 bool m_includeBreit_b2;
48 std::optional<Goldstone> m_Gold{};
50 FeynmanOptions m_Foptions;
52 std::vector<double> m_fk;
53 std::vector<double> m_etak;
55 std::optional<Feynman> m_Fy{};
58 std::optional<Feynman> m_Fy0{};
59 std::optional<Feynman> m_FyX{};
60 std::optional<Feynman> m_FyH{};
62 std::string m_fname{};
65 CorrelationPotential(
const std::string &fname,
const HF::HartreeFock *vHF,
66 const std::vector<DiracSpinor> &basis,
double r0,
67 double rmax, std::size_t stride,
int n_min_core,
68 SigmaMethod method,
bool include_g =
false,
69 bool include_Breit_b2 =
false,
int n_max_breit = 0,
70 const FeynmanOptions &Foptions = {},
71 bool calculate_fk =
true,
72 const std::vector<double> &fk = {},
73 const std::vector<double> &etak = {});
78 void formSigma(
int kappa,
double ev,
int n,
const DiracSpinor *Fv =
nullptr);
80 bool empty()
const {
return m_Sigmas.empty(); }
82 const GMatrix *getSigma(
int kappa,
int n = 0)
const;
84 double getLambda(
int kappa,
int n = 0)
const;
86 void clear() { m_Sigmas.clear(); }
94 void scale_Sigma(
const std::vector<double> &lambdas);
97 void scale_Sigma(
double lambda,
int kappa,
int n = 0);
100 void print_scaling()
const;
103 void print_info()
const;
106 void print_subGrid()
const;
108 void write(
const std::string &fname) { read_write(fname, IO::FRW::write); }
111 bool read_write(
const std::string &fname, IO::FRW::RoW rw);
112 void setup_Feynman();
113 std::vector<double> calculate_fk(
double ev,
const DiracSpinor &v)
const;
114 std::vector<double> calculate_etak(
double ev,
const DiracSpinor &v)
const;
115 const SigmaData *get(
int kappa,
int n = 0)
const;
117 GMatrix formSigma_F(
int kappa,
double ev,
const DiracSpinor *Fv =
nullptr);
118 GMatrix formSigma_G(
int kappa,
double ev,
const DiracSpinor *Fv =
nullptr);
121 CorrelationPotential &operator=(
const CorrelationPotential &) =
default;
122 CorrelationPotential(
const CorrelationPotential &) =
default;
123 ~CorrelationPotential() =
default;
Stores radial Dirac spinor: F_nk = (f, g)
Definition DiracSpinor.hpp:41
Solves relativistic Hartree-Fock equations for core and valence. Optionally includes Breit and QED ef...
Definition HartreeFock.hpp:70
Many-body perturbation theory.
Definition CI_Integrals.hpp:9