Skip to content

Add diffuse basis sets (6-31+G*, 6-31++G**, aug-cc-pVDZ, def2-SVPD) - #148

Merged
NCCU-Schultz-Lab merged 2 commits into
mainfrom
claude/hopeful-noether-w39vs3
Oct 14, 2026
Merged

NCCU-Schultz-Lab merged 2 commits into
mainfrom
claude/hopeful-noether-w39vs3

Conversation

@NCCU-Schultz-Lab

@NCCU-Schultz-Lab NCCU-Schultz-Lab commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds four diffuse basis sets to QuantUI for anion and radical-anion calculations, where diffuse functions are essential for accurately describing loosely held extra electrons. Each set is positioned next to its parent basis in the menu and is available with PySCF (PyFock's menu is unchanged).

Key Changes

Configuration & Discovery

  • Added 6-31+G*, 6-31++G**, aug-cc-pVDZ, and def2-SVPD to config.SUPPORTED_BASIS_SETS
  • New config.DIFFUSE_BASIS_SETS frozenset and config.is_diffuse_basis() function to identify diffuse sets (including Pople parenthesis aliases like 6-31+G(d))
  • Updated pople_notation_alias() to handle new Pople diffuse sets

User Guidance

  • Basis descriptor cards now mark diffuse sets with a "Diffuse" label
  • Educational notes explain diffuse functions and nudge anions on non-diffuse bases toward diffuse alternatives
  • Help topic expanded with "Anions need diffuse functions" section listing all four sets and their use cases
  • Documentation (methods.md, README, Apptainer README) updated with diffuse sets in the basis progression

Computational Resources

  • Added basis-function counts for all four new sets to calc_log._BASIS_FUNCTIONS (verified against PySCF 2.14)
  • Fixed 75+ existing entries in the basis-function table that had drifted from PySCF (e.g., def2-TZVP H was 14, PySCF 6; 6-31G* Li was 9, PySCF 14)
  • Added BASIS_FACTORS in slurm_utils.py for memory scaling: 6-31+G* (2.5), 6-31++G** (3.0), aug-cc-pVDZ (4.0), def2-SVPD (3.5)
  • New test test_basis_function_table_matches_pyscf() guards against future drift

Engine Support

  • PyscfEngine advertises all four diffuse sets in capabilities
  • PyFock engine correctly excludes them (neutral closed-shell only)

Testing

  • Comprehensive test suite (tests/test_diffuse_basis.py, 242 lines) covering:
    • Menu presence and ordering (each diffuse set next to its parent)
    • Notation aliases and diffuse detection
    • Engine capabilities
    • Descriptor cards and educational notes
    • Basis-function counts
    • PySCF name resolution and UKS anion convergence (integration tests)
    • Coverage guards for element availability

Implementation Notes

  • Pople diffuse sets use both notations: 6-31+G* / 6-31+G(d) and 6-31++G** / 6-31++G(d,p) are treated as equivalent
  • 6-31++G** is the only basis where H and He differ in function count (H 6, He 5 due to the second + adding diffuse s on H only)
  • def2-SVPD carries ECPs and is the diffuse choice for heavy elements and metal complexes
  • All basis-function counts are generated from PySCF's Mole.nao and validated by CI

NCCU-Schultz-Lab and others added 2 commits October 13, 2026 22:17
Anions and radical anions need diffuse functions; the menu had none. Each
new set sits next to the set it extends. PySCF accepts all four names and
the 6-31+G(d) / 6-31++G(d,p) spellings.

- config: SUPPORTED_BASIS_SETS gains the four; DIFFUSE_BASIS_SETS and
  is_diffuse_basis() (both Pople notations).
- PyFock's basis subset is unchanged, so its menu is unaffected.
- Basis card adds a one-line "Diffuse" marker; educational notes explain
  diffuse functions and nudge an anion on a non-diffuse basis.
- Help topic: "Anions need diffuse functions" paragraph, 6-31+G(d) row,
  def2 "D" suffix.
- SLURM BASIS_FACTORS (and so the quantui-batch site constants) and the
  calc_log basis-function table cover the new sets (counts from PySCF).
- Docs: methods.md, features.md, README, apptainer README,
  copilot-instructions. CHANGELOG entry.
- tests/test_diffuse_basis.py; the H == He table check exempts 6-31++G**
  (PySCF puts no diffuse s on He).

Contributions:
- Claude (Opus 5.5): code edits, review, and conceptual discussion
- Jonathan Schultz: overall vision, planning, review, and orchestration

Co-authored-by: Jonathan Schultz <nccu-schultz-lab@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The hand-typed _BASIS_FUNCTIONS table disagreed with PySCF's Mole.nao for
75 element/basis entries: all of def2-TZVP (H 14 vs 6, C 30 vs 31), Li/Be
and Na-Ar in 6-31G*, 6-31G**, cc-pVDZ, cc-pVTZ and def2-SVP, and Al-Ar in
3-21G and 6-31G. count_basis_functions feeds n_basis into the time
estimator, so these skewed the n_basis-scaled estimates.

Every entry is now PySCF's spherical AO count (QuantUI never sets
mol.cart). test_basis_function_table_matches_pyscf checks the whole table
against PySCF; the diffuse-set-only version of that check moves into it.

Old perf-log records keep the n_basis they were logged with; noted in the
CHANGELOG.

Contributions:
- Claude (Opus 5.5): code edits, review, and conceptual discussion
- Jonathan Schultz: overall vision, planning, review, and orchestration

Co-authored-by: Jonathan Schultz <nccu-schultz-lab@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@NCCU-Schultz-Lab
NCCU-Schultz-Lab merged commit 878c397 into main Oct 14, 2026
6 checks passed
@NCCU-Schultz-Lab
NCCU-Schultz-Lab deleted the claude/hopeful-noether-w39vs3 branch October 14, 2026 04:12
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