High-precision calculations for one- and two-valence atomic systems
MBPT::CorrelationPotential

ok

Correlation potential, Sigma, for valence states.

Core-valence correlations, stored as a non-local matrix for each kappa, on a radial sub-grid (every stride-th point of the full grid, between r0 and rmax). Formed at a given energy (see formSigma). Read from file if it exists, so it need only be formed once (see write).

Direct diagrams are formed using either the Goldstone (basis sum) or Feynman (Green's function) technique; the Feynman technique allows all-order inclusion of screening and the hole-particle interaction. Exchange diagrams always use Goldstone, with optional effective screening factors fk.

The action of Sigma on a state (SigmaFv) includes:

  • lambda scaling, \( \Sigma \to \lambda\Sigma \) (see scale_Sigma)
  • ladder correction, \( \Sigma_L \), if a ladder file was given
  • large-r tail, \( a_{\rm eff}/r^4 \), beyond the sub-grid, if tail_extrapolation is set (experimental; see fit_tail_coefficient)

Optionally also forms the energy derivative, \( \partial\Sigma/\partial\varepsilon \) (see dSigmaFv).

Note
Not thread safe: formSigma modifies internal state.

#include <CorrelationPotential.hpp>

Public Member Functions

 CorrelationPotential (const std::string &fname, const HF::HartreeFock *vHF, const std::vector< DiracSpinor > &basis, double r0, double rmax, std::size_t stride, int n_min_core, SigmaMethod method, bool include_g=false, bool include_Breit_b2=false, int n_max_breit=0, const FeynmanOptions &Foptions={}, bool calculate_fk=true, const std::vector< double > &fk={}, const std::vector< double > &etak={}, const std::string &ladder_file="", bool form_derivative=false, bool fk_both_lines=false, bool tail_extrapolation=false)
 Reads Sigma from file if it exists; otherwise sets up to form it.
 
void formSigma (int kappa, double ev, int n, const DiracSpinor *Fv=nullptr)
 Forms and stores Sigma for given kappa, at energy ev.
 
bool empty () const
 True if no Sigma matrices are stored.
 
const GMatrix * getSigma (int kappa, int n=0) const
 Pointer to the stored Sigma matrix for given kappa (and n).
 
double getLambda (int kappa, int n=0) const
 Scaling factor, lambda, for given kappa (and n); 1 if not present.
 
void clear ()
 Removes all stored Sigma matrices (not ladder or dSigma/dE)
 
DiracSpinor SigmaFv (const DiracSpinor &Fv) const
 Returns Sigma|Fv>, including lambda scaling, ladder, and tail.
 
DiracSpinor operator() (const DiracSpinor &Fv) const
 Same as SigmaFv.
 
void print_de (const std::vector< DiracSpinor > &valence)
 Prints MBPT(2) energy correction for each valence state.
 
void print_tail (const std::vector< DiracSpinor > &valence) const
 Prints a_eff for each valence state with a fitted large-r tail.
 
bool has_derivative () const
 True if any dSigma/dE matrices are present (see form_derivative)
 
const SigmaData * get_derivative (int kappa, int n=0) const
 Pointer to dSigma/dE data for given kappa (and n); nullptr if not present.
 
DiracSpinor dSigmaFv (const DiracSpinor &Fv) const
 Returns lambda * dSigma/dE |Fv>.
 
void scale_Sigma (const std::vector< double > &lambdas)
 Stores scaling factors, lambda, for each stored Sigma.
 
void scale_Sigma (double lambda, int kappa, int n=0)
 Stores scaling factor, lambda, for Sigma with given kappa and n.
 
void print_scaling () const
 Prints the scaling factors to screen.
 
void print_info () const
 Prints kappa, energy, lambda, and if dSigma/dE exists, for each Sigma.
 
std::string method_string () const
 Short string identifying the method (main differences only).
 
std::string lambda_string () const
 Fitting (scaling) factors as a string, "kappa=value,".
 
std::vector< double > average_fk (int l_max=2) const
 Average of the stored fk screening factors, over l up to l_max.
 
void print_subGrid () const
 Prints the sub-grid parameters to screen.
 
void write (const std::string &fname)
 Writes Sigma matrices to file fname.
 
const SigmaData * get (int kappa, int n=0) const
 Pointer to the stored Sigma data for given kappa (and n).
 
CorrelationPotential & operator= (const CorrelationPotential &)=default
 
 CorrelationPotential (const CorrelationPotential &)=default
 

Constructor & Destructor Documentation

◆ CorrelationPotential()

MBPT::CorrelationPotential::CorrelationPotential ( const std::string &  fname,
const HF::HartreeFock *  vHF,
const std::vector< DiracSpinor > &  basis,
double  r0,
double  rmax,
std::size_t  stride,
int  n_min_core,
SigmaMethod  method,
bool  include_g = false,
bool  include_Breit_b2 = false,
int  n_max_breit = 0,
const FeynmanOptions &  Foptions = {},
bool  calculate_fk = true,
const std::vector< double > &  fk = {},
const std::vector< double > &  etak = {},
const std::string &  ladder_file = "",
bool  form_derivative = false,
bool  fk_both_lines = false,
bool  tail_extrapolation = false 
)

Reads Sigma from file if it exists; otherwise sets up to form it.

If fname exists, Sigma is read from it. Otherwise, sets up the Goldstone/Feynman method; Sigma itself is only formed by formSigma. The ladder file, if given, is read in either case.

Parameters
fnameSigma file (read if it exists; see write)
vHFHartree-Fock (core, grid, Breit). Pointer is stored: must outlive this object
basisBasis for the Goldstone sums (and print_de)
r0Sub-grid first point (aB)
rmaxSub-grid last point (aB)
strideSub-grid stride: every stride-th point of the full grid
n_min_coreMinimum n of core states included in polarisation (lower core states are frozen)
methodGoldstone or Feynman, for direct diagrams
include_gInclude small-component (fg, gf, gg) parts of Sigma
include_Breit_b2Include two-body Breit (B2) correction (only if vHF includes Breit)
n_max_breitMaximum n of excited states in the B2 correction (0: all)
FoptionsOptions for the Feynman method (screening, hole-particle, etc.)
calculate_fkCalculate fk screening factors for exchange, for each state (Feynman, with screening); else fk used
fkEffective screening factors, for each multipole k
etakEffective hole-particle factors, for each k (Goldstone only)
ladder_fileFile with ladder correction, Sigma_L (empty: none)
form_derivativeAlso form dSigma/dE (see dSigmaFv)
fk_both_linesApply fk to both Coulomb lines of the exchange diagrams (else outer only)
tail_extrapolationExtrapolate Sigma beyond the sub-grid as a_eff/r^4 (experimental; see fit_tail_coefficient)
Note
If read from file, the sub-grid and include_g are taken from the file, not the inputs.

Member Function Documentation

◆ formSigma()

void MBPT::CorrelationPotential::formSigma ( int  kappa,
double  ev,
int  n,
const DiracSpinor *  Fv = nullptr 
)

Forms and stores Sigma for given kappa, at energy ev.

If Sigma already exists for kappa and n (any n if n <= 0), it is not re-formed; only the tail fit and dSigma/dE are added if required and missing (e.g., Sigma read from file).

Parameters
kappaDirac quantum number
evEnergy at which Sigma is formed
nPrincipal quantum number: allows distinct Sigma for each n of the same kappa
FvState Sigma is formed for (optional): used to calculate fk screening factors, fit the large-r tail, and print the energy shift. Must have kappa = kappa.
Warning
Not thread safe.

◆ empty()

bool MBPT::CorrelationPotential::empty ( ) const
inline

True if no Sigma matrices are stored.

◆ getSigma()

const GMatrix * MBPT::CorrelationPotential::getSigma ( int  kappa,
int  n = 0 
) const

Pointer to the stored Sigma matrix for given kappa (and n).

See get() for the choice of n.

Returns
Pointer to the Sigma matrix; nullptr if not present.
Note
The raw matrix: does not include lambda, the ladder part, or the large-r tail (use SigmaFv for those).

◆ getLambda()

double MBPT::CorrelationPotential::getLambda ( int  kappa,
int  n = 0 
) const

Scaling factor, lambda, for given kappa (and n); 1 if not present.

◆ clear()

void MBPT::CorrelationPotential::clear ( )
inline

Removes all stored Sigma matrices (not ladder or dSigma/dE)

◆ SigmaFv()

DiracSpinor MBPT::CorrelationPotential::SigmaFv ( const DiracSpinor &  Fv) const

Returns Sigma|Fv>, including lambda scaling, ladder, and tail.

\( \lambda (\Sigma + \Sigma_L) \ket{F_v} \): scaled by lambda, and includes the ladder correction \( \Sigma_L \) if present. Includes the large-r tail if it was fitted (see tail_extrapolation option).

Returns
Sigma|Fv>; |0> if neither Sigma nor Sigma_L exists for kappa_v.

◆ operator()()

DiracSpinor MBPT::CorrelationPotential::operator() ( const DiracSpinor &  Fv) const
inline

Same as SigmaFv.

◆ print_de()

void MBPT::CorrelationPotential::print_de ( const std::vector< DiracSpinor > &  valence)

Prints MBPT(2) energy correction for each valence state.

Direct, exchange, and total, and \( \langle v|\Sigma|v \rangle \) using the stored Sigma matrix.

◆ print_tail()

void MBPT::CorrelationPotential::print_tail ( const std::vector< DiracSpinor > &  valence) const

Prints a_eff for each valence state with a fitted large-r tail.

Also prints \( \langle v|\Sigma|v \rangle \) without (S0) and with (S) the tail. Prints nothing if tail_extrapolation is off.

◆ has_derivative()

bool MBPT::CorrelationPotential::has_derivative ( ) const
inline

True if any dSigma/dE matrices are present (see form_derivative)

◆ get_derivative()

const SigmaData * MBPT::CorrelationPotential::get_derivative ( int  kappa,
int  n = 0 
) const

Pointer to dSigma/dE data for given kappa (and n); nullptr if not present.

◆ dSigmaFv()

DiracSpinor MBPT::CorrelationPotential::dSigmaFv ( const DiracSpinor &  Fv) const

Returns lambda * dSigma/dE |Fv>.

\( \lambda \, (\partial\Sigma/\partial\varepsilon) \ket{F_v} \). The energy derivative of Sigma, formed by finite difference alongside Sigma itself (option form_derivative), so it corresponds to the actual method used (Goldstone/Feynman, screening, etc.). Scaled by the same lambda as the base Sigma.

Returns
lambda * dSigma/dE |Fv>; |0> if no derivative exists for this kappa.
Note
The ladder correction (Sigma_L) has no energy derivative: it is included in SigmaFv() but not here.

◆ scale_Sigma() [1/2]

void MBPT::CorrelationPotential::scale_Sigma ( const std::vector< double > &  lambdas)

Stores scaling factors, lambda, for each stored Sigma.

\( \Sigma \to \lambda\Sigma \). One factor for each stored Sigma, in the order they were formed.

◆ scale_Sigma() [2/2]

void MBPT::CorrelationPotential::scale_Sigma ( double  lambda,
int  kappa,
int  n = 0 
)

Stores scaling factor, lambda, for Sigma with given kappa and n.

\( \Sigma \to \lambda\Sigma \). If n <= 0, for all Sigma with given kappa.

◆ print_scaling()

void MBPT::CorrelationPotential::print_scaling ( ) const

Prints the scaling factors to screen.

◆ print_info()

void MBPT::CorrelationPotential::print_info ( ) const

Prints kappa, energy, lambda, and if dSigma/dE exists, for each Sigma.

◆ method_string()

std::string MBPT::CorrelationPotential::method_string ( ) const

Short string identifying the method (main differences only).

E.g., "Feynman, all-order" or "Goldstone". Intended for file-cache keys.

◆ lambda_string()

std::string MBPT::CorrelationPotential::lambda_string ( ) const

Fitting (scaling) factors as a string, "kappa=value,".

Rounded to 4 dp; empty if none scaled. For file-cache keys (e.g., the ci-file hash).

◆ average_fk()

std::vector< double > MBPT::CorrelationPotential::average_fk ( int  l_max = 2) const

Average of the stored fk screening factors, over l up to l_max.

Averaged over the lowest Sigma of each l. For re-use of the Sigma_1 screening in Sigma_2 (CI), where there is one effective fk per Coulomb line but no unique state: the low-l factors are the relevant ones for the CI valence space (higher-l factors can differ significantly, e.g., f/g at k = 0, but such states rarely contribute). Weighted by l, not kappa: the fine-structure pair of each l is averaged first, then the mean is taken over the ls (so s counts the same as p, d, ...). Truncated to the shortest stored list.

Parameters
l_maxMaximum l included in the average (CI uses 2: s, p, d).
Returns
Averaged fk, for each k; empty if none stored.

◆ print_subGrid()

void MBPT::CorrelationPotential::print_subGrid ( ) const

Prints the sub-grid parameters to screen.

◆ write()

void MBPT::CorrelationPotential::write ( const std::string &  fname)
inline

Writes Sigma matrices to file fname.

Includes the sub-grid, dSigma/dE, and fk. Not written: lambda, a_eff (re-fitted in formSigma), or the ladder correction.

◆ get()

const SigmaData * MBPT::CorrelationPotential::get ( int  kappa,
int  n = 0 
) const

Pointer to the stored Sigma data for given kappa (and n).

If n <= 0, the first stored Sigma with given kappa. Otherwise, the one with given n; if none, the nearest lower n, else the first with given kappa.

Returns
Pointer to Sigma data (matrix, energy formed at, lambda, etc.); nullptr if not present.
Note
Sigma matrix is raw (no lambda, ladder, or tail; see SigmaFv).

The documentation for this class was generated from the following files: