Repository navigation
Commit eaa394f
nwchem.scalar: fix S2 regex matching any line containing digit 2
The active S2 branch was "elsif ( /S*2/ )" (S* matches empty, so this
is really just "line contains a 2 anywhere") -- not the commented-out
"/S\s*2/" above it, and not what real NWChem output actually prints
either (the real tag is literally "S^2", confirmed against a real
UHF ecce_print trace). Worked "by luck" only because no other property
routed through this shared script (EGRAD/CPUSEC/ETIME/NNREPUL/DELTAE/
RESIDNORM/ONEELEC/TWOELEC/CORRELTN/COULOMB/EXCHANGE) has a literal "2"
in its header tag text -- S2 extraction itself was never actually
gated on the S2 marker matching.
Fixed to /S\^2/, matching the evident original intent. Verified: real
NWChem 7.2.3 UHF OH/STO-3G run extracts S2=0.753263362179062, matching
Gaussian's S2=0.753262 for the same system/basis (independent cross-
code sanity check).
Also documents NWChem's ecce_print mechanism in CLAUDE.md -- found
while auditing nwchem.desc, whose Begin patterns look meaningless
against raw stdout because they're not matched against stdout at all;
they match a separate trace file NWChem writes via its own built-in
ecce_print directive. Non-obvious enough to mislead a future session
auditing this file without discovering it first (this session initially
didn't either).
Part of a broader Gaussian-16/NWChem parser audit (real g16/nwchem
jobs, eccejobmonitor's actual Begin/Skip/Lines/End/Frequency algorithm
simulated against real captured output) that found no other live bugs
-- several confirmed-dead-but-harmless .desc entries documented in the
issue tracker/session notes rather than "fixed" (e.g. gaussian-16.desc's
EMP21/EMP22 Begin collision produces identical output either way;
gaussian-16.desc's standalone CPUSEC entry never fires but the same
data is already extracted via a different code path, gaussian-16.db).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent dd29afa commit eaa394f
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
0 commit comments