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/RDMatrix.hpp"
9#include "Wavefunction/DiracSpinor.hpp"
18 RDMatrix<double> Sigma;
23enum class SigmaMethod { Goldstone, Feynman };
28 std::size_t stride{4};
47class CorrelationPotential {
49 std::vector<DiracSpinor> m_basis;
50 std::vector<SigmaData> m_Sigmas{};
53 std::size_t m_i0, m_size;
62 std::optional<Goldstone> m_Gold{};
64 FeynmanOptions m_Foptions;
66 std::vector<double> m_fk;
67 std::vector<double> m_etak;
69 std::optional<Feynman> m_Fy{};
72 std::optional<Feynman> m_Fy0{};
73 std::optional<Feynman> m_FyX{};
74 std::optional<Feynman> m_FyH{};
77 CorrelationPotential(
const std::string &fname,
const HF::HartreeFock *vHF,
78 const std::vector<DiracSpinor> &basis,
double r0,
79 double rmax, std::size_t stride,
int n_min_core,
80 SigmaMethod method,
bool include_g =
false,
81 bool include_Breit =
false,
int n_max_breit = 0,
82 const FeynmanOptions &Foptions = {},
83 bool calculate_fk =
true,
84 const std::vector<double> &fk = {},
85 const std::vector<double> &etak = {},
86 std::optional<int> n_min_core_F = {});
91 void formSigma(
int kappa,
double ev,
int n,
const DiracSpinor *Fv =
nullptr);
93 bool empty()
const {
return m_Sigmas.empty(); }
95 const GMatrix *getSigma(
int kappa,
int n = 0)
const;
97 double getLambda(
int kappa,
int n = 0)
const;
99 void clear() { m_Sigmas.clear(); }
107 void scale_Sigma(
const std::vector<double> &lambdas);
110 void scale_Sigma(
double lambda,
int kappa,
int n = 0);
113 void print_scaling()
const;
116 void print_info()
const;
119 void print_subGrid()
const;
121 void write(
const std::string &fname) { read_write(fname, IO::FRW::write); }
124 bool read_write(
const std::string &fname, IO::FRW::RoW rw);
125 void setup_Feynman();
126 std::vector<double> calculate_fk(
double ev,
const DiracSpinor &v)
const;
127 std::vector<double> calculate_etak(
double ev,
const DiracSpinor &v)
const;
128 const SigmaData *get(
int kappa,
int n = 0)
const;
130 GMatrix formSigma_F(
int kappa,
double ev,
const DiracSpinor *Fv =
nullptr);
131 GMatrix formSigma_G(
int kappa,
double ev,
const DiracSpinor *Fv =
nullptr);
134 CorrelationPotential &operator=(
const CorrelationPotential &) =
default;
135 CorrelationPotential(
const CorrelationPotential &) =
default;
136 ~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