Iteration 0002 — e159c73ee967 (accepted)¶
GitHub commit: e159c73ee967 Published branch: fermilink-optimize/pyscf-davidson
Change summary¶
Limit real TDDFT Davidson expansion in _lr_eig.real_eig to requested roots to avoid non-target residual/preconditioner work
Acceptance rationale¶
Primary metric improved 41.0% vs incumbent with correctness passing and no hard-reject condition.
Guardrails & metrics¶
field |
value |
|---|---|
decision |
ACCEPTED |
correctness |
ok |
correctness mode |
field_tolerances |
hard reject |
no |
guardrail errors |
0 |
incumbent commit |
|
candidate commit |
|
incumbent metric |
99.5699 |
candidate metric |
58.7037 |
baseline metric |
128.753 |
Δ vs incumbent |
+41.043% (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¶
diff --git a/pyscf/tdscf/_lr_eig.py b/pyscf/tdscf/_lr_eig.py
index 2acd5e230..87fdadfea 100644
--- a/pyscf/tdscf/_lr_eig.py
+++ b/pyscf/tdscf/_lr_eig.py
@@ -534,8 +534,9 @@ def real_eig(aop, x0, precond, tol_residual=1e-5, nroots=1, x0sym=None, pick=Non
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, A_size//2))
+ # Real TDDFT response batches are expensive. Keep the expansion focused
+ # on requested roots instead of adding non-target search roots.
+ space_inc = nroots
max_space = int(max_memory*1e6/8/(4*A_size) / 2 - space_inc)
if max_space < nroots * 4 < A_size: