Skip to content

Commit 21bebb1

Browse files
andyclaude
andcommitted
tests/parsers: cover Gaussian correlated-method energies
A real CCSD(T)/6-31G run on water, covering the MP2/MP3/MP4/CCSD/CCSD(T) energy branches that no fixture exercised. Six of those entries match a block on this job and emit nothing, which from the outside is indistinguishable from #85 -- and that is exactly why it is worth a fixture. It turns out to be correct: gaussian-16.energy gates its whole body on runtype =~ /Geo/i (line 114, documented in its own header), so for a non-optimisation job the energies come from the archive block via gaussian-16.db instead. The point of the case is that the fallback is now asserted rather than assumed. All seven archive energies are pinned (ESCF, EMP2, EMP3, EMP4DQ, EMP4SDQ, ECCSD, ECCSDTPERT) and cross-checked against the per-line values in the log: EUMP2 = -0.76111680142148D+02 and CCSD(T) = -0.76119325411D+02 agree with EMP2 and ECCSDTPERT. Previously nothing anywhere verified that a single-point correlated job's energy reaches the property store at all. Also confirms the documented [EMP21]/[EMP22] EUMP2 Begin collision is harmless in practice, as the allowlist entry claims. 873 -> 887 checks, passing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent af34863 commit 21bebb1

5 files changed

Lines changed: 825 additions & 0 deletions

File tree

‎tests/parsers/cases.py‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,52 @@
159159
},
160160
),
161161

162+
dict(
163+
name='g16-h2o-ccsdt',
164+
desc='gaussian-16.desc',
165+
fixture='gaussian-16/h2o_ccsdt.log',
166+
# CCSD(T)/6-31G on water. Covers the correlated-method energy
167+
# branches, which no fixture exercised: [EMP21]/[EMP22] (the
168+
# documented EUMP2 Begin collision) and [ECCSDTPERT].
169+
parse_args=('.', 'Energy', 'CC', 'CCSD(T)', '0'),
170+
silent_ok={
171+
'DELTAE': 'runtype-gated to /Geo/i (see g16-co-freq).',
172+
'RMSDP': 'runtype-gated to /Geo/i (see g16-co-freq).',
173+
# gaussian-16.energy gates its whole body on runtype =~ /Geo/i
174+
# (line 114), by design and documented in its own header: for a
175+
# non-optimisation job the energies come from the archive block
176+
# via gaussian-16.db instead, which the POLARIZ1 assertions
177+
# below verify actually happens. So every one of these matching
178+
# a block and emitting nothing is correct, not #85's shape --
179+
# worth spelling out, because six entries firing silently is
180+
# exactly what that bug looks like from the outside.
181+
'ESCF1][ESCFVEC': 'runtype-gated to /Geo/i; archive supplies it.',
182+
'EMP21][EMP2VEC': 'runtype-gated to /Geo/i; archive supplies it.',
183+
'EMP3][EMP3VEC': 'runtype-gated to /Geo/i; archive supplies it.',
184+
'EMP4DQ][EMP4DQVEC': 'runtype-gated to /Geo/i; archive supplies it.',
185+
'EMP4SDQ][EMP4SDQVEC': 'runtype-gated to /Geo/i; archive supplies it.',
186+
'ECCSDTPERT': 'runtype-gated to /Geo/i; archive supplies it.',
187+
'ECCD][ECCDVEC][ECCSD][ECCSDVEC':
188+
'runtype-gated to /Geo/i; archive supplies it.',
189+
},
190+
expect={
191+
# The archive block is where a single-point job's correlated
192+
# energies actually come from. Cross-checked against the
193+
# per-line values in the log: EUMP2 = -0.76111680142148D+02
194+
# and CCSD(T) = -0.76119325411D+02 agree with EMP2 and
195+
# ECCSDTPERT here.
196+
'POLARIZ1][HYPERPOL1': dict(keys={
197+
'ESCF': {'values': '-75.9838311'},
198+
'EMP2': {'values': '-76.1116801'},
199+
'EMP3': {'values': '-76.1133812'},
200+
'EMP4DQ': {'values': '-76.1169769'},
201+
'EMP4SDQ': {'values': '-76.117589'},
202+
'ECCSD': {'values': '-76.1183396'},
203+
'ECCSDTPERT': {'values': '-76.1193254'},
204+
}),
205+
},
206+
),
207+
162208
# -----------------------------------------------------------------
163209
# NWChem (ecce_print traces)
164210
# -----------------------------------------------------------------
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
# ECCE parser regression golden file -- regenerate with run_tests.py --update
2+
case: g16-h2o-ccsdt
3+
desc: gaussian-16.desc
4+
fixture: gaussian-16/h2o_ccsdt.log (526 lines)
5+
args: '.' 'Energy' 'CC' 'CCSD(T)' '0'
6+
7+
[GEOMTRACE] Script=gaussian-16.geomtrace Freq=all Skip=5 Lines=-
8+
Begin=Input orientation\:
9+
End=--------------------------------------
10+
begins=1 delivered=1 buffered_away=0
11+
block 1: begin-line=123 fed=4 rc=0 first-fed=' 1 8 0 0.000000 0.000000 0.117790'
12+
key: GEOMTRACE
13+
size: 1 3 3
14+
rowlabels: 1-O 2-H 3-H
15+
columnlabels: X Y Z
16+
values: 0.000000 0.000000 0.117790 0.000000 0.755450 -0.471160 0.000000 -0.755450 -0.471160
17+
units: Hartree
18+
19+
[DELTAE] Script=gaussian-16.deltae Freq=all Skip=0 Lines=1
20+
Begin=Delta\-E
21+
begins=9 delivered=9 buffered_away=0
22+
block 1: begin-line=211 fed=1 rc=0 first-fed=' E= -75.9557509594026 Delta-E= -0.056502202491 Rises=F Damp=F'
23+
(script emitted no property)
24+
block 2: begin-line=223 fed=1 rc=0 first-fed=' E= -75.9822480416647 Delta-E= -0.026497082262 Rises=F Damp=F'
25+
(script emitted no property)
26+
block 3: begin-line=235 fed=1 rc=0 first-fed=' E= -75.9838085053544 Delta-E= -0.001560463690 Rises=F Damp=F'
27+
(script emitted no property)
28+
block 4: begin-line=247 fed=1 rc=0 first-fed=' E= -75.9838307933660 Delta-E= -0.000022288012 Rises=F Damp=F'
29+
(script emitted no property)
30+
block 5: begin-line=259 fed=1 rc=0 first-fed=' E= -75.9838310983527 Delta-E= -0.000000304987 Rises=F Damp=F'
31+
(script emitted no property)
32+
block 6: begin-line=270 fed=1 rc=0 first-fed=' E= -75.9838311035958 Delta-E= -0.000000005243 Rises=F Damp=F'
33+
(script emitted no property)
34+
block 7: begin-line=283 fed=1 rc=0 first-fed=' E= -75.9838311038739 Delta-E= -0.000000000278 Rises=F Damp=F'
35+
(script emitted no property)
36+
block 8: begin-line=296 fed=1 rc=0 first-fed=' E= -75.9838311038783 Delta-E= -0.000000000004 Rises=F Damp=F'
37+
(script emitted no property)
38+
block 9: begin-line=309 fed=1 rc=0 first-fed=' E= -75.9838311038783 Delta-E= -0.000000000000 Rises=F Damp=F'
39+
(script emitted no property)
40+
41+
[RMSDP] Script=gaussian-16.rmsdp Freq=all Skip=0 Lines=1
42+
Begin=RMSDP
43+
begins=10 delivered=10 buffered_away=0
44+
block 1: begin-line=208 fed=1 rc=0 first-fed=' RMSDP=2.33D-02 MaxDP=1.23D-01 OVMax= 1.18D-01'
45+
(script emitted no property)
46+
block 2: begin-line=220 fed=1 rc=0 first-fed=' RMSDP=1.14D-02 MaxDP=5.99D-02 DE=-5.65D-02 OVMax= 3.93D-02'
47+
(script emitted no property)
48+
block 3: begin-line=232 fed=1 rc=0 first-fed=' RMSDP=2.21D-03 MaxDP=1.21D-02 DE=-2.65D-02 OVMax= 1.14D-02'
49+
(script emitted no property)
50+
block 4: begin-line=244 fed=1 rc=0 first-fed=' RMSDP=3.30D-04 MaxDP=2.31D-03 DE=-1.56D-03 OVMax= 9.61D-04'
51+
(script emitted no property)
52+
block 5: begin-line=256 fed=1 rc=0 first-fed=' RMSDP=6.19D-05 MaxDP=3.06D-04 DE=-2.23D-05 OVMax= 3.39D-04'
53+
(script emitted no property)
54+
block 6: begin-line=267 fed=1 rc=0 first-fed=' RMSDP=7.64D-06 MaxDP=3.55D-05 DE=-3.05D-07 OVMax= 4.37D-05'
55+
(script emitted no property)
56+
block 7: begin-line=280 fed=1 rc=0 first-fed=' RMSDP=1.61D-06 MaxDP=7.88D-06 DE=-5.24D-09 OVMax= 1.04D-05'
57+
(script emitted no property)
58+
block 8: begin-line=293 fed=1 rc=0 first-fed=' RMSDP=2.16D-07 MaxDP=7.93D-07 DE=-2.78D-10 OVMax= 1.35D-06'
59+
(script emitted no property)
60+
block 9: begin-line=306 fed=1 rc=0 first-fed=' RMSDP=3.64D-08 MaxDP=1.22D-07 DE=-4.39D-12 OVMax= 2.31D-07'
61+
(script emitted no property)
62+
block 10: begin-line=319 fed=1 rc=0 first-fed=' RMSDP=3.10D-09 MaxDP=1.08D-08 DE=-8.53D-14 OVMax= 1.82D-08'
63+
(script emitted no property)
64+
65+
[KE][NNREPUL] Script=gaussian-16.ke Freq=all Skip=0 Lines=1
66+
Begin=N\-N\=
67+
begins=1 delivered=1 buffered_away=0
68+
block 1: begin-line=506 fed=1 rc=0 first-fed=' N-N= 9.189222125372D+00 E-N=-1.989620890383D+02 KE= 7.599450564668D+01'
69+
key: NNREPUL
70+
size: 1
71+
values: 9.189222125372e+00
72+
units: Hartree
73+
key: KE
74+
size: 1
75+
values: 7.599450564668e+01
76+
units: Hartree
77+
78+
[DIPOLE2] Script=gaussian-16.dipole Freq=last Skip=1 Lines=1
79+
Begin=Dipole moment \(field\-independent basis\, Debye\)\:
80+
begins=1 delivered=1 buffered_away=0
81+
block 1: begin-line=489 fed=1 rc=0 first-fed=' X= -0.0000 Y= 0.0000 Z= -2.6372 Tot= 2.6372'
82+
key: DIPOLE
83+
size: 3
84+
rowlabels: X Y Z
85+
values: -0.0000 0.0000 -2.6372
86+
units: Debye
87+
88+
[QUADPOLE1] Script=gaussian-16.quadpole Freq=last Skip=1 Lines=-
89+
Begin=Quadrupole moment \(field\-independent basis\, Debye\-Ang\)\:
90+
End=Traceless
91+
begins=1 delivered=1 buffered_away=0
92+
block 1: begin-line=491 fed=3 rc=0 first-fed=' XX= -7.2069 YY= -4.2273 ZZ= -6.1340'
93+
key: QUADPOLE
94+
size: 6
95+
rowlabels: XX XY XZ YY YZ ZZ
96+
values: -7.2069 0.0000 0.0000 -4.2273 -0.0000 -6.1340
97+
98+
[OCTAPOLE2] Script=gaussian-16.octapole Freq=last Skip=1 Lines=3
99+
Begin=Octapole moment \(field\-independent basis\, Debye\-Ang\*\*2\)\:
100+
begins=1 delivered=1 buffered_away=0
101+
block 1: begin-line=497 fed=3 rc=0 first-fed=' XXX= 0.0000 YYY= 0.0000 ZZZ= -1.6110 XYY= 0.0000'
102+
key: OCTAPOLE
103+
size: 10
104+
rowlabels: XXX YYY ZZZ XYY XXY XXZ XZZ YZZ YYZ XYZ
105+
values: 0.0000 0.0000 -1.6110 0.0000 0.0000 -0.4473 0.0000 0.0000 -1.3065 -0.0000
106+
107+
[HEXPOLE] Script=gaussian-16.hexpole Freq=last Skip=1 Lines=4
108+
Begin=Hexadecapole moment \(field\-independent basis\, Debye\-Ang\*\*3\)\:
109+
begins=1 delivered=1 buffered_away=0
110+
block 1: begin-line=501 fed=4 rc=0 first-fed=' XXXX= -5.1796 YYYY= -5.6449 ZZZZ= -6.1969 XXXY= 0.0000'
111+
key: HEXPOLE
112+
size: 15
113+
rowlabels: XXXX YYYY ZZZZ XXXY XXXZ YYYX YYYZ ZZZX ZZZY XXYY XXZZ YYZZ XXYZ YYXZ ZZXY
114+
values: -5.1796 -5.6449 -6.1969 0.0000 -0.0000 0.0000 -0.0000 -0.0000 -0.0000 -2.0344 -1.9448 -1.6629 -0.0000 -0.0000 0.0000
115+
116+
[POLARIZ1][HYPERPOL1] Script=gaussian-16.db Freq=last Skip=- Lines=-
117+
Begin=l9999\.exe
118+
End=Job cpu
119+
begins=1 delivered=1 buffered_away=0
120+
block 1: begin-line=508 fed=16 rc=0 first-fed=' (Enter /opt/gaussian/g16/l9999.exe)'
121+
key: ESCF
122+
size: 1
123+
values: -75.9838311
124+
units: Hartree
125+
key: EMP2
126+
size: 1
127+
values: -76.1116801
128+
units: Hartree
129+
key: EMP3
130+
size: 1
131+
values: -76.1133812
132+
units: Hartree
133+
key: EMP4DQ
134+
size: 1
135+
values: -76.1169769
136+
units: Hartree
137+
key: EMP4SDQ
138+
size: 1
139+
values: -76.117589
140+
units: Hartree
141+
key: ECCSD
142+
size: 1
143+
values: -76.1183396
144+
units: Hartree
145+
key: ECCSDTPERT
146+
size: 1
147+
values: -76.1193254
148+
units: Hartree
149+
key: TE
150+
size: 1
151+
values: -76.1193254
152+
units: Hartree
153+
key: EMP4D
154+
size: 1
155+
values: -76.1162719
156+
units: Hartree
157+
key: CPUSEC
158+
size: 1
159+
values: 0.8
160+
161+
[MULLIKEN] Script=gaussian-16.mulliken Freq=all Skip=2 Lines=-
162+
Begin= Mulliken (atomic )?charges( and spin densities)?\:
163+
End= Sum of Mulliken
164+
begins=1 delivered=1 buffered_away=0
165+
block 1: begin-line=478 fed=4 rc=0 first-fed=' 1 O -0.790777'
166+
key: MULLIKEN
167+
size: 3
168+
values: -0.790777 0.395389 0.395389
169+
units: e
170+
171+
[ESCF1][ESCFVEC] Script=gaussian-16.energy Freq=all Skip=0 Lines=1
172+
Begin=SCF Done\:
173+
begins=1 delivered=1 buffered_away=0
174+
block 1: begin-line=321 fed=1 rc=0 first-fed=' SCF Done: E(RHF) = -75.9838311039 A.U. after 10 cycles'
175+
(script emitted no property)
176+
177+
[EMP21][EMP2VEC] Script=gaussian-16.energy Freq=all Skip=0 Lines=1
178+
Begin=EUMP2
179+
begins=1 delivered=1 buffered_away=0
180+
block 1: begin-line=358 fed=1 rc=0 first-fed=' E2 = -0.1278490383D+00 EUMP2 = -0.76111680142148D+02'
181+
(script emitted no property)
182+
183+
[EMP3][EMP3VEC] Script=gaussian-16.energy Freq=all Skip=0 Lines=1
184+
Begin=EUMP3
185+
begins=1 delivered=1 buffered_away=0
186+
block 1: begin-line=386 fed=1 rc=0 first-fed=' E3= -0.17011040D-02 EUMP3= -0.76113381246D+02'
187+
(script emitted no property)
188+
189+
[EMP4DQ][EMP4DQVEC] Script=gaussian-16.energy Freq=all Skip=0 Lines=1
190+
Begin=UMP4\(DQ\)
191+
begins=1 delivered=1 buffered_away=0
192+
block 1: begin-line=387 fed=1 rc=0 first-fed=' E4(DQ)= -0.35956741D-02 UMP4(DQ)= -0.76116976920D+02'
193+
(script emitted no property)
194+
195+
[EMP4SDQ][EMP4SDQVEC] Script=gaussian-16.energy Freq=all Skip=0 Lines=1
196+
Begin=UMP4\(SDQ\)
197+
begins=1 delivered=1 buffered_away=0
198+
block 1: begin-line=388 fed=1 rc=0 first-fed=' E4(SDQ)= -0.42077760D-02 UMP4(SDQ)= -0.76117589022D+02'
199+
(script emitted no property)
200+
201+
[ECCSDTPERT] Script=gaussian-16.energy Freq=first Skip=0 Lines=1
202+
Begin=CCSD\(T\)\=
203+
begins=1 delivered=1 buffered_away=0
204+
block 1: begin-line=458 fed=1 rc=0 first-fed=' CCSD(T)= -0.76119325411D+02'
205+
(script emitted no property)
206+
207+
[ECCD][ECCDVEC][ECCSD][ECCSDVEC] Script=gaussian-16.energy Freq=all Skip=- Lines=-
208+
Begin=E\(CORR\)
209+
End=Largest amplitude
210+
begins=1 delivered=1 buffered_away=0
211+
block 1: begin-line=398 fed=53 rc=0 first-fed=' DE(Corr)= -0.13314802 E(CORR)= -76.116979126 Delta=-2.91D-03'
212+
(script emitted no property)
213+
214+
[PNTGRP] Script=gaussian-16.symmetry Freq=all Skip=0 Lines=1
215+
Begin= Full point group
216+
begins=1 delivered=1 buffered_away=0
217+
block 1: begin-line=141 fed=1 rc=0 first-fed=' Full point group C2V NOp 4'
218+
key: PNTGRP
219+
size: 1
220+
values: C2V
221+

‎tests/parsers/fixtures/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,3 +481,25 @@ by hand (O isotropic 365.6728, anisotropy 4.1792, eigenvalues 363.1113
481481
`File=`-rule parse type reading `grid.dat`, which this run does not
482482
produce, and `File=` rules are excluded from line matching anyway. ESP
483483
coverage would need a different setup.
484+
485+
### gaussian-16/h2o_ccsdt.{gjf,log}
486+
487+
Gaussian 16 RevC.01, `#P CCSD(T)/6-31G NoSymm`, water. Generated
488+
2026-09-21 on niobium with `/opt/gaussian/g16/g16`.
489+
490+
Covers the correlated-method energy branches, which no fixture
491+
exercised. Six of them — `[EMP21]`, `[EMP3]`, `[EMP4DQ]`, `[EMP4SDQ]`,
492+
`[ECCSDTPERT]`, `[ECCD][ECCSD]` — match a block here and emit nothing,
493+
which looks exactly like #85 from the outside but is correct:
494+
`gaussian-16.energy` gates its whole body on `runtype =~ /Geo/i` (line
495+
114, documented in its own header), and for a non-optimisation job the
496+
energies come from the archive block via `gaussian-16.db`.
497+
498+
That fallback is asserted rather than assumed: the case pins all seven
499+
archive energies (ESCF, EMP2, EMP3, EMP4DQ, EMP4SDQ, ECCSD,
500+
ECCSDTPERT), cross-checked against the per-line values in the log
501+
(`EUMP2 = -0.76111680142148D+02` and `CCSD(T)= -0.76119325411D+02`
502+
agree with EMP2 and ECCSDTPERT).
503+
504+
Also confirms the documented `[EMP21]`/`[EMP22]` EUMP2 Begin collision
505+
is harmless in practice.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
%Chk=h2o_ccsdt.chk
2+
#P CCSD(T)/6-31G NoSymm
3+
4+
water CCSD(T) - exercises MP2/CCSD energy branches
5+
6+
0 1
7+
O 0.000000 0.000000 0.117790
8+
H 0.000000 0.755450 -0.471160
9+
H 0.000000 -0.755450 -0.471160
10+

0 commit comments

Comments
 (0)