Skip to content

feat: add deltaSCF methods - #11

Merged
wtpeter merged 3 commits into
NonDFT:mainfrom
wtpeter:feat/sgm-roks
Sep 16, 2026
Merged

wtpeter merged 3 commits into
NonDFT:mainfrom
wtpeter:feat/sgm-roks

Conversation

@wtpeter

@wtpeter wtpeter commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

This pull request adds four new example scripts to the examples/deltascf directory, demonstrating different approaches for core-excitation calculations using the NEST package with PySCF. The examples cover SGM and FR delta-SCF methods, the use of TDA-based initial guesses, and the application of NTTDA for singlet excitations, providing comprehensive reference workflows for advanced excited-state electronic structure calculations.

New example scripts for delta-SCF and NTTDA workflows:

  • SGM and FR delta-SCF core excitation examples:

    • Added 01_sgm.py: Demonstrates CH₄ core excitation using the SGM method with a canonical-orbital guess, including detailed reference comments and stepwise calculation of the triplet state.
    • Added 02_fr.py: Demonstrates CH₄ core excitation using the FR method with a canonical-orbital guess, showing the freeze-and-release workflow and reporting on both freeze and release convergence.
  • Advanced initial guess and post-delta-SCF excited-state example:

    • Added 03_tda_guess.py: Shows how to use a core-TDA calculation to generate an initial guess for a C₂H₃F core-excited state, followed by optimization with either SGM or FR, including explicit construction of the initial particle orbital.
  • NTTDA calculation using a delta-SCF reference:

    • Added 04_nttda.py: Runs a deltaS=-1 NTTDA calculation for CH₄, using a previously optimized delta-SCF triplet (via SGM or FR) as the reference, and compares excitation energies relative to the ground state.

Add analytic square-gradient minimization, SOMO subspace diagnostics, and directional curvature analysis with regression tests and a triplet example. Preserve the energy-gap preconditioner as the baseline before adding alternative preconditioners.
Add an exact Gauss-Newton diagonal with configurable refresh intervals and a full-Fock approximation without additional density responses. Keep the gap preconditioner as the default.

Validation: SGM tests passed (12 tests and 11 subtests), Ruff passed, and all three preconditioners converged the HCHO triplet benchmark to a gradient norm below 1e-7.
@wtpeter
wtpeter merged commit 35f79f5 into NonDFT:main Sep 16, 2026
1 check passed
@wtpeter
wtpeter deleted the feat/sgm-roks branch September 25, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant