Skip to content

Fix LR force output, spin selection, virtual-window response and XC kernels - #8329

Open
maki49 wants to merge 17 commits into
deepmodeling:developfrom
maki49:lr-xc-fixes
Open

maki49 wants to merge 17 commits into
deepmodeling:developfrom
maki49:lr-xc-fixes

Conversation

@maki49

@maki49 maki49 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Truncated virtual windows now include the missing orbital-subspace response in analytic LR gradients. Single-point ks-lr also reports the KS force separately from the excitation-energy force, and HSE LR gradients retain stable response coefficients without imposing the LR floor on every ground-state Hessian.

What's changed?

  • Virtual-window gradients: add the retained/discarded virtual-subspace response for real-Gamma spin-adapted and coupled unrestricted TDA calculations. Include the added density in the Z-vector source and relaxed-density force/Hessian contractions, plus the direct energy-weighted density. Keep the truncated excitation eigenproblem unchanged; the correction vanishes for a full virtual window. Require a nondegenerate retained/discarded orbital boundary; missing occupied orbitals or uncomputed KS bands remain outside this correction.
  • Ground-state force output: report GROUND-STATE FORCE once in single-point KS+LR force runs; label the per-state LR contribution as -dOmega/dR and distinguish the excited-state total force.
  • Triplet-only nspin=1: support lr_target_spin=triplet for LR energies and gradients, with spin-resolved XC coefficients and INPUT/file-layout validation.
  • XC coefficient reuse: store closed-shell GGA combinations as scalars shared by FXC/GXC contractions, reconstruct gradient vectors during application, and reuse packed LibXC scalars for unrestricted spin blocks. Remove duplicate grid-sized vector caches; retain empty-local-grid support.
  • HSE clamping: separate GS and LR kernels; apply the clipping Jacobian only to implicit sigma dependence in LR gradients. Start GS response from raw coefficients; collectively retry non-finite e_sigma or FXC at the LR sigma floor, recomputing the complete coefficient set. Warn that recovery uses an approximate GS orbital Hessian, and stop if the retry is still non-finite. SCF is unchanged; GS response does not request KXC.

Force checks: virtual-window response

Maximum relative analytic–FD excitation-energy-force error (%), using FD energies of the same virtual window, central half-step 0.0005 Angstrom, and the same retained-multiplet normalization as Table 5. The highest complete multiplet is excluded from both the error and force scale in each SA channel or once from the joint unrestricted spectrum. All occupied orbitals and all AO-supported KS bands are available; only the Casida virtual window is truncated. SA denotes closed-shell spin adaptation; U denotes the coupled unrestricted spectrum, including unpolarized H2. Counts for U are up/down.

System Form Functional Virtuals Uncorrected Corrected Full-window reference
N2 SA HF 8 8.39606 0.00084 0.00097
Li2 SA HF 8 2.36131 0.01226 0.01553
BeH2 SA HF 8 3.28018 0.00576 0.00187
LiF SA HF 8 1.93955 0.03383 0.03343
Si SA HF 8 6.27186 0.01952 0.02727
Diamond SA HF 8 4.03653 0.16222 0.08661
h-BN SA HF 8 11.09046 0.01249 0.00927
C2H4 SA HF 8 -- -- --
H2 SA HF 8 4.31929 0.00150 0.00402
BH SA HF 9 0.66557 0.00512 0.00387
CH4 SA HF 9 10.68674 0.01475 0.14087
Li U HF 5/6 -- -- --
H2 U HF 8/8 4.31929 0.00149 0.00402
BeH U HF 8/9 0.21029 0.00057 0.00059
OH U HF 8/9 0.26833 0.00480 0.00423
O2 U HF 8/10 0.40605 0.00064 0.00041
CH3 U HF 9/10 -- -- --
BeH U PBE 8/9 0.11121 0.04860 0.04726
BeH U LDA@PBE 8/9 0.04175 0.00405 0.00467

Small-window columns use the dense Z solver; full-window values retain the earlier gap-CG force campaign with its matched full-window FD energies, except OH/HF, which was supplemented using LAPACK for the Z equation after CG failed. Full-window columns are context for numerical accuracy and do not isolate a code-version effect. A dash means a symmetry-zero tested direction (C2H4/CH3) or the full-window Li zero-force control; OH/HF now has successful dense-Z force validation for both windows. Its full-window forces are finite and its printed excitation energies match the existing reference; the saved ground state and FD energies are reused. OH uses fixed occupations and the existing 1e-6 SCF reference threshold. Corrections restore differentiation of the truncated model; they do not establish convergence to the full-window excitation energy or force. Diamond's corrected residual decreases from 0.16222% to 0.03968% on halving the FD step, consistent with central-difference truncation error.

Force checks: HSE/RPA@HSE precision, before → after

Maximum relative excitation-energy-force error (%). Both error and force normalization use retained multiplet means, excluding the highest requested complete multiplet per channel. Identical converged SCF references, structures, basis/window/auxiliary settings, and LR models are used. New central analytic forces are compared with the existing matched displaced LR energies; this validation does not rerun FD/SCF. All matched finite printed central excitation energies are unchanged. The before column is the pre-Jacobian/shared-GS-kernel diagnostic, rather than the intermediate GS-separated version that still produced BeH2 NaNs.

System Kernel No bound 1e-8 1e-6 1e-4
BeH HSE 0.028 → 0.028 0.810 → 0.064 3.282 → 0.093 8.727 → 0.139
BeH RPA@HSE 0.016 → 0.016 0.757 → 0.016 3.453 → 0.016 8.253 → 0.016
Li2 HSE 0.196 → 0.196 0.537 → 0.204 15.054 → 0.242 17.527 → 0.620
Li2 RPA@HSE 0.025 → 0.025 0.089 → 0.025 15.758 → 0.025 20.827 → 0.025
N2 HSE 100.000 → 100.000 0.001 → 0.001 0.004 → 0.001 0.056 → 0.001
N2 RPA@HSE 0.001 → 0.001 0.001 → 0.001 0.002 → 0.001 0.032 → 0.001
BeH2 HSE unstable → stopped 0.034 → 0.016 0.061 → 0.085 2.697 → 0.927
BeH2 RPA@HSE unstable → stopped 0.018 → 0.018 0.058 → 0.058 0.598 → 0.598
CH4 HSE unstable → unstable 0.029 → 0.021 0.025 → 0.018 0.652 → 0.063
CH4 RPA@HSE 0.014 → 0.014 0.047 → 0.014 0.106 → 0.014 0.709 → 0.014

Positive diagnostic bounds give finite forces in all 30 HSE/RPA@HSE comparisons. BeH2/HSE and RPA@HSE recover 0.085% and 0.058% at the production HSE bound (1e-6), while the large BeH/Li2 errors fall substantially. Recovery is approximate and does not improve every individual value. The no-bound diagnostic disables the retry floor too: BeH2 now stops instead of propagating NaNs; N2/HSE's finite but invalid large force (~100% error) and CH4/HSE's negative-root/non-finite control remain unresolved.

Peak RSS from controlled cache-reuse tests

CPU TD-PBE excitation energies + analytic forces, saved GS references, one MPI rank and one OpenMP/MKL thread, Release/GCC with KXC-enabled LibXC 5.2.3, LibRI/EXX disabled. /usr/bin/time -v peak RSS is converted to MiB. Closed-shell values are medians of two runs per version; unrestricted BeH is one uncontended pair. These are separate incremental cache optimizations, not a cumulative before/after measurement of every fix in this PR.

System Reference / grid Peak RSS before (MiB) After (MiB) Reduction
BH closed shell, 192^3 11453.8 10804.7 5.67%
N2 closed shell, 192^3 11352.4 10704.6 5.71%
BeH2 closed shell, 200^3 12708.3 11975.9 5.76%
BeH unrestricted, 180^3 9391.3 7789.5 17.06%

The closed-shell change removes 12 doubles/grid point (648 MiB at 192^3); the unrestricted change removes 36 doubles/grid point (1601.81 MiB at 180^3). Printed excitation energies agree; closed-shell maximum individual-force change is 1.1e-9 eV/Angstrom and retained-group-mean change is 1e-10 eV/Angstrom; unrestricted printed forces agree exactly. Timings did not establish a reproducible end-to-end speedup.

Why these two integration-test references changed

  • HF unrestricted: use scf_thr=1e-2 and exx_hybrid_step=2, retaining the other input settings. The original tight preliminary SCF exhausted 20 steps before the EXX update, exposing Exx Hamiltonian unfinished when KS forces were requested. A single EXX update then still left negative LR roots: inner SCF convergence with a fixed exchange potential does not establish HF outer-loop self-consistency. Allowing the second update gives finite KS/LR forces and three positive energies, 1.51518, 1.56210 and 4.21493 eV; energy and signed-force references are refreshed accordingly. This remains a coarse code-behavior regression, not a physical-accuracy benchmark.
  • PBE: every INPUT setting is retained, including scf_thr=1e-3. Force references follow scalar XC coefficient reuse; energy references and all comparison tolerances are unchanged. The reuse relies on closed-shell spin-exchange identities, e.g.

$$ \rho_\uparrow(\mathbf r)=\rho_\downarrow(\mathbf r) \quad\Rightarrow\quad f^{\rho_\downarrow\sigma_{uu}}=f^{\rho_\uparrow\sigma_{dd}}, \qquad \sigma_{ab}=\nabla\rho_a\cdot\nabla\rho_b. $$

The loose PBE reference has residual absolute magnetism 8.08e-5 mu_B despite nearly zero total magnetism; these same-point identities are only approximate, giving a maximum force change of 8.59e-6 eV/Angstrom. A separate tight-SCF control restores before/after agreement at printed precision. Both refreshed cases passed standard Autotest with four MPI ranks and one OpenMP/MKL thread, checking signed forces and all requested excitation energies.

Review follow-up validation

  • Correct scalar-triplet electron-hole density filenames and pass the selected channel explicitly to the writer. Preserve unrestricted up/down labels.

  • Add lr_tddft_lda_triplet_window_gamma to the CPU Autotest suite: all six KS bands, four occupied orbitals, one retained and one discarded virtual, scalar triplet, and out_chg=1. Signed force references are independent central differences of the same-window energies at +/-0.0005 Angstrom for every atom/direction. Maximum component error is 1.7e-4 eV/Angstrom; the filename check rejects the pre-fix singlet labels.

  • Validation passed: main MPI/LibRI build; eight focused LR/INPUT CTest targets; ctest -R '^(lr_force_collector|lr_energy_collector|md_force_collector)$'; standard Autotest.sh -a <build>/abacus_std_para -n 4 -o 1 -j 1 on the LDA scalar, LDA spin-adapted, PBE, HF, HF unrestricted and new triplet-window cases. abacus --version, abacus -h nocc, abacus -h nvirt and abacus --check-input also passed.

  • No documentation update required outside the updated nocc/nvirt Input_Item help and case README: YAML/Markdown INPUT references are generated from that metadata and are not committed. The help now distinguishes corrected real-Gamma virtual response, rejected degenerate boundaries, missing occupied/KS bands, and window convergence.

  • Further review follow-ups: nvirt help explicitly states that complex/multi-k truncated-virtual force requests are rejected and that the full available virtual window avoids that restriction. Autotest now removes only opted-in cases' old LR_e-h_density_*.cube files before launching ABACUS, preserving unrelated output and restart files.

  • Follow-up validation passed: incremental main/INPUT-test build; ctest -R '^(MODULE_IO_input_test_para(_4)?|lr_force_collector|lr_energy_collector|md_force_collector)$' (five targets); CLI help and --check-input. The density Autotest passed twice in the same directory with stale expected/extra cubes seeded before launch; a third run with out_chg=0 correctly failed only the density check. A harness regression also verifies that cases without lr_density.ref keep existing cubes.

maki49 and others added 11 commits November 16, 2026 10:28
When cal_force is enabled, single-point ks-lr now evaluates and reports the KS force once. Pass the force-table title explicitly from the KS caller through LCAO assembly so ks-lr uses GROUND-STATE FORCE while ordinary KS retains TOTAL-FORCE. Label per-state LR output as excitation-energy contributions (-dOmega/dR), and update the relaxation comment.

Validation: full CPU EXX/MPI build passed. The requested N2 LDA case completed with 2 MPI ranks and 1 thread per rank in 82.36 s. Ground-state forces match an independent ksdft run exactly at printed precision (+/-14.0918076630 eV/Angstrom along z). All six excitation energies and 12 atom-force rows match a same-source baseline without the new single-point KS-force call exactly at printed precision. One ground-state table and two excitation-contribution tables are present; the misleading old title and TOTAL-FORCE are absent in ks-lr output.

Governance: the existing global output stream is unchanged (net global dependency zero); string is required for the explicit title interface. Runtime verification and logs are recorded under checks/n2-force-output-20261104 in the calculation workspace. No INPUT changes; the output contract is documented by its titles and call-site comments.
Use lr_target_spin to select the sole nspin=1 response channel, retaining
singlet as the default. Evaluate the triplet XC kernel with a temporary
half-density shared by both spin inputs, while preserving scalar orbital,
k-point and density-matrix layouts. Keep nspin=2 channel behavior unchanged.

Update relaxation indices, gradient kernel spin metadata, RI response spin
selection, INPUT validation and external kernel-file requirements.
Documentation is updated in Input_Item metadata; generated parameter YAML
and Markdown are intentionally not committed.

Validation:
- Built abacus_std_para, esolver, io_input, MODULE_IO_input_test_para and
  MODULE_LR_pot_hxc_lrtd in /tmp/abacus-rebase-20261106-build.
- OMP_NUM_THREADS=1 ctest --test-dir /tmp/abacus-rebase-20261106-build
  -R '^(MODULE_LR_pot_hxc_lrtd|MODULE_IO_input_test_para)$'
  --output-on-failure: 2/2 tests passed; potential suite includes 14 tests.
- abacus_std_para --version: v3.11.0-beta12; -h lr_target_spin and
  --check-input passed for the nspin=1 triplet input.
- Two-rank OMP_NUM_THREADS=1 H2, H2O, CO and distorted CH4, LDA/PBE:
  24 single-point runs completed with converged SCF; compared excitation
  energies and signed force components to corresponding nspin=2 channels.
  LDA energy outputs agree and maximum force difference is 6e-10 eV/A.
  PBE maximum printed energy/force differences are 3e-6 Ry/6e-5 eV/A;
  nspin=1 and nspin=2 already differ in their ground states before LR,
  and the unchanged default singlet path reproduces this baseline difference.
- Two-rank nspin=1 triplet H2 relaxation completed two ionic steps with
  cross-geometry state tracking.
- git diff --cached --check passed; staged governance check has no errors,
  only a documentation review warning (metadata documentation updated above).
Store the closed-shell fxc gradient contractions as scalar arrays and
multiply by the ground-state gradient during potential evaluation.
Reuse these arrays for the equal gxc transition-gradient coefficients,
removing duplicate contractions and buffers. Preserve the nspin=1
singlet normalization and the nspin=2 singlet/triplet weights.

Add an independent contraction regression test for nspin=1 and both
closed-shell nspin=2 channels. General open-shell contractions are
unchanged.

Validation:
- CPU Release build with KXC-enabled LibXC 5.2.3; 15 potential tests pass.
- Twelve TD-PBE excitation/analytic-force runs: BH, N2 and BeH2, two
  runs per binary, with one MPI rank and one OpenMP/MKL thread.
- Printed excitation energies agree; maximum individual force change
  is 1.1e-9 eV/Angstrom and retained multiplet-mean change is 1e-10.
- Peak RSS falls about 5.7%; timings show no consistent overall speedup.
- git diff --check passes. No INPUT parameters change.
Port the GS-response portion of Shane-Sayoko's HSE derivative fix from
415f0e0. Keep the LR sigma floor while
using raw sigma and second derivatives only for HSE orbital response.
Preserve this branch's scalar GGA cache and nspin=1 triplet layout checks.
No NAC, SCF potential or density-cutoff changes are included.

Validation: built MODULE_LR_xc_kernel and MODULE_LR_pot_hxc_lrtd in the
existing isolated CPU source snapshot, with the ported sources verified
byte-identical to this worktree. OMP_NUM_THREADS=1 ctest --test-dir
/tmp/xc-scalar-reuse-build -R '^(MODULE_LR_xc_kernel|MODULE_LR_pot_hxc_lrtd)$'
-V passed 2/2 entries. Kernel-role regression compares FXC directly to
LibXC at raw sigma and confirms that the GS factory does not request KXC.
Behavior and remaining GS/LR low-density-cutoff limitations are documented
in the API and implementation comments; no INPUT interface changes.
Port the closed- and open-shell chain-rule portion of Shane-Sayoko's
415f0e0. Store the componentwise sigma
preparation Jacobian and apply it only to implicit sigma dependencies in
the closed-shell divergence coefficients and unrestricted drho*upp term.
Preserve the local terms and explicit transition-gradient factors.

Adapt the author's tests to this branch's shared scalar GGA coefficient
cache, retaining its existing normalization. Do not import the NAC branch's
empty-grid support, NAC interfaces, documentation or unrelated formatting.
LR excitation matrix values, the sigma floor and GS cutoffs are unchanged.
API comments document the Jacobian layout, lifetime and derivative model;
there are no INPUT changes requiring generated parameter documentation.

Validation:
- Built MODULE_LR_xc_kernel, MODULE_LR_pot_grad_xc and
  MODULE_LR_pot_hxc_lrtd in the existing isolated CPU snapshot; all modified
  sources were checked against this worktree.
- OMP_NUM_THREADS=1 ctest --test-dir /tmp/xc-scalar-reuse-build
  -R '^(MODULE_LR_xc_kernel|MODULE_LR_pot_grad_xc|MODULE_LR_pot_hxc_lrtd)$'
  -V: 3/3 entries and 22 individual tests passed. LibXC 5.2.3-KXC actually
  executed the HSE derivative tests; none skipped.
- Independent FXC quadratic-form finite differences cover clipped RKS,
  both unrestricted free spins, positive/negative mixed sigma, mixed
  clipped/unclipped components, and two FD steps. Closed-shell limits and
  PBE identity controls passed without tolerance changes.
- Negative control in the temporary snapshot, with implicit Jacobians
  disabled, failed both the RKS derivative and unrestricted FD regressions.
  Restored corrected sources, rebuilt, and reran all three entries above.
- Staged whitespace check passed; governance reports no errors, only its
  documentation review warning (API documentation updated).

No new molecular force finite-difference runs or full executable builds
were performed for this port.
Port the local-grid handling from Shane-Sayoko's NAC branch independently
of its NAC functionality. An empty spin cutoff is a no-op only for empty
coefficient arrays; inconsistent nonempty data still throws. Track GXC
construction explicitly so zero local array length does not mean a
requested spin combination is unavailable. Retain FFT calls on empty
ranks rather than bypassing potentially collective operations.

Source: 15f939b and the regression
fixtures in 415f0e0. Restore the
author's empty-grid tests and extend coverage to closed-shell gradient
contractions. Missing spin combinations and HF kernels still reject GXC
access. No INPUT or physical-model changes; behavior is documented in
GxcCoef's availability comment.

Verification: built MODULE_LR_xc_kernel, MODULE_LR_pot_grad_xc and
MODULE_LR_pot_hxc_lrtd in /tmp/xc-scalar-reuse-build. With
OMP_NUM_THREADS=1, ctest --test-dir /tmp/xc-scalar-reuse-build
-R '^(MODULE_LR_xc_kernel|MODULE_LR_pot_grad_xc|MODULE_LR_pot_hxc_lrtd)$'
-V passed 3/3 entries and all 27 individual tests, with no skips.
Tests exercise zero local grids through isolated FFT mocks; no real
empty-rank distributed-FFT runtime case was run. Staged whitespace check
passed; governance has no errors, only a documentation-review warning.
Remove twelve cached three-component open-shell GGA arrays and construct
all four spin blocks from the packed LibXC scalar derivatives instead.
Reuse these scalars in the first- and second-order potential contractions,
keeping independent spin gradients and existing HSE clipping behavior.
Select spin-dependent weights, gradient pointers, and derivative indices
before the grid loops; contract only the two active sigma channels.
Read only structurally active components to avoid new zero-times-NaN
contributions. Remove manuscript-specific coefficient notation from the
previous closed-shell cache comment.

Validation: 29 LR kernel/potential tests pass, including independent
four-block Cartesian contractions and inactive-component NaN coverage.
BeH TD-PBE LR-plus-force regression (one MPI rank, one thread) preserves
all printed eigenvalues and force components. The follow-up loop-hoisting
check uses a common converged 10 Ry ground state and compares both versions.
No performance measurements were made for this follow-up.
Removing 36 doubles per grid point reduces peak RSS by about 1.56 GiB
in the original 180^3-grid benchmark before loop hoisting.

Documentation: no user-facing INPUT, solver behavior, or supported-functional
changes; this changes internal cache representation and contractions only.
Move the three focused XC suites and their existing CMake targets into the
current unit-test directory. Preserve source contents, assertions and CTest
names. No INPUT or numerical behavior changes. Legacy Makefile and pyabacus
source lists do not include these test sources.

Validation: full PR CPU build and four XC plus one INPUT CTest passed with
KXC-enabled LibXC 5.2.3. Full-window nspin=1 singlet/triplet single points
completed. This commit only relocates tests and their build registrations.
Preserve raw HSE GS-response coefficients when finite. If any rank reports
non-finite e_sigma or FXC, collectively rebuild the complete response with
the existing LR sigma floor, keeping first- and second-order coefficients
at the same evaluation point. Reject a non-finite retry; report successful
recovery as an approximate GS orbital Hessian without changing SCF or the
LR sigma Jacobian.

Cover raw preservation, real LibXC small-gradient failures in both spin
layouts, empty-rank collective recovery, and collective retry failure.
Document the approximation and expose read-only construction metadata.

Validation: focused XC/kernel/gradient CTests including 4-rank recovery;
Table 5 production defaults and all 44 threshold comparisons accepted.
Analytic central forces are freshly evaluated; unchanged displaced LR
energies at the same fixed SCF references are reused for FD comparison.
Diagnostic threshold overrides remain outside the production source.
Staged governance and diff format checks pass. No INPUT changes.

(cherry picked from commit 7496f7e)
Remove the HSE response note and its developer-guide index entry. The virtual-window response note is not present on this branch. Keep both manuscript-specific response notes outside this PR; source behavior and tests are unchanged.
Copilot AI balanced review requested due to automatic review settings November 18, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

…adients

Account for the retained virtual subspace response in the Z-vector source,
relaxed difference density, and occupied/direct energy-weighted density.

(cherry picked from commit 7a5b911)
@maki49 maki49 changed the title Fix LR force output, triplet-only response, XC cache reuse and HSE gradients Fix LR force output, spin selection, virtual-window response and XC kernels Nov 18, 2026
Recognize both the historical and explicit -dOmega/dR force-table headings
in the total-force collector and signed LR force checker. Stop collecting
when a table ends so KS and total excited-state forces remain excluded.

Cover new/mixed headings, force sums, excluded tables, sign changes and
missing components. Production calculations, references and tolerances
are unchanged.

Validation: 8 LR checker unit tests and 3 collector CTests passed. Replayed
four actual CI-case outputs: LDA nspin=1/2 and closed-shell HF match their
references; PBE is parsed successfully and still reports its independent
small signed-force discrepancy. Staged governance and whitespace checks
passed. No documentation update is needed for test-parser compatibility.
Use scf_thr=1e-2 for the unrestricted HF behavior regression so the
preliminary SCF reaches its EXX update and KS forces can be evaluated.
Refresh its signed excitation-energy forces and excitation energies;
two lowest roots remain negative, as documented for this deliberately
coarse code-path regression.

Keep every PBE INPUT setting unchanged. Refresh force references for
closed-shell scalar XC coefficient reuse at the existing loose spin-density
reference; excitation energies and all comparison tolerances are unchanged.
Explain the finite local spin asymmetry and the tight-SCF control in README.

Validation: both cases passed the standard Autotest harness with four MPI
ranks and one OpenMP/MKL thread, including signed forces and all requested
excitation energies. Ground-state and LR force output is finite; HF reaches
its EXX update and the configured SCF criterion. Three collector CTests,
staged governance and whitespace checks passed. No production code changes.
Change only exx_hybrid_step from 1 to 2 in the coarse unrestricted HF
integration input. A single fixed-exchange inner SCF left negative LR
roots; the second EXX update gives three positive requested roots while
retaining ecutwfc=10, scf_thr=1e-2 and scf_nmax=20.

Refresh signed LR forces and excitation-energy references and explain
the behavior-test scope in README. PBE and all tolerances are unchanged.

Validation: the standard Autotest harness passed the unrestricted HF and
unchanged PBE cases with four MPI ranks and one OpenMP/MKL thread.
All 27 HF and 36 PBE force components and all requested excitation
energies pass. The HF run reports finite KS/LR forces and positive roots
1.5151843, 1.5621012 and 4.2149284 eV. Staged governance and whitespace
checks passed. No production source changes.

@ABACUS-PR-BOT ABACUS-PR-BOT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scalar-triplet density output is mislabeled as singlet. This was a static source review; no builds or runtime tests were run.

Non-blocking: please update the nocc/nvirt help in read_inp_tddft.cpp for the corrected real-Gamma virtual response and the nondegenerate-boundary requirement. It still describes the old missing-response approximation and warning-only behavior. Retain the separate limits for omitted occupied orbitals, uncomputed KS bands and window convergence.

@maki49

maki49 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

Re: nocc/nvirt help — updated in 8dfbd33. The help now describes the corrected real-Gamma virtual response and rejected degenerate boundary, while retaining the omitted-occupied, uncomputed-KS-band and window-convergence caveats. Both CLI help commands and --check-input were verified.

@ABACUS-PR-BOT ABACUS-PR-BOT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The density-label fix and production regression are in place. Two nonblocking follow-ups remain below. This was a static source review; no builds, CLI checks or numerical tests were run.

@maki49 maki49 closed this Nov 19, 2026
@maki49 maki49 reopened this Nov 19, 2026
@mohanchen mohanchen added EXX/lr-TDDFT/RPA/BSE/GW Related to beyond DFT methods Refactor Refactor ABACUS codes labels Nov 19, 2026
@maki49 maki49 closed this Nov 19, 2026
@maki49 maki49 reopened this Nov 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EXX/lr-TDDFT/RPA/BSE/GW Related to beyond DFT methods Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants