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"
28 std::vector<double>
fk{};
51 std::size_t n_fit = 10,
double f_cut = 1.0e-2);
78 std::size_t stride{4};
110 std::vector<DiracSpinor> m_basis;
111 std::vector<SigmaData> m_Sigmas{};
113 std::size_t m_stride;
114 std::size_t m_i0, m_size;
120 bool m_includeBreit_b2;
123 std::optional<Goldstone> m_Gold{};
127 std::vector<double> m_fk;
128 std::vector<double> m_etak;
130 bool m_fk_both_lines;
132 std::optional<Feynman> m_Fy{};
135 std::optional<Feynman> m_Fy0{};
136 std::optional<Feynman> m_FyX{};
137 std::optional<Feynman> m_FyH{};
139 std::string m_fname{};
145 std::vector<SigmaData> m_Sigma_L{};
146 std::string m_ladder_file{};
151 bool m_form_derivative{
false};
152 std::vector<SigmaData> m_dSigma{};
153 static constexpr double m_delta_en = 0.01;
159 bool m_tail_extrapolation{
false};
210 const std::vector<DiracSpinor> &basis,
double r0,
double rmax,
211 std::size_t stride,
int n_min_core,
SigmaMethod method,
212 bool include_g =
false,
bool include_Breit_b2 =
false,
int n_max_breit = 0,
214 const std::vector<double> &fk = {},
const std::vector<double> &etak = {},
215 const std::string &ladder_file =
"",
bool form_derivative =
false,
216 bool fk_both_lines =
false,
bool tail_extrapolation =
false);
239 bool empty()
const {
return m_Sigmas.empty(); }
255 double getLambda(
int kappa,
int n = 0)
const;
281 void print_de(
const std::vector<DiracSpinor> &valence);
290 void print_tail(
const std::vector<DiracSpinor> &valence)
const;
323 void scale_Sigma(
const std::vector<double> &lambdas);
332 void scale_Sigma(
double lambda,
int kappa,
int n = 0);
374 std::vector<double>
average_fk(
int l_max = 2)
const;
386 void write(
const std::string &fname) { read_write(fname, IO::FRW::write); }
404 bool read_write(
const std::string &fname, IO::FRW::RoW rw);
405 void setup_Feynman();
406 std::vector<double> calculate_fk(
double ev,
const DiracSpinor &v)
const;
407 std::vector<double> calculate_etak(
double ev,
const DiracSpinor &v)
const;
408 const SigmaData *get_ladder(
int kappa,
int n = 0)
const;
414 const std::vector<double> *given_fk =
nullptr,
422 std::optional<std::vector<double>> state_fk(
double ev,
const DiracSpinor *Fv);
427 void form_derivative(
int kappa,
double ev,
int n,
const DiracSpinor *Fv,
429 const std::vector<double> *given_fk =
nullptr);
Stores radial Dirac spinor: F_nk = (f, g)
Definition DiracSpinor.hpp:55
Solves relativistic Hartree-Fock equations for core and valence. Optionally includes Breit and QED ef...
Definition HartreeFock.hpp:114
Correlation potential, Sigma, for valence states.
Definition CorrelationPotential.hpp:108
void print_scaling() const
Prints the scaling factors to screen.
Definition CorrelationPotential.cpp:723
const GMatrix * getSigma(int kappa, int n=0) const
Pointer to the stored Sigma matrix for given kappa (and n).
Definition CorrelationPotential.cpp:632
void print_info() const
Prints kappa, energy, lambda, and if dSigma/dE exists, for each Sigma.
Definition CorrelationPotential.cpp:962
const SigmaData * get(int kappa, int n=0) const
Pointer to the stored Sigma data for given kappa (and n).
Definition CorrelationPotential.cpp:619
void scale_Sigma(const std::vector< double > &lambdas)
Stores scaling factors, lambda, for each stored Sigma.
Definition CorrelationPotential.cpp:705
const SigmaData * get_derivative(int kappa, int n=0) const
Pointer to dSigma/dE data for given kappa (and n); nullptr if not present.
Definition CorrelationPotential.cpp:627
DiracSpinor SigmaFv(const DiracSpinor &Fv) const
Returns Sigma|Fv>, including lambda scaling, ladder, and tail.
Definition CorrelationPotential.cpp:644
double getLambda(int kappa, int n=0) const
Scaling factor, lambda, for given kappa (and n); 1 if not present.
Definition CorrelationPotential.cpp:638
std::vector< double > average_fk(int l_max=2) const
Average of the stored fk screening factors, over l up to l_max.
Definition CorrelationPotential.cpp:902
void formSigma(int kappa, double ev, int n, const DiracSpinor *Fv=nullptr)
Forms and stores Sigma for given kappa, at energy ev.
Definition CorrelationPotential.cpp:160
DiracSpinor operator()(const DiracSpinor &Fv) const
Same as SigmaFv.
Definition CorrelationPotential.hpp:272
DiracSpinor dSigmaFv(const DiracSpinor &Fv) const
Returns lambda * dSigma/dE |Fv>.
Definition CorrelationPotential.cpp:694
bool has_derivative() const
True if any dSigma/dE matrices are present (see form_derivative)
Definition CorrelationPotential.hpp:293
void write(const std::string &fname)
Writes Sigma matrices to file fname.
Definition CorrelationPotential.hpp:386
void print_subGrid() const
Prints the sub-grid parameters to screen.
Definition CorrelationPotential.cpp:742
void print_tail(const std::vector< DiracSpinor > &valence) const
Prints a_eff for each valence state with a fitted large-r tail.
Definition CorrelationPotential.cpp:232
void clear()
Removes all stored Sigma matrices (not ladder or dSigma/dE)
Definition CorrelationPotential.hpp:258
void print_de(const std::vector< DiracSpinor > &valence)
Prints MBPT(2) energy correction for each valence state.
Definition CorrelationPotential.cpp:662
bool empty() const
True if no Sigma matrices are stored.
Definition CorrelationPotential.hpp:239
std::string lambda_string() const
Fitting (scaling) factors as a string, "kappa=value,".
Definition CorrelationPotential.cpp:950
std::string method_string() const
Short string identifying the method (main differences only).
Definition CorrelationPotential.cpp:876
Direct correlation potential diagrams via the Feynman technique.
Definition Feynman.hpp:87
Second-order correlation potential, Sigma, from Goldstone diagrams.
Definition Goldstone.hpp:28
Radial Dirac spinor matrix.
Definition SpinorMatrix.hpp:57
Many-body perturbation theory.
Definition MatrixElements.hpp:12
double a_eff
Coefficient of large-r tail, Sigma = a_eff/r^4 beyond sub-grid (0: none)
Definition CorrelationPotential.hpp:30
void add_tail(DiracSpinor *SigmaFn, const GMatrix &Sigma, const DiracSpinor &Fn, double a_eff)
Adds the large-r polarisation tail of Sigma to SigmaFn.
Definition CorrelationPotential.cpp:289
std::vector< double > fk
fk screening factors used for this Sigma (empty if none)
Definition CorrelationPotential.hpp:28
double lambda
Scaling factor, Sigma -> lambda*Sigma; not applied to the stored matrix.
Definition CorrelationPotential.hpp:26
SpinorMatrix< double > Sigma
Sigma matrix, on the sub-grid.
Definition CorrelationPotential.hpp:22
double fit_tail_coefficient(const GMatrix &Sigma, const DiracSpinor &Fv, std::size_t n_fit, double f_cut)
Fits the coefficient a_eff of the large-r polarisation tail of Sigma.
Definition CorrelationPotential.cpp:254
double en
Energy Sigma was formed at.
Definition CorrelationPotential.hpp:20
int n
Principal quantum number of the state Sigma was formed for (0: none given)
Definition CorrelationPotential.hpp:24
SigmaMethod
Method used to form the direct Sigma diagrams.
Definition CorrelationPotential.hpp:72
int kappa
Dirac quantum number of the state Sigma was formed for.
Definition CorrelationPotential.hpp:18
Options for the Feynman method (see Feynman)
Definition Feynman.hpp:28
Stored Sigma matrix, with the parameters it was formed with.
Definition CorrelationPotential.hpp:16
Sigma sub-grid parameters: range (aB) and stride (of full grid)
Definition CorrelationPotential.hpp:75