pytc.solver.bug_rpa.kernel

pytc.solver.bug_rpa.kernel(B_ov, eia, tau=0.0001, maxiter=100, conv=1e-10, rmin=1, damp=0.7, max_rank=None, init=None, aug_k=None, aug_sel='residual', energy_plateau_tolerance=None, amplitude_tol=None, truncation='relative', host_backed=False, block_rows=None, dense_core='device')[source]

Low-rank closed-shell dRPA from the DF factor B_ov (nocc, nvir, naux) and eia = e_i - e_a.

tau/truncation cut the Galerkin core (bug_core.truncate_sym()); damp mixes the new core with the old amplitudes; aug_k is the count, or fraction of the rank, of residual directions added per iteration (None: as many as the rank), chosen by projected-residual norm (aug_sel='residual') or in amplitude order ('amplitude'). host_backed keeps B_ov and the basis in host memory; block_rows is the row panel of the streamed kernels (default from the device arena). dense_core runs the core solve and the truncation eigh on the device ("device"; out of memory stops the run) or on the host CPU ("host"). Stops by bug_core.check_stop(). U is returned as (nocc, nvir, rank).

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

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

  • tau (float)

  • maxiter (int)

  • conv (float)

  • rmin (int)

  • damp (float)

  • max_rank (int | None)

  • init (tuple[numpy.typing.NDArray.numpy.generic, numpy.typing.NDArray.numpy.generic] | None)

  • aug_k (float | None)

  • aug_sel (Literal['amplitude', 'residual'])

  • energy_plateau_tolerance (float | None)

  • amplitude_tol (float | None)

  • truncation (Literal['relative', 'absolute', 'energy'])

  • host_backed (bool)

  • block_rows (int | None)

  • dense_core (Literal['device', 'host'])

Return type:

LowRankResult