Iteration 0006 — 7612d6ba4e26 (accepted)

GitHub commit: 7612d6ba4e26 Published branch: fermilink-optimize/pyscf-davidson

Change summary

Cap symmetric _lr_eig.eigh Davidson expansion to requested roots to avoid non-target Casida residual/preconditioner work

Acceptance rationale

Primary metric improved 17.1% vs incumbent with correctness passing and no hard-reject or forbidden-path condition.

Guardrails & metrics

field

value

decision

ACCEPTED

correctness

ok

correctness mode

field_tolerances

hard reject

no

guardrail errors

0

incumbent commit

ccc6bedc3559

candidate commit

7612d6ba4e26

incumbent metric

45.1467

candidate metric

37.4126

baseline metric

128.753

Δ vs incumbent

+17.131% (lower-is-better sign)

changed files

pyscf/tdscf/_lr_eig.py

Diffstat

pyscf/tdscf/_lr_eig.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Diff

download full diff

diff --git a/pyscf/tdscf/_lr_eig.py b/pyscf/tdscf/_lr_eig.py
index e9a3b6656..328c17319 100644
--- a/pyscf/tdscf/_lr_eig.py
+++ b/pyscf/tdscf/_lr_eig.py
@@ -81,8 +81,9 @@ def eigh(aop, x0, precond, tol_residual=1e-5, lindep=1e-12, nroots=1,
     if MAX_SPACE_INC is None:
         space_inc = nroots
     else:
-        # Adding too many trial bases in each iteration may cause larger errors
-        space_inc = max(nroots, min(MAX_SPACE_INC, x0_size//2))
+        # Keep TD response expansion focused on requested roots instead of
+        # spending residual/preconditioner work on non-target Ritz vectors.
+        space_inc = nroots

     max_space = int(max_memory*1e6/8/x0_size / 2 - nroots - space_inc)
     if max_space < nroots * 4 < x0_size: