ampsci
High-precision calculations for one- and two-valence atomic systems
Breit.hpp
1#pragma once
2#include "Coulomb/meTable.hpp"
3#include "Wavefunction/DiracSpinor.hpp"
4#include "qip/Vector.hpp"
5#include <cassert>
6#include <utility>
7#include <vector>
8
9namespace HF {
10
11//==============================================================================
12namespace Breit_gb {
13
14struct single_k_mop {
15 // Class to hold the Breit-Coulomb integrals, for single k
16public:
17 single_k_mop() {}
18 single_k_mop(const DiracSpinor &Fi, const DiracSpinor &Fj, int k) {
19 calculate(Fi, Fj, k);
20 }
21
22 void calculate(const DiracSpinor &Fi, const DiracSpinor &Fj, int k);
23 std::vector<double> b0_minus{}, bi_minus{};
24 std::vector<double> b0_plus{}, bi_plus{};
25 std::vector<double> g0_minus{}, gi_minus{};
26 std::vector<double> g0_plus{}, gi_plus{};
27};
28
29struct single_k_n {
30 // Class to hold the Breit-Coulomb integrals, for single k
31public:
32 single_k_n() {}
33 single_k_n(const DiracSpinor &Fi, const DiracSpinor &Fj, int k) {
34 calculate(Fi, Fj, k);
35 }
36
37 void calculate(const DiracSpinor &Fi, const DiracSpinor &Fj, int k);
38 std::vector<double> g{};
39
40private:
41 std::vector<double> gi{};
42};
43
44} // namespace Breit_gb
45
46namespace Breit_gh_freqdep {
47
48struct single_k_mop_freq {
49 // Class to hold the frequency-dependent Breit-Coulomb integrals, for single k
50public:
51 single_k_mop_freq() {}
52 single_k_mop_freq(const DiracSpinor &Fi, const DiracSpinor &Fj, int k,
53 const double w) {
54 calculate(Fi, Fj, k, w);
55 }
56
57 void calculate(const DiracSpinor &Fi, const DiracSpinor &Fj, int k,
58 const double w);
59
60 std::vector<double> g0_minus_freqw{}, gi_minus_freqw{};
61 std::vector<double> g0_plus_freqw{}, gi_plus_freqw{};
62 std::vector<double> h0_minus_freqw{}, hi_minus_freqw{};
63 std::vector<double> h0_plus_freqw{}, hi_plus_freqw{};
64 std::vector<double> v1_freqw{}, v2_freqw{}, v3_freqw{}, v4_freqw{};
65};
66
67struct single_k_n_freq {
68 // Class to hold the Breit-Coulomb integrals, for single k
69public:
70 single_k_n_freq() {}
71 single_k_n_freq(const DiracSpinor &Fi, const DiracSpinor &Fj, int k,
72 const double w) {
73 calculate(Fi, Fj, k, w);
74 }
75
76 void calculate(const DiracSpinor &Fi, const DiracSpinor &Fj, int k,
77 const double w);
78 std::vector<double> g{};
79
80private:
81 std::vector<double> gi{};
82};
83
84} // namespace Breit_gh_freqdep
85
86//==============================================================================
87//! Breit potentials for one- (Hartree-Fock Breit) and two-body Breit integrals
88class Breit {
89 // overall scaling factor
90 double m_scale;
91
92 // Scaling factor for frequency in frequency-dependent Breit (default 0.0 = static)
93 double m_lambda_f;
94
95 // Scaling factors for each term (mainly for tests). {M,N}=Gaunt; {O,P} retarded
96 double m_M{1.0}, m_N{1.0}, m_O{1.0}, m_P{1.0};
97
98 // For speedy lookup, when only full integral is required
99 std::vector<Coulomb::meTable<Breit_gb::single_k_mop>> m_gb{};
100 std::vector<Coulomb::meTable<Breit_gb::single_k_n>> m_gb_N{};
101
102public:
103 /*!
104 @brief Parameters for constructing Breit interaction operator (s,m,n,o,p,f)
105
106 @details
107 Holds all scaling factors for Breit interactions: overall scale,
108 individual term scaling (M, N, O, P), and frequency scaling (lambda_f).
109 All fields have sensible defaults, so you can set only the ones you need.
110
111 The M and N terms arise from the Gaunt (instantaneous magnetic) interaction,
112 while the O and P terms arise from the retarded (photon propagation) contribution.
113 */
114 struct Params {
115 //! Overall scaling factor for Breit contributions (default 1.0)
116 double scale{1.0};
117 //! Scaling for M term (Gaunt part, default 1.0)
118 double m{1.0};
119 //! Scaling for N term (Gaunt part, default 1.0)
120 double n{1.0};
121 //! Scaling for O term (retarded part, default 1.0)
122 double o{1.0};
123 //! Scaling for P term (retarded part, default 1.0)
124 double p{1.0};
125 //! Scaling factor for frequency in frequency-dependent Breit (default 0.0 = static)
126 double lambda_f{0.0};
127 };
128
129 /*!
130 @brief Constructs Breit with default parameters.
131 @details
132 Equivalent to Breit(Params{}). See @ref Breit::Params for default values.
133 */
135
136 /*!
137 @brief Constructs Breit interaction operator from parameters
138
139 @details
140 Creates a Breit operator with scaling factors specified in @ref Params.
141 See @ref Params for documentation of each scaling factor.
142
143 @param params Params struct containing all scaling factors
144 */
145 explicit Breit(const Params &params)
146 : m_scale(params.scale),
147 m_lambda_f(params.lambda_f),
148 m_M(params.m),
149 m_N(params.n),
150 m_O(params.o),
151 m_P(params.p) {}
152
153 /*!
154 @brief Update all scaling factors
155
156 @details
157 Updates the overall scaling factor, individual term scaling factors (M, N, O, P),
158 and the frequency scaling factor for frequency-dependent Breit calculations.
159
160 @param t_scale Overall scaling factor (default 1.0)
161 @param t_M Scaling for M term (Gaunt part, default 1.0)
162 @param t_N Scaling for N term (Gaunt part, default 1.0)
163 @param t_O Scaling for O term (retarded part, default 1.0)
164 @param t_P Scaling for P term (retarded part, default 1.0)
165
166 @note Does not update lambda_f (f-dependent scaling).
167 Use @ref update_lambda_f() for that.
168 */
169 void update_scale(double t_scale = 1.0, double t_M = 1.0, double t_N = 1.0,
170 double t_O = 1.0, double t_P = 1.0) {
171 m_scale = t_scale;
172 m_M = t_M;
173 m_N = t_N;
174 m_O = t_O;
175 m_P = t_P;
176 }
177
178 /*!
179 @brief Update frequency scaling factor
180
181 @details
182 Sets the scaling factor for the frequency in frequency-dependent Breit calculations.
183 The frequency used in the integrals is multiplied by this factor.
184
185 @param lambda_f Frequency scaling factor (should be > 0; default 1.0)
186
187 @note Setting lambda_f to very small values approaches the static Breit limit.
188 */
189 void update_lambda_f(double lambda_f) { m_lambda_f = lambda_f; }
190
191 /*!
192 @brief Selection rule check for Breit integrals
193
194 @details
195 Tests whether the four-body Breit integral B^k_{vwxy} is nonzero based on
196 angular momentum selection rules.
197
198 @param k Multipolarity (angular momentum rank of the interaction)
199 @param v (w,x,y): electron states
200
201 @return True if the integral is potentially nonzero (angular momentum
202 selection rules are satisfied); false if the integral vanishes.
203
204 */
205 static bool Bk_SR(int k, const DiracSpinor &v, const DiracSpinor &w,
206 const DiracSpinor &x, const DiracSpinor &y) {
207
208 const auto have_mop = Angular::Ck_kk_SR(k, v.kappa(), x.kappa()) &&
209 Angular::Ck_kk_SR(k, w.kappa(), y.kappa()) &&
210 v != x && w != y;
211
212 const auto have_n = Angular::Ck_kk_SR(k, -v.kappa(), x.kappa()) &&
213 Angular::Ck_kk_SR(k, -w.kappa(), y.kappa()) &&
214 (v.kappa() + x.kappa() != 0) &&
215 (w.kappa() + y.kappa() != 0);
216
217 if (!have_mop && have_n && k == 0)
218 return false;
219
220 return (have_mop || have_n);
221 }
222
223 /*!
224 @brief Determine valid multipolarity range for Breit integrals
225
226 @details
227 Minimum and maximum allowed multipolarity k for a four-body
228 Breit integral.
229
230 @param a (b,c,d) electron states
231
232 @return A pair {k_min, k_max} giving the valid multipolarity range.
233 Returns with k_max < k_min (invalid range) if no valid k exists.
234
235 @note This is the static method analogue of Coulomb::k_minmax_tj, adapted
236 for the four-body Breit structure.
237
238 */
239 static std::pair<int, int> k_minmax(const DiracSpinor &a,
240 const DiracSpinor &b,
241 const DiracSpinor &c,
242 const DiracSpinor &d) {
243 const auto [k1, k2] = Coulomb::k_minmax_tj(a.twoj(), c.twoj());
244 const auto [k3, k4] = Coulomb::k_minmax_tj(b.twoj(), d.twoj());
245 return {std::max(k1, k3), std::min(k2, k4)};
246 }
247
248 /*!
249 @brief Determine valid multipolarity range for Breit integrals from quantum numbers
250
251 @details
252 As @ref k_minmax but for 2*j (doesn't require DiracSpinors)
253
254 */
255 static std::pair<int, int> k_minmax_tj(int tja, int tjb, int tjc, int tjd) {
256 const auto [k1, k2] = Coulomb::k_minmax_tj(tja, tjc);
257 const auto [k3, k4] = Coulomb::k_minmax_tj(tjb, tjd);
258 return {std::max(k1, k3), std::min(k2, k4)};
259 }
260
261 /*!
262 @brief Precompute Breit integral lookup tables for rapid evaluation
263
264 @details
265 Pre-calculates and stores reduced Breit integrals for all unique pairs of
266 basis orbitals and all multipolarity values k, enabling
267 much faster integral lookups via the Bk_abcd_2() family of functions.
268 This trades memory for speed, allowing rapid evaluation in HF iterations.
269
270 @param basis The set of basis orbitals to use
271 @param t_max_k Maximum multipolarity k to compute (default 99).
272 Actual maximum used is the minimum of this value and
273 the physical constraint k_minmax() for the given basis.
274
275 @warning This function uses substantial memory -- use with caution for large
276 calculations. Have mostly found the speedup is not worth the memory cost, so
277 this is generally not used anymore. Used in CI.
278
279 @note Must be called once before using the faster variants Bk_abcd_2(),
280 BPk_abcd_2(), or BWk_abcd_2(). Calling it multiple times will
281 recompute and overwrite previous results.
282
283 @warning ONLY for static Breit
284 */
285 void fill_gb(const std::vector<DiracSpinor> &basis, int t_max_k = 99);
286
287 //! Returns the overall scaling factor
288 double scale_factor() const { return m_scale; };
289
290 /*!
291 @brief Calculates Breit contribution with automatic frequency dependence
292
293 @details
294 Computes the Hartree-Fock Breit interaction V_br*Fa for a valence electron
295 interacting with the core. This is the direct Breit contribution from all
296 core electrons.
297
298 Will be static version is lambda = 0, otherwise, frequency-dependent.
299
300 @param Fa Valence electron state
301 @param core Core electron states
302
303 @return The Breit-Hartree-Fock potential applied to Fa, computed at the
304 appropriate frequency regime based on m_lambda_f.
305
306 @note For frequency-dependent calculations, this may be substantially slower
307 due to spherical Bessel function evaluation in the radial integrals.
308 */
309 DiracSpinor VbrFa(const DiracSpinor &Fa,
310 const std::vector<DiracSpinor> &core) const;
311
312 /*!
313 @brief Breit-TDHF: Breit correction to the TDHF correction to Hartree-Fock
314
315 @details
316 Calculates the Breit correction to the TDHF potential, dV.
317 This represents the response of the Breit field to the core electron perturbations.
318
319 @param kappa Dirac quantum number of the resulting state/projection
320 @param K Multipolarity (rank) of the RPA operator
321 @param Fa Electron state (acting on this)
322 @param Fb Core state undergoing perturbation
323 @param Xbeta X perturbation to core state: from @ref ExternalField::TDHF
324 @param Ybeta Y perturbation to core state: from @ref ExternalField::TDHF
325
326 @return The reduced RPA correction dV_Br*Fa
327
328 @note Only frequency-independent for now
329 */
330 DiracSpinor dV_Br(int kappa, int K, const DiracSpinor &Fa,
331 const DiracSpinor &Fb, const DiracSpinor &Xbeta,
332 const DiracSpinor &Ybeta) const;
333
334 /*!
335 @brief Direct Breit two-body integral "right-hand-side"
336
337 @details
338 Computes the radial function of the direct part of the reduced Breit
339 operator acting on an orbital with quantum number kappa_v. This is defined
340 such that the two-body matrix element factorises as:
341
342 \f[
343 B^k_{abcd} = \langle a | B^k_v(b,c,d) \rangle
344 \f]
345
346 @note Frequency independent version
347
348 See @ref Bk_abcd()
349 */
350 DiracSpinor Bkv_bcd(int k, int kappa_v, const DiracSpinor &Fb,
351 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
352
353 /*!
354 @brief Exchange Breit two-body integral "right-hand-side"
355
356 @details
357 See @ref Bkv_bcd() and @ref BPk_abcd()
358
359 @note Frequency independent version
360 */
361 DiracSpinor BPkv_bcd(int k, int kappa_v, const DiracSpinor &Fb,
362 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
363
364 /*!
365 @brief Anti-symmetrised Breit two-body integral "right-hand-side"
366
367 @details
368 See @ref Bkv_bcd() and @ref BWk_abcd()
369
370 @note Frequency independent version
371 */
372 DiracSpinor BWkv_bcd(int k, int kappa_v, const DiracSpinor &Fb,
373 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
374
375 /*!
376 @brief Reduced static Breit two-body matrix element
377
378 @details
379 Calculates the static (frequency-independent) reduced two-body Breit matrix
380 element B^k_{abcd}, the Breit analogue of the Coulomb Q^k integral.
381
382 @note Frequency independent version
383
384 @param k Multipolarity (angular momentum rank of the interaction)
385 @param Fa (Fb,Fc,Fd) electron states
386
387 @return The static reduced Breit matrix element B^k_{abcd}.
388
389 @note Selection rules depend on angular momentum quantum numbers via Bk_SR().
390 Use k_minmax() to determine the valid multipolarity range before calling.
391
392 @note This function re-computes all radial integrals each call.
393 For repeated calls with the same basis, call fill_gb() once, then use
394 the faster variant @ref Bk_abcd_2() instead.
395 */
396 double Bk_abcd(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
397 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
398
399 /*!
400 @brief Reduced static exchange Breit two-body matrix element
401
402 @details
403 Calculates the static reduced exchange Breit matrix element P(B)^k_{abcd},
404 the Breit analogue of the Coulomb P^k integral.
405
406 @note Frequency independent version
407 */
408 double BPk_abcd(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
409 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
410
411 /*!
412 @brief Reduced static anti-symmetrised Breit two-body matrix element
413
414 @details
415 Calculates the static reduced anti-symmetrised Breit matrix element
416 W(B)^k_{abcd} = B^k_{abcd} + P(B)^k_{abcd}.
417
418 @note Frequency independent version
419 */
420 double BWk_abcd(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
421 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
422
423 /*!
424 @brief Reduced static Breit matrix element (tabulated, fast lookup)
425
426 @details
427 A faster implementation of Bk_abcd() that looks up pre-tabulated
428 integrals computed by fill_gb(). Reduces computational cost, at significant
429 memory cost.
430
431 The result is the same as Bk_abcd() for the same inputs, provided
432 fill_gb() has been called at least once on a basis containing Fa, Fb, Fc, Fd.
433
434 @param k Multipolarity (angular momentum rank of the interaction)
435 @param Fa (Fb,Fc,Fd) electron states
436
437 @return The reduced Breit matrix element B^k_{abcd}, retrieved from
438 the cached m_gb tables.
439
440 @note REQUIRES: fill_gb() must have been called before this function
441 can be used. If fill_gb() has not been called, this function returns
442 zero or garbage data.
443 This function assumes the spinors Fa, Fb, Fc, Fd were members of
444 the basis passed to fill_gb(); using spinors outside that basis
445 is undefined.
446
447 @warning Do not use this function unless fill_gb() has been successfully called.
448
449 @note Only implemented for frequency independent case
450 */
451 double Bk_abcd_2(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
452 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
453
454 /*!
455 @brief Reduced exchange Breit matrix element (tabulated, fast lookup)
456
457 @details
458 A much faster implementation of BPk_abcd() that looks up pre-tabulated
459 exchange integrals computed by fill_gb(). Reduces computational cost from
460 O(radial grid size) per call to O(1) lookup.
461
462 The result is identical to BPk_abcd() for the same inputs, provided
463 fill_gb() has been called at least once on a basis containing all four
464 electron states.
465
466 @param k Multipolarity (angular momentum rank of the interaction)
467 @param Fa (Fb,Fc,Fd) electron states
468
469 @return The reduced exchange Breit matrix element P(B)^k_{abcd}, retrieved
470 from the cached m_gb tables.
471
472 @note REQUIRES: fill_gb() must have been called before this function
473 can be used. The spinors must be members of the basis provided to fill_gb().
474
475 @warning Do not use this function unless fill_gb() has been successfully called.
476
477 @note Only implemented for frequency independent case
478 */
479 double BPk_abcd_2(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
480 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
481
482 /*!
483 @brief Reduced anti-symmetrised Breit matrix element (tabulated, fast lookup)
484
485 @details
486 A much faster implementation of BWk_abcd() that looks up pre-tabulated
487 integrals computed by fill_gb(). Combines the tabulated direct and exchange
488 terms for O(1) evaluation.
489
490 The result is identical to BWk_abcd() for the same inputs, provided
491 fill_gb() has been called at least once on a basis containing all four
492 electron states.
493
494 @param k Multipolarity (angular momentum rank of the interaction)
495 @param Fa (Fb,Fc,Fd) electron states
496
497 @return The reduced anti-symmetrised Breit matrix element
498 W(B)^k_{abcd} = Bk_abcd_2(...) + BPk_abcd_2(...), retrieved
499 from cached m_gb tables.
500
501 @note REQUIRES: fill_gb() must have been called before this function
502 can be used. The spinors must be members of the basis provided to fill_gb().
503
504 @warning Do not use this function unless fill_gb() has been successfully called.
505
506 @note Only implemented for frequency independent case
507 */
508 double BWk_abcd_2(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
509 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
510
511 /*!
512 @brief The one-body Breit (Breit-Hartree-Fock) correction to second-order energy
513
514 @details
515 Calculates the one-body Breit (Breit-Hartree-Fock) correction to second-order
516 energy for a single-valence atom. This is included automatically if Breit is included into Hartree-Fock.
517 (The lowest-order Breit correction <v|V_Br|v> not included.)
518
519
520 @param Fv The valence electron state of interest
521 @param holes Occupied core electron states
522 @param excited Virtual excited electron states
523
524 @return The one-body Breit correction to second-order energy: delta E^(2, 1).
525
526 @note This represents only the one-particle (Hartree-Fock) contribution.
527 The two-particle (Sigma) contribution is computed by de2().
528 For Breit-Coulomb self-consistent HF, this is already accounted for
529 and should not be added separately.
530
531 @warning May significantly overcount or undercount energy shifts if
532 Breit-Coulomb HF is not self-consistent. Use primarily as
533 a correction term in perturbative Breit-on-Coulomb calculations.
534
535 @note Will automatically include freuqnecy-dependence if lambda non-zero
536 */
537 double de2_HF(const DiracSpinor &Fv, const std::vector<DiracSpinor> &holes,
538 const std::vector<DiracSpinor> &excited) const;
539
540 /*!
541 @brief The two-body Breit correction to second-order energy
542
543 @details
544 Calculates the two-body Breit correction to second-order
545 energy for a single-valence atom.
546 This is _not_ included automatically if Breit is included into Hartree-Fock,
547 since it requires modification of two-body Coulomb integals.
548
549 @note This is just the energy shift - Breit can be included fully into MBPT
550 calculations self-consistantly another way (see @ref MBPT)
551
552 -
553
554 @note Only frequency independent
555 */
556 double de2(const DiracSpinor &Fv, const std::vector<DiracSpinor> &holes,
557 const std::vector<DiracSpinor> &excited) const;
558
559 /*!
560 @brief Frequency-dependent reduced Breit two-body matrix element
561
562 @details
563 - Automatically determines frequency, based on DiracSpinors
564 - Frequency-dependent analogue of @ref Bk_abcd(). See @ref Bkv_bcd_freqw().
565 */
566 double Bk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
567 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
568
569 /*!
570 @brief Frequency-dependent reduced exchange Breit two-body matrix element
571
572 @details
573 - Automatically determines frequency, based on DiracSpinors
574 - Frequency-dependent analogue of @ref BPk_abcd(). See @ref Bkv_bcd_freqw().
575 */
576 double BPk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
577 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
578
579 /*!
580 @brief Frequency-dependent reduced anti-symmetrised Breit two-body matrix element
581
582 @details
583 - Automatically determines frequency, based on DiracSpinors
584 - Frequency-dependent analogue of @ref BWk_abcd(). See @ref Bkv_bcd_freqw().
585 */
586 double BWk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
587 const DiracSpinor &Fc, const DiracSpinor &Fd) const;
588
589 //-------------------
590 /*!
591 @brief Frequency-dependent reduced Breit two-body matrix element (explicit frequency)
592
593 @details
594 Frequency-dependent analogue of @ref Bk_abcd(). See @ref Bkv_bcd_freqw().
595 */
596 double Bk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
597 const DiracSpinor &Fc, const DiracSpinor &Fd,
598 const double w) const;
599
600 /*!
601 @brief Frequency-dependent reduced exchange Breit two-body matrix element (explicit frequency)
602
603 @details
604 Frequency-dependent analogue of @ref BPk_abcd(). See @ref Bkv_bcd_freqw().
605 */
606 double BPk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
607 const DiracSpinor &Fc, const DiracSpinor &Fd,
608 const double w) const;
609
610 /*!
611 @brief Frequency-dependent reduced anti-symmetrised Breit two-body matrix element (explicit frequency)
612
613 @details
614 Frequency-dependent analogue of @ref BWk_abcd(). See @ref Bkv_bcd_freqw().
615 */
616 double BWk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb,
617 const DiracSpinor &Fc, const DiracSpinor &Fd,
618 const double w) const;
619
620 /*!
621 @brief Frequency-dependent Breit two-body integral "right-hand-side"
622
623 @details
624 Frequency-dependent breit analogue of @ref Bkv_bcd()
625 */
626 DiracSpinor Bkv_bcd_freqw(int k, int kappa_v, const DiracSpinor &Fb,
627 const DiracSpinor &Fc, const DiracSpinor &Fd,
628 const double w) const;
629
630 /*!
631 @brief Frequency-dependent exchange Breit two-body integral "right-hand-side"
632
633 @details
634 Frequency-dependent version of BPkv_bcd(). See @ref Bkv_bcd_freqw().
635 */
636 DiracSpinor BPkv_bcd_freqw(int k, int kappa_v, const DiracSpinor &Fb,
637 const DiracSpinor &Fc, const DiracSpinor &Fd,
638 const double w) const;
639
640 /*!
641 @brief Frequency-dependent anti-symmetrised Breit two-body
642 integral "right-hand-side"
643
644 @details
645 Frequency-dependent version of BWkv_bcd(). See @ref Bkv_bcd_freqw().
646 */
647 DiracSpinor BWkv_bcd_freqw(int k, int kappa_v, const DiracSpinor &Fb,
648 const DiracSpinor &Fc, const DiracSpinor &Fd,
649 const double w) const;
650};
651
652} // namespace HF
Stores radial Dirac spinor: F_nk = (f, g)
Definition DiracSpinor.hpp:42
int kappa() const
Dirac quantum number, kappa.
Definition DiracSpinor.hpp:88
Breit potentials for one- (Hartree-Fock Breit) and two-body Breit integrals.
Definition Breit.hpp:88
double BWk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Frequency-dependent reduced anti-symmetrised Breit two-body matrix element.
Definition Breit.cpp:458
void update_lambda_f(double lambda_f)
Update frequency scaling factor.
Definition Breit.hpp:189
DiracSpinor Bkv_bcd(int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Direct Breit two-body integral "right-hand-side".
Definition Breit.cpp:75
DiracSpinor Bkv_bcd_freqw(int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd, const double w) const
Frequency-dependent Breit two-body integral "right-hand-side".
Definition Breit.cpp:488
double p
Scaling for P term (retarded part, default 1.0)
Definition Breit.hpp:124
double Bk_abcd(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Reduced static Breit two-body matrix element.
Definition Breit.cpp:208
void fill_gb(const std::vector< DiracSpinor > &basis, int t_max_k=99)
Precompute Breit integral lookup tables for rapid evaluation.
Definition Breit.cpp:12
double BPk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Frequency-dependent reduced exchange Breit two-body matrix element.
Definition Breit.cpp:443
double scale
Overall scaling factor for Breit contributions (default 1.0)
Definition Breit.hpp:116
double m
Scaling for M term (Gaunt part, default 1.0)
Definition Breit.hpp:118
double lambda_f
Scaling factor for frequency in frequency-dependent Breit (default 0.0 = static)
Definition Breit.hpp:126
double o
Scaling for O term (retarded part, default 1.0)
Definition Breit.hpp:122
double Bk_abcd_2(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Reduced static Breit matrix element (tabulated, fast lookup)
Definition Breit.cpp:226
DiracSpinor BWkv_bcd_freqw(int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd, const double w) const
Frequency-dependent anti-symmetrised Breit two-body integral "right-hand-side".
Definition Breit.cpp:642
void update_scale(double t_scale=1.0, double t_M=1.0, double t_N=1.0, double t_O=1.0, double t_P=1.0)
Update all scaling factors.
Definition Breit.hpp:169
DiracSpinor BPkv_bcd(int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Exchange Breit two-body integral "right-hand-side".
Definition Breit.cpp:194
Breit()
Constructs Breit with default parameters.
Definition Breit.hpp:134
double de2_HF(const DiracSpinor &Fv, const std::vector< DiracSpinor > &holes, const std::vector< DiracSpinor > &excited) const
The one-body Breit (Breit-Hartree-Fock) correction to second-order energy.
Definition Breit.cpp:376
double BWk_abcd_2(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Reduced anti-symmetrised Breit matrix element (tabulated, fast lookup)
Definition Breit.cpp:370
static std::pair< int, int > k_minmax_tj(int tja, int tjb, int tjc, int tjd)
Determine valid multipolarity range for Breit integrals from quantum numbers.
Definition Breit.hpp:255
static bool Bk_SR(int k, const DiracSpinor &v, const DiracSpinor &w, const DiracSpinor &x, const DiracSpinor &y)
Selection rule check for Breit integrals.
Definition Breit.hpp:205
DiracSpinor VbrFa(const DiracSpinor &Fa, const std::vector< DiracSpinor > &core) const
Calculates Breit contribution with automatic frequency dependence.
Definition Breit.cpp:41
DiracSpinor BWkv_bcd(int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Anti-symmetrised Breit two-body integral "right-hand-side".
Definition Breit.cpp:201
double de2(const DiracSpinor &Fv, const std::vector< DiracSpinor > &holes, const std::vector< DiracSpinor > &excited) const
The two-body Breit correction to second-order energy.
Definition Breit.cpp:400
DiracSpinor BPkv_bcd_freqw(int k, int kappa_v, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd, const double w) const
Frequency-dependent exchange Breit two-body integral "right-hand-side".
Definition Breit.cpp:614
double BPk_abcd_2(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Reduced exchange Breit matrix element (tabulated, fast lookup)
Definition Breit.cpp:347
Breit(const Params &params)
Constructs Breit interaction operator from parameters.
Definition Breit.hpp:145
double scale_factor() const
Returns the overall scaling factor.
Definition Breit.hpp:288
double BWk_abcd(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Reduced static anti-symmetrised Breit two-body matrix element.
Definition Breit.cpp:220
double BPk_abcd(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Reduced static exchange Breit two-body matrix element.
Definition Breit.cpp:214
double Bk_abcd_freqw(int k, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Fc, const DiracSpinor &Fd) const
Frequency-dependent reduced Breit two-body matrix element.
Definition Breit.cpp:429
double n
Scaling for N term (Gaunt part, default 1.0)
Definition Breit.hpp:120
DiracSpinor dV_Br(int kappa, int K, const DiracSpinor &Fa, const DiracSpinor &Fb, const DiracSpinor &Xbeta, const DiracSpinor &Ybeta) const
Breit-TDHF: Breit correction to the TDHF correction to Hartree-Fock.
Definition Breit.cpp:63
static std::pair< int, int > k_minmax(const DiracSpinor &a, const DiracSpinor &b, const DiracSpinor &c, const DiracSpinor &d)
Determine valid multipolarity range for Breit integrals.
Definition Breit.hpp:239
Parameters for constructing Breit interaction operator (s,m,n,o,p,f)
Definition Breit.hpp:114
bool Ck_kk_SR(int k, int ka, int kb)
Selection rule check for C^k: returns true if <ka||C^k||kb> may be non-zero.
Definition Wigner369j.hpp:537
std::pair< int, int > k_minmax_tj(int tja, int tjb)
Returns min and max k (multipolarity) allowed for Triangle(k,a,b), NOT accounting for parity (2j only...
Definition CoulombIntegrals.cpp:491
double g(RaB r, PrincipalQN n, DiracQN k, Zeff z, AlphaFS a)
Lower (small) radial component.
Definition DiracHydrogen.cpp:83
Functions and classes for Hartree-Fock.
Definition CI_Integrals.hpp:13