pytc.solver.bug_rpa.weighted_pairs

pytc.solver.bug_rpa.weighted_pairs(B, mo_energy, mo_occ, occ_tol=1e-06)[source]

Direct-RPA pair factors and gaps for a (possibly) fractional reference.

B holds (p q|P) for p, q in pair_window(), shape (|O|, |V|, naux). With spin-summed occupations f, the pair p -> q enters chi_0 with weight n = (f_p - f_q) / 2, which folds into the factors as sqrt(n) B; the problem is then an ordinary one in (sqrt(n) B, e_q - e_p) and kernel() solves it unchanged. Every pair of the window with n > 0 is kept, however small n: as in fcdmft, occ_tol only selects the orbitals. (Near-degenerate pairs have tiny n and tiny gap but a finite n / gap; cutting them at n > occ_tol moved a 36-Cu slab by 2e-6 Ha against fcdmft.) Pairs with no weight (equal occupations, or the wrong direction) get zero factors and a positive dummy gap, so they decouple exactly. Integer occupations return (B, e_i - e_a).

Parameters:
  • B (numpy.typing.NDArray.numpy.generic)

  • mo_energy (numpy.typing.NDArray.numpy.generic)

  • mo_occ (numpy.typing.NDArray.numpy.generic)

  • occ_tol (float)

Return type:

tuple[numpy.typing.NDArray.numpy.generic, numpy.typing.NDArray.numpy.generic]