Skip to content

Commit aab4d77

Browse files
andyclaude
andcommitted
Basis data: Fortran D exponents were being read without the exponent
The root cause of the "wrong basis set data" found while adjudicating against the codes' built-ins turns out to be systemic and much simpler than bad data. 11 files held 24045 values written in Fortran D notation: 0.30612488044D-01 EDSIGaussianBasisSetLibrary.C reads these with strtod(), which stops at the "D" and returns the mantissa alone -- 0.30612488044, ten times too large. Perl's numeric conversion, used by rdStandardGBS.pm and the wr*GBS.pm writers, does exactly the same. Both confirmed directly rather than assumed. Nothing reported an error anywhere; the basis was simply wrong for every element written that way. Converted to E notation, which every reader handles. Among the files affected: STO-6G, WTBS, and the cc-pV*Z files behind cc-pCVDZ, cc-pwCVDZ and the aug-cc-pV*Z diffuse sets. STO-6G for argon could not even be parsed before and now reproduces both codes' built-in copies to 3e-09 Hartree. tests/basis now fails on any D notation in a .BAS or .POT, self-tested by reintroducing an affected file. CORRECTION to my earlier reporting. I described this as ECCE's stored data being wrong by up to 1.78 Hartree, measured by converting both sources and running them. The conclusion was right but the mechanism I gave was not: Python's float() REJECTS D notation, so my comparison was silently skipping those rows, and what I measured was my own parser dropping data rather than ECCE's reading it wrongly. Both are real faults; they are not the same fault, and the number I quoted belonged to mine. Ahlrichs VDZ, Ahlrichs TZV and cc-pVQZ-DK were separately regenerated from BSE before this was understood. They are kept: the regenerated files are correct, verified against both codes' built-ins, and carry more precision. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFMUNbw2UpRPmgsqviAowb
1 parent 49fa740 commit aab4d77

18 files changed

Lines changed: 9132 additions & 8994 deletions

‎data/admin/basissets/AHLRICHS_TZV.BAS‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,8 @@ contraction shell=P num_primitives=3 num_coefficients=1
738738
contraction shell=P num_primitives=1 num_coefficients=1
739739
0.52555094893 1.0000000000
740740
contraction shell=D num_primitives=4 num_coefficients=1
741-
56.563189119 .11543245294532D-01
742-
16.278734711 .70299845987196D-01
741+
56.563189119 .11543245294532E-01
742+
16.278734711 .70299845987196E-01
743743
5.6964273914 .22450770821295
744744
2.1411147942 .39703065434226
745745
contraction shell=D num_primitives=1 num_coefficients=1

‎data/admin/basissets/AHLRICHS_VDZ.BAS‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ contraction shell=P num_primitives=3 num_coefficients=1
530530
1.1791047769 0.57272062927
531531
0.43369774432 0.24582728206
532532
contraction shell=D num_primitives=4 num_coefficients=1
533-
27.559479426 0.30612488044D-01
533+
27.559479426 0.30612488044E-01
534534
7.4687020327 0.15593270944
535535
2.4345903574 0.36984421276
536536
0.78244754808 0.47071118077
@@ -916,12 +916,12 @@ contraction shell=P num_primitives=1 num_coefficients=1
916916
contraction shell=P num_primitives=1 num_coefficients=1
917917
0.13353413325 1.0000000000
918918
contraction shell=D num_primitives=4 num_coefficients=1
919-
94.494024044 0.23490101098D-01
920-
27.188185260 0.13747735767D+00
921-
9.5091567352 0.36649929124D+00
922-
3.4170516853 0.48750989884D+00
919+
94.494024044 0.23490101098E-01
920+
27.188185260 0.13747735767E+00
921+
9.5091567352 0.36649929124E+00
922+
3.4170516853 0.48750989884E+00
923923
contraction shell=D num_primitives=1 num_coefficients=1
924-
1.1479590083 0.27657943383D+00
924+
1.1479590083 0.27657943383E+00
925925
atom=Br
926926
contraction shell=S num_primitives=6 num_coefficients=1
927927
113286.38776 0.14283037779E-02
@@ -957,7 +957,7 @@ contraction shell=P num_primitives=1 num_coefficients=1
957957
contraction shell=P num_primitives=1 num_coefficients=1
958958
0.15702758965 1.0000000000
959959
contraction shell=D num_primitives=4 num_coefficients=1
960-
104.85518642 0.22650147581D-01
960+
104.85518642 0.22650147581E-01
961961
30.281143688 0.13455483230
962962
10.651394267 0.36474454537
963963
3.8699456233 0.49044587056
@@ -998,7 +998,7 @@ contraction shell=P num_primitives=1 num_coefficients=1
998998
contraction shell=P num_primitives=1 num_coefficients=1
999999
0.18319467414 1.0
10001000
contraction shell=D num_primitives=4 num_coefficients=1
1001-
115.55868603 0.21945485333D-01
1001+
115.55868603 0.21945485333E-01
10021002
33.477985864 0.13211212879
10031003
11.834450207 0.36333306964
10041004
4.3408254894 0.49300484446

‎data/admin/basissets/CC-PV5Z.BAS‎

Lines changed: 194 additions & 194 deletions
Large diffs are not rendered by default.

‎data/admin/basissets/CC-PV5Z_PLUS_D.BAS‎

Lines changed: 192 additions & 192 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)