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