Skip to content

Commit 49fa740

Browse files
andyclaude
andcommitted
Adjudicator: handle SP shells, and spot-check the sets that agreed
The spot-check of basis sets where ECCE and BSE already agree found a bug in the harness rather than in any basis set. 6-311G came out at -331 Hartree for an oxygen atom, from BOTH sources -- an impossible number, and identical from both, which is the tell that the tool was at fault. Cause: a shell label says which angular momentum each coefficient column carries. "SS" is two s functions sharing primitives; "SP" is one s and one p. Taking shell[0] for every column turned every Pople SP shell into two s functions, so the atom was computed in an all-s basis. Fixed, and 6-311G now reproduces both built-ins exactly from both sources. All six earlier adjudications were re-run against the fixed harness and are unchanged -- none of those basis sets uses SP shells -- so the finding that ECCE's Ahlrichs VDZ, Ahlrichs TZV and cc-pVQZ-DK data is wrong for certain elements stands. The spot-check itself then came out reassuring. Against the codes' built-ins, for oxygen: STO-3G ECCE 0.0 BSE 2.8e-08 cc-pVQZ ECCE 4.7e-11 BSE 4.7e-11 def2-TZVP ECCE 0.0 BSE 0.0 cc-pV5Z-DK ECCE 1.1e-08 BSE 1.1e-08 cc-pVTZ ECCE 4.1e-11 BSE 4.1e-11 cc-pVDZ ECCE 0.0 BSE 1.1e-09 6-311G ECCE 0.0 BSE 0.0 So the shipped library is sound for ordinary use, and the errors found are localised to particular elements of particular less-common basis sets rather than being systemic. That is a materially different situation from what the raw ECCE-versus-BSE diff suggested, and it only became visible by bringing in an independent reference. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFMUNbw2UpRPmgsqviAowb
1 parent 050c3d5 commit 49fa740

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎tools/basissets/adjudicate.py‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,17 @@ def orca_newgto(element, shells):
5757
"""
5858
out = ["NewGTO %s" % element]
5959
for shell, nprim, ncoef, rows in shells:
60-
letter = shell[0]
61-
if letter not in LETTER:
62-
return None # SP and friends: not handled
60+
# Each coefficient column is its own contracted function, and the
61+
# shell label says which angular momentum each column carries:
62+
# "SS" is two s functions sharing primitives, "SP" is one s and
63+
# one p. Taking shell[0] for every column turns an SP shell into
64+
# two s functions -- which silently produced an oxygen atom at
65+
# -331 Hartree instead of -74.8 before this was fixed.
66+
letters = list(shell) if len(shell) == ncoef else [shell[0]] * ncoef
6367
for column in range(ncoef):
68+
letter = letters[column] if column < len(letters) else shell[0]
69+
if letter not in LETTER:
70+
return None
6471
kept = [(r[0], r[column + 1]) for r in rows
6572
if len(r) > column + 1 and float(r[column + 1]) != 0.0]
6673
if not kept:

0 commit comments

Comments
 (0)