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