High-precision calculations for one- and two-valence atomic systems
Sigma2.hpp
1#pragma once
2#include "Angular/SixJTable.hpp"
3#include "Coulomb/QkTable.hpp"
4#include "Wavefunction/DiracSpinor.hpp"
5#include "qip/String.hpp"
6#include <string>
7#include <vector>
8
9namespace MBPT {
10
11/*! @brief Type of energy denominators: DFK, BW, RS, Fermi, Fermi0
12
13 - DFK : Dzuba-Flambaum-Kozlov convention (Brillouin-Wigner-like, with the target-state energy approximated by the lowest configuration). The external leg belonging to the target state is evaluated at the Fermi level (lowest state for its kappa in excited spectrum); the external leg appearing in the intermediate state keeps its actual orbital energy. Retains state dependence, with no danger of accidental enhancement.
14 - BW : Brillouin-Wigner: the denominator is E0 - E_intermediate, where E0 is the total valence energy of the target CI level, and E_intermediate is the total zeroth-order energy of the many-body state between the two Coulomb vertices: the sum of orbital energies of the particles present, minus the holes (e.g., diagram 'a': E_int = e_v + e_y + e_n - e_a). In practice, the target-state leg of DFK is replaced by (E0 - e_s), where e_s is the other valence orbital in that diagram's intermediate state. DFK is this with E0 approximated by the leading configuration, E0 -> e_bar_target + e_s. Requires E0.
15 - RS : Use actual orbital energies for both external legs. May be danger of accidental enhancement.
16 - Fermi : Both external legs evaluated at the Fermi level for their kappa.
17 - Fermi0 : As above, but assume Fermi level for all kappas the same. These often cancel, so there is no (excited-excited) term in denominator (except diagram d). Fine, since the remaining core-excited always dominates.
18
19In each case, each diagram is averaged with its bra-ket partner,
200.5*(1/de + 1/de'), so that S^k (and hence the CI matrix) is symmetric.
21This is the Hermitian effective Hamiltonian, correct to
22this order in PT. For Fermi0 and BW the two partners coincide identically
23(BW uses the target energy for both bra and ket), so the average does nothing.
24
25Energy for internal legs (hole-particle) always actual orbtials.
26*/
27enum class Denominators { RS, Fermi, Fermi0, DFK, BW };
28
29//! Returns string representation of Denominators enum
30std::string parse_Denominators(Denominators d);
31
32//! Parses string to Denominators enum (case-insensitive); returns DFK if unrecognised
33Denominators parse_Denominators(std::string_view s);
34
35/*!
36 @brief External-leg part of a Sigma_2 energy denominator (diagrams a, b,
37 c1, c2).
38 @details
39 Each of these diagrams has denominator (e_a - e_n) + leg_de, where a/n are
40 the internal hole/excited states (always actual energies), and leg_de is
41 the contribution of the two external legs, (e_target - e_intermediate).
42 The "target" leg is the external leg whose energy slot represents the
43 target-state energy; the "intermediate" leg is the external leg that is
44 part of the intermediate state (the state between the two Coulomb
45 vertices). Which energy fills each slot depends on the \ref Denominators
46 mode:
47
48 - RS : et - ei (actual orbital energies)
49 - Fermi : et_bar - ei_bar (Fermi-level energies, see \ref e_bar)
50 - Fermi0 : 0 (the legs cancel)
51 - DFK : et_bar - ei
52 - BW : (E0 - es) - ei. The target slot is not a single orbital
53 energy: the whole denominator is E0 - E_intermediate, with
54 E_int = es + ei + e_n - e_a, so the target slot becomes
55 (E0 - es), where es is the other valence orbital in the
56 intermediate state.
57
58 Diagram d has all four valence orbitals in its intermediate state and is
59 handled separately (see \ref Sigma2::S_Sigma2_d).
60
61 @param denominators Denominator mode; see \ref MBPT::Denominators.
62 @param et_bar Fermi-level energy (e_bar of its kappa) of the target leg.
63 @param et Actual orbital energy of the target leg.
64 @param ei_bar Fermi-level energy of the intermediate-state leg.
65 @param ei Actual orbital energy of the intermediate-state leg.
66 @param es Energy of the other valence orbital in the intermediate
67 state (the remaining external leg); used only by BW.
68 @param E0 Total valence energy of the target CI level; used only by
69 BW.
70 @return External-leg part of the energy denominator.
71*/
72double leg_de(Denominators denominators, double et_bar, double et,
73 double ei_bar, double ei, double es, double E0);
74
75/*!
76 @brief Splits the basis into the core (holes) and excited states.
77 @details
78 States with energy below @p E_Fermi are considered core/holes.
79 Only core states with \f$ n \geq \f$ @p min_n_core, and excited states with
80 \f$ n \leq \f$ @p max_n_excited are kept.
81
82 @note Negative energy states not dealt with! Assumed not to be present in basis. Fix?
83
84 @note Replace all instances with \ref DiracSpinor::split_by_energy
85
86 @param basis Full set of single-particle basis states.
87 @param E_Fermi Energy threshold separating core from excited states.
88 @param min_n_core Minimum principal quantum number for core states.
89 @param max_n_excited Maximum principal quantum number for excited states.
90
91 @return Pair {core, excited} of DiracSpinor vectors.
92*/
93std::pair<std::vector<DiracSpinor>, std::vector<DiracSpinor>>
94split_basis(const std::vector<DiracSpinor> &basis, double E_Fermi,
95 int min_n_core = 1, int max_n_excited = 999);
96
97/*!
98 @brief Reduced two-body Sigma (2nd-order correlation) operator matrix element.
99 @details
100 Computes \f$ S^k_{vwxy} \f$, the reduced matrix element of the two-body
101 second-order correlation (Sigma_2) operator, summed over all 9 Goldstone
102 diagrams.
103
104 \f[
105 \begin{equation*}
106 \begin{split}
107 \Sigma^2_{vwxy}
108 =& ~
109 \frac{g_{vnxa}\widetilde g_{awny}-g_{vnax}g_{awny}}
110 {e_{xa}-\varepsilon_{vn}}\quad\text{(diagram 'a')}\\
111 &+
112 \frac{g_{vaxn}\widetilde g_{nway}-g_{vanx} g_{nway}}{e_{ya}-\varepsilon_{wn}}
113 \quad\text{(diagram 'b')}
114 \\
115 &-\frac{g_{vnay}g_{awxn}}
116 {e_{ya}-\varepsilon_{vn}}
117 -\frac{g_{vany}g_{nwxa}}
118 {e_{xa}-\varepsilon_{wn}} \quad\text{(diagram 'c1+c2')}\\
119 &+
120 \frac{g_{vwab}g_{abxy}}{\varepsilon_{ab}-\varepsilon_{vw}}\quad\text{(diagram 'd')}.
121 \end{split}
122 \end{equation*}
123 \f]
124
125 The 'reduced' Sk is defined similarly to Coulomb case (\ref Coulomb).
126 The correlation diagrams have the same angular decomposition as the Coulomb integrals:
127 \f[
128 \Sigma^2_{vwxy} = \sum_k A^k_{vwxy} S^k_{vwxy},
129 \f]
130
131 Note: these have fewer symmetries than \f$ Q^k \f$; specifically
132 \f$ S^k_{vwxy} = S^k_{wvyx} \f$. We call with the "Lk" symmetry
133 (though, we should have called it "Sk").
134 Since each diagram is averaged with its bra-ket partner (Hermitised, see
135 \ref MBPT::Denominators), the bra-ket symmetry
136 \f$ S^k_{vwxy} = S^k_{xyvw} \f$ also holds, for all denominator options.
137
138 @param k Multipolarity.
139 @param v External spinor.
140 @param w External spinor.
141 @param x External spinor.
142 @param y External spinor.
143 @param qk Coulomb integral table (QkTable).
144 @param core Core (hole) states for internal lines.
145 @param excited Excited (particle) states (internal lines).
146 @param SixJ Precomputed 6-j symbol table.
147 @param denominators Energy denominator convention: see \ref MBPT::Denominators.
148 @param fk Screening factors; fk[k] scales the k-th Coulomb line.
149 Missing (or empty) implies 1.0 (no screening).
150 @param E0 Total valence energy of the target CI level; used only
151 by Denominators::BW.
152
153 @return \f$ S^k_{vwxy} \f$.
154*/
155double Sk_vwxy(int k, const DiracSpinor &v, const DiracSpinor &w,
156 const DiracSpinor &x, const DiracSpinor &y,
157 const Coulomb::QkTable &qk, const std::vector<DiracSpinor> &core,
158 const std::vector<DiracSpinor> &excited,
159 const Angular::SixJTable &SixJ,
160 Denominators denominators = Denominators::DFK,
161 const std::vector<double> &fk = {}, double E0 = 0.0);
162
163/*!
164 @brief Selection rule for \f$ S^k_{vwxy} \f$.
165 @details
166 Differs from the \f$ Q^k_{vwxy} \f$ selection rule due to parity.
167
168 @return True if \f$ S^k_{vwxy} \f$ is non-zero by selection rules.
169*/
170bool Sk_vwxy_SR(int k, const DiracSpinor &v, const DiracSpinor &w,
171 const DiracSpinor &x, const DiracSpinor &y);
172
173/*!
174 @brief Minimum and maximum \f$ k \f$ allowed by selection rules for \f$ S^k_{vwxy} \f$.
175 @details
176 Unlike \f$ Q^k \f$, \f$ k \f$ does not step by 2 for Sigma_2 matrix elements.
177
178 @return Pair {k_min, k_max}.
179*/
180std::pair<int, int> k_minmax_S(const DiracSpinor &v, const DiracSpinor &w,
181 const DiracSpinor &x, const DiracSpinor &y);
182
183//! @brief Overload taking \f$ 2j \f$ values directly.
184std::pair<int, int> k_minmax_S(int twoj_v, int twoj_w, int twoj_x, int twoj_y);
185
186/*!
187 @brief Matrix element of the 1-body Sigma (2nd-order correlation) operator.
188 @details
189 Computes \f$ \langle v | \Sigma(E) | w \rangle \f$ by summing over internal
190 core and excited states using the provided Coulomb integral table.
191
192 The energy at which Sigma is evaluated:
193 - If @p ev is given, it is used directly.
194 - Otherwise \f$ E = \frac{1}{2}(\varepsilon_v + \varepsilon_w) \f$ is used.
195
196 @p max_l_internal truncates the angular momentum of internal lines; intended
197 for convergence tests only.
198
199 @param v External bra spinor.
200 @param w External ket spinor.
201 @param qk Coulomb integral table (YkTable or QkTable).
202 @param core Core (hole) states.
203 @param excited Excited (particle) states.
204 @param max_l_internal Maximum \f$ l \f$ for internal lines (default 99).
205 @param ev Optional energy at which Sigma is evaluated.
206
207 @return \f$ \langle v | \Sigma(E) | w \rangle \f$.
208*/
209template <class CoulombIntegral> // CoulombIntegral may be YkTable or QkTable
210double Sigma_vw(const DiracSpinor &v, const DiracSpinor &w,
211 const CoulombIntegral &qk, const std::vector<DiracSpinor> &core,
212 const std::vector<DiracSpinor> &excited,
213 int max_l_internal = 99,
214 std::optional<double> ev = std::nullopt);
215
216/*!
217 @brief Direct and exchange parts of \f$ \langle v | \Sigma(E) | w \rangle \f$,
218 returned separately as {direct, exchange}.
219 @details
220 As Sigma_vw(), but with the direct (QQ) and exchange (QP) contributions
221 accumulated separately; Sigma_vw() returns their sum.
222*/
223template <class CoulombIntegral> // CoulombIntegral may be YkTable or QkTable
224std::pair<double, double> Sigma_vw_direct_exchange(
225 const DiracSpinor &v, const DiracSpinor &w, const CoulombIntegral &qk,
226 const std::vector<DiracSpinor> &core, const std::vector<DiracSpinor> &excited,
227 int max_l_internal = 99, std::optional<double> ev = std::nullopt);
228
229/*!
230 @brief Energy derivative of the one-body correlation correction,
231 \f$ d\langle v|\Sigma(E)|w\rangle/dE \f$, evaluated at E = @p ev.
232 @details
233 Central finite difference of Sigma_vw(), with step @p delta.
234
235 @param v,w External spinors.
236 @param qk Coulomb integral table (YkTable or QkTable).
237 @param core Core (hole) states.
238 @param excited Excited (particle) states.
239 @param ev Energy at which the derivative is evaluated.
240 @param max_l_internal Maximum \f$ l \f$ for internal lines (default 99).
241 @param delta Finite-difference step, in au.
242 @return \f$ d\langle v|\Sigma(E)|w\rangle/dE \f$.
243*/
244template <class CoulombIntegral>
245double dSigma_dE_vw(const DiracSpinor &v, const DiracSpinor &w,
246 const CoulombIntegral &qk,
247 const std::vector<DiracSpinor> &core,
248 const std::vector<DiracSpinor> &excited, double ev,
249 int max_l_internal = 99, double delta = 0.01);
250
251/*!
252 @brief Returns energy of first excited state matching a given \f$ \kappa \f$.
253 @details
254 Searches @p excited for the first state with the given @p kappa_v and
255 returns its energy. Used to set a representative energy for a partial wave.
256
257 @param kappa_v Relativistic angular momentum quantum number.
258 @param excited Excited (particle) states.
259
260 @note Assumes excited is sorted by energy (for each kappa); returns *first* (not lowest) energy
261
262 @note If no state with given kappa is present, returns 0. (Matrix element will be zero anyway)
263
264 @return Energy of the matching state, if kappa is present, otherwise 0
265*/
266double e_bar(int kappa_v, const std::vector<DiracSpinor> &excited);
267
268/*!
269 @brief Calculates (or reads in) a table of two-body Sigma_2 matrix elements.
270
271 @details
272 Computes \f$ S^k_{vwxy} \f$ for all relevant combinations of states in
273 @p external, using the provided core and excited bases and Coulomb table.
274 Results are written to / read from @p filename (empty string disables I/O).
275
276 @param filename File to read/write the table. (blank for "false" to not write)
277 @param external Basis states for external legs (all ME between these are computed).
278 @param core Core (hole) states for internal summations.
279 @param excited Excited (particle) states for internal summations.
280 @param qk Precomputed Coulomb integral table (QkTable).
281 @param max_k Maximum multipolarity to include.
282 @param exclude_wrong_parity_box If true, excludes box diagrams with "wrong" parity.
283 @param denominators DFK, RS, Fermi, Fermi0: see \ref MBPT::Denominators
284 @param no_new_integrals If true, only reads existing intergals; no new computation.
285 @param fk Screening factors; fk[k] scales the k-th Coulomb line.
286 @param E0 Target-level valence energy; used only by Denominators::BW.
287
288 @note no_new_integrals - if we _know_ all required integrals are already in the
289 file to be read in, saves time.
290 Otherwise, ampsci will check if any new integrals a requred.
291 This checking can take a while, particularly for large basis.
292
293 @return LkTable containing all computed \f$ S^k_{vwxy} \f$ matrix elements.
294*/
295[[nodiscard]] Coulomb::LkTable calculate_Sk(
296 const std::string &filename, const std::vector<DiracSpinor> &external,
297 const std::vector<DiracSpinor> &core, const std::vector<DiracSpinor> &excited,
298 const Coulomb::QkTable &qk, int max_k, bool exclude_wrong_parity_box,
299 Denominators denominators, bool no_new_integrals = false,
300 const std::vector<double> &fk = {}, double E0 = 0.0);
301
302/*!
303 @brief Average Sigma_2 correction ratios, h_k, for each multipole k.
304 @details
305 h_k = <S^k/Q^k>, averaged over all stored S^k integrals with
306 |Q^k| above a small cut-off. Each distinct integral is counted once (the
307 4-fold symmetry of S^k is accounted for), so integrals are weighted equally.
308 Used to extrapolate Sigma_2 to diagrams outside the tabulated set:
309 S^k ~ h_k Q^k. Entries with no data are 0.0 (no correction).
310
311 @param Sk Table of Sigma_2 integrals (see calculate_Sk).
312 @param qk Coulomb integral table.
313 @param external States for external legs (typically the cis2 basis).
314 @param max_k Maximum multipole; if negative, determined from basis.
315 @return Vector of average correction ratios, indexed by k.
316*/
317std::vector<double> average_hk(const Coulomb::LkTable &Sk,
318 const Coulomb::QkTable &qk,
319 const std::vector<DiracSpinor> &external,
320 int max_k = -1);
321
322//==============================================================================
323//==============================================================================
324
325//! Functions for each Sigma2 diagram; called by \ref Sk_vwxy.
326//! @details Broken up for computational convenience, not diagram-by-diagram.
327namespace Sigma2 {
328
329/*!
330 @brief Diagrams a+b contribution to the reduced two-body Sigma.
331 @details
332 Computes the sum of Goldstone diagrams a and b for \f$ S^k_{vwxy} \f$.
333
334 @param k Multipolarity.
335 @param v (+ w x y) External spinors.
336 @param qk Coulomb integral table.
337 @param core Core states.
338 @param excited Excited states.
339 @param SixJ 6-j symbol table.
340 @param denominators Energy denominator convention.
341 @param fk Screening factors; fk[k] scales the k-th Coulomb line.
342 @param E0 Target-level valence energy; used only by
343 Denominators::BW.
344
345 @return Diagrams a+b contribution to \f$ S^k_{vwxy} \f$.
346*/
347double S_Sigma2_ab(int k, const DiracSpinor &v, const DiracSpinor &w,
348 const DiracSpinor &x, const DiracSpinor &y,
349 const Coulomb::QkTable &qk,
350 const std::vector<DiracSpinor> &core,
351 const std::vector<DiracSpinor> &excited,
352 const Angular::SixJTable &SixJ, Denominators denominators,
353 const std::vector<double> &fk = {}, double E0 = 0.0);
354
355/*!
356 @brief Diagram c1 contribution to the reduced two-body Sigma.
357 @details
358 Computes Goldstone diagram c1 for \f$ S^k_{vwxy} \f$.
359
360 @param k Multipolarity.
361 @param v (+ w x y) External spinors.
362 @param qk Coulomb integral table.
363 @param core Core states.
364 @param excited Excited states.
365 @param SixJ 6-j symbol table.
366 @param denominators Energy denominator convention.
367 @param fk Screening factors; fk[k] scales the k-th Coulomb line.
368 @param E0 Target-level valence energy; used only by
369 Denominators::BW.
370
371 @return Diagram c1 contribution to \f$ S^k_{vwxy} \f$.
372*/
373double S_Sigma2_c1(int k, const DiracSpinor &v, const DiracSpinor &w,
374 const DiracSpinor &x, const DiracSpinor &y,
375 const Coulomb::QkTable &qk,
376 const std::vector<DiracSpinor> &core,
377 const std::vector<DiracSpinor> &excited,
378 const Angular::SixJTable &SixJ, Denominators denominators,
379 const std::vector<double> &fk = {}, double E0 = 0.0);
380
381/*!
382 @brief Diagram c2 contribution to the reduced two-body Sigma.
383 @details
384 Computes Goldstone diagram c2 for \f$ S^k_{vwxy} \f$.
385
386 @param k Multipolarity.
387 @param v (+ w x y) External spinors.
388 @param qk Coulomb integral table.
389 @param core Core states.
390 @param excited Excited states.
391 @param SixJ 6-j symbol table.
392 @param denominators Energy denominator convention.
393 @param fk Screening factors; fk[k] scales the k-th Coulomb line.
394 @param E0 Target-level valence energy; used only by
395 Denominators::BW.
396
397 @return Diagram c2 contribution to \f$ S^k_{vwxy} \f$.
398*/
399double S_Sigma2_c2(int k, const DiracSpinor &v, const DiracSpinor &w,
400 const DiracSpinor &x, const DiracSpinor &y,
401 const Coulomb::QkTable &qk,
402 const std::vector<DiracSpinor> &core,
403 const std::vector<DiracSpinor> &excited,
404 const Angular::SixJTable &SixJ, Denominators denominators,
405 const std::vector<double> &fk = {}, double E0 = 0.0);
406
407/*!
408 @brief Diagram d contribution to the reduced two-body Sigma.
409 @details
410 Computes Goldstone diagram d for \f$ S^k_{vwxy} \f$.
411
412 @param k Multipolarity.
413 @param v (+ w x y) External spinors.
414 @param qk Coulomb integral table.
415 @param core Core states.
416 @param excited Excited states.
417 @param SixJ 6-j symbol table.
418 @param denominators Energy denominator convention.
419 @param fk Screening factors; fk[k] scales the k-th Coulomb line.
420 @param E0 Target-level valence energy; used only by
421 Denominators::BW.
422
423 @return Diagram d contribution to \f$ S^k_{vwxy} \f$.
424*/
425double S_Sigma2_d(int k, const DiracSpinor &v, const DiracSpinor &w,
426 const DiracSpinor &x, const DiracSpinor &y,
427 const Coulomb::QkTable &qk,
428 const std::vector<DiracSpinor> &core,
429 const std::vector<DiracSpinor> &excited,
430 const Angular::SixJTable &SixJ, Denominators denominators,
431 const std::vector<double> &fk = {}, double E0 = 0.0);
432
433} // namespace Sigma2
434
435} // namespace MBPT
436
437//==============================================================================
438#include "Sigma2.ipp"
Lookup table for Wigner 6j symbols.
Definition SixJTable.hpp:82
Base class template to store Coulomb integrals, and similar. 3 specific cases (by template instantiat...
Definition QkTable.hpp:118
Stores radial Dirac spinor: F_nk = (f, g)
Definition DiracSpinor.hpp:44
double S_Sigma2_ab(int k, const DiracSpinor &v, const DiracSpinor &w, const DiracSpinor &x, const DiracSpinor &y, const Coulomb::QkTable &qk, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, const Angular::SixJTable &SixJ, Denominators denominators, const std::vector< double > &fk={}, double E0=0.0)
Diagrams a+b contribution to the reduced two-body Sigma.
Definition Sigma2.cpp:146
double S_Sigma2_c2(int k, const DiracSpinor &v, const DiracSpinor &w, const DiracSpinor &x, const DiracSpinor &y, const Coulomb::QkTable &qk, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, const Angular::SixJTable &SixJ, Denominators denominators, const std::vector< double > &fk={}, double E0=0.0)
Diagram c2 contribution to the reduced two-body Sigma.
Definition Sigma2.cpp:304
double S_Sigma2_c1(int k, const DiracSpinor &v, const DiracSpinor &w, const DiracSpinor &x, const DiracSpinor &y, const Coulomb::QkTable &qk, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, const Angular::SixJTable &SixJ, Denominators denominators, const std::vector< double > &fk={}, double E0=0.0)
Diagram c1 contribution to the reduced two-body Sigma.
Definition Sigma2.cpp:231
double S_Sigma2_d(int k, const DiracSpinor &v, const DiracSpinor &w, const DiracSpinor &x, const DiracSpinor &y, const Coulomb::QkTable &qk, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, const Angular::SixJTable &SixJ, Denominators denominators, const std::vector< double > &fk={}, double E0=0.0)
Diagram d contribution to the reduced two-body Sigma.
Definition Sigma2.cpp:377
Many-body perturbation theory.
Definition MatrixElements.hpp:12
std::string parse_Denominators(Denominators d)
Returns string representation of Denominators enum.
Definition Sigma2.cpp:12
double Sk_vwxy(int k, const DiracSpinor &v, const DiracSpinor &w, const DiracSpinor &x, const DiracSpinor &y, const Coulomb::QkTable &qk, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, const Angular::SixJTable &SixJ, Denominators denominators, const std::vector< double > &fk, double E0)
Reduced two-body Sigma (2nd-order correlation) operator matrix element.
Definition Sigma2.cpp:122
double e_bar(int kappa_v, const std::vector< DiracSpinor > &excited)
Returns energy of first excited state matching a given .
Definition Sigma2.cpp:84
bool Sk_vwxy_SR(int k, const DiracSpinor &v, const DiracSpinor &w, const DiracSpinor &x, const DiracSpinor &y)
Selection rule for .
Definition Sigma2.cpp:97
std::pair< int, int > k_minmax_S(const DiracSpinor &v, const DiracSpinor &w, const DiracSpinor &x, const DiracSpinor &y)
Minimum and maximum allowed by selection rules for .
Definition Sigma2.cpp:104
double leg_de(Denominators denominators, double et_bar, double et, double ei_bar, double ei, double es, double E0)
External-leg part of a Sigma_2 energy denominator (diagrams a, b, c1, c2).
Definition Sigma2.cpp:48
Denominators
Type of energy denominators: DFK, BW, RS, Fermi, Fermi0.
Definition Sigma2.hpp:27
double dSigma_dE_vw(const DiracSpinor &v, const DiracSpinor &w, const CoulombIntegral &qk, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, double ev, int max_l_internal=99, double delta=0.01)
Energy derivative of the one-body correlation correction, , evaluated at E = ev.
Definition Sigma2.ipp:104
std::pair< std::vector< DiracSpinor >, std::vector< DiracSpinor > > split_basis(const std::vector< DiracSpinor > &basis, double E_Fermi, int min_n_core, int max_n_excited)
Splits the basis into the core (holes) and excited states.
Definition Sigma2.cpp:68
std::vector< double > average_hk(const Coulomb::LkTable &Sk, const Coulomb::QkTable &qk, const std::vector< DiracSpinor > &external, int max_k)
Average Sigma_2 correction ratios, h_k, for each multipole k.
Definition Sigma2.cpp:519
double Sigma_vw(const DiracSpinor &v, const DiracSpinor &w, const CoulombIntegral &qk, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, int max_l_internal=99, std::optional< double > ev=std::nullopt)
Matrix element of the 1-body Sigma (2nd-order correlation) operator.
Definition Sigma2.ipp:93
std::pair< double, double > Sigma_vw_direct_exchange(const DiracSpinor &v, const DiracSpinor &w, const CoulombIntegral &qk, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, int max_l_internal=99, std::optional< double > ev=std::nullopt)
Direct and exchange parts of , returned separately as {direct, exchange}.
Definition Sigma2.ipp:12
Coulomb::LkTable calculate_Sk(const std::string &filename, const std::vector< DiracSpinor > &external, const std::vector< DiracSpinor > &core, const std::vector< DiracSpinor > &excited, const Coulomb::QkTable &qk, int max_k, bool exclude_wrong_parity_box, Denominators denominators, bool no_new_integrals, const std::vector< double > &fk, double E0)
Calculates (or reads in) a table of two-body Sigma_2 matrix elements.
Definition Sigma2.cpp:469