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;
22 std::vector<double> fk{};
25enum class SigmaMethod { Goldstone, Feynman };
30 std::size_t stride{4};
35class CorrelationPotential {
37 std::vector<DiracSpinor> m_basis;
38 std::vector<SigmaData> m_Sigmas{};
41 std::size_t m_i0, m_size;
47 bool m_includeBreit_b2;
50 std::optional<Goldstone> m_Gold{};
52 FeynmanOptions m_Foptions;
54 std::vector<double> m_fk;
55 std::vector<double> m_etak;
59 std::optional<Feynman> m_Fy{};
62 std::optional<Feynman> m_Fy0{};
63 std::optional<Feynman> m_FyX{};
64 std::optional<Feynman> m_FyH{};
66 std::string m_fname{};
72 std::vector<SigmaData> m_Sigma_L{};
73 std::string m_ladder_file{};
78 bool m_form_derivative{
false};
79 std::vector<SigmaData> m_dSigma{};
80 static constexpr double m_delta_en = 0.01;
85 const std::vector<DiracSpinor> &basis,
double r0,
double rmax,
86 std::size_t stride,
int n_min_core, SigmaMethod method,
87 bool include_g =
false,
bool include_Breit_b2 =
false,
int n_max_breit = 0,
88 const FeynmanOptions &Foptions = {},
bool calculate_fk =
true,
89 const std::vector<double> &fk = {},
const std::vector<double> &etak = {},
90 const std::string &ladder_file =
"",
bool form_derivative =
false,
91 bool fk_both_lines =
false);
96 void formSigma(
int kappa,
double ev,
int n,
const DiracSpinor *Fv =
nullptr);
98 bool empty()
const {
return m_Sigmas.empty(); }
100 const GMatrix *getSigma(
int kappa,
int n = 0)
const;
102 double getLambda(
int kappa,
int n = 0)
const;
104 void clear() { m_Sigmas.clear(); }
113 void print_de(
const std::vector<DiracSpinor> &valence);
116 bool has_derivative()
const {
return !m_dSigma.empty(); }
119 const SigmaData *get_derivative(
int kappa,
int n = 0)
const;
136 void scale_Sigma(
const std::vector<double> &lambdas);
139 void scale_Sigma(
double lambda,
int kappa,
int n = 0);
142 void print_scaling()
const;
145 void print_info()
const;
149 std::string method_string()
const;
153 std::string lambda_string()
const;
169 std::vector<double> average_fk(
int l_max = 2)
const;
172 void print_subGrid()
const;
174 void write(
const std::string &fname) { read_write(fname, IO::FRW::write); }
178 const SigmaData *get(
int kappa,
int n = 0)
const;
181 bool read_write(
const std::string &fname, IO::FRW::RoW rw);
182 void setup_Feynman();
183 std::vector<double> calculate_fk(
double ev,
const DiracSpinor &v)
const;
184 std::vector<double> calculate_etak(
double ev,
const DiracSpinor &v)
const;
185 const SigmaData *get_ladder(
int kappa,
int n = 0)
const;
190 GMatrix formSigma_F(
int kappa,
double ev,
const DiracSpinor *Fv =
nullptr,
191 const std::vector<double> *given_fk =
nullptr,
193 GMatrix formSigma_G(
int kappa,
double ev,
const DiracSpinor *Fv =
nullptr,
199 std::optional<std::vector<double>> state_fk(
double ev,
const DiracSpinor *Fv);
204 void form_derivative(
int kappa,
double ev,
int n,
const DiracSpinor *Fv,
205 const GMatrix &Sigma0,
206 const std::vector<double> *given_fk =
nullptr);
209 CorrelationPotential &operator=(
const CorrelationPotential &) =
default;
210 CorrelationPotential(
const CorrelationPotential &) =
default;
211 ~CorrelationPotential() =
default;
Stores radial Dirac spinor: F_nk = (f, g)
Definition DiracSpinor.hpp:44
Solves relativistic Hartree-Fock equations for core and valence. Optionally includes Breit and QED ef...
Definition HartreeFock.hpp:111
Many-body perturbation theory.
Definition MatrixElements.hpp:12