Skip to content

Commit 0890f81

Browse files
andyclaude
andcommitted
ai.nwchem: remove a die() that broke input generation for ordinary jobs
Reported from a live session: NWChem calculations could not be saved -- "Input files could not be generated -- input parsing command /opt/ecce/scripts/parsers/ai.nwchem ... failed". Gaussian was fine. sub CCThresh died when CC.ConvergenceEnergy.Value was zero or absent. nwch.tpl carries ##CCThresh## whatever the theory is, so any job with no coupled-cluster settings reached it -- including a plain SCF energy, which is about the most common NWChem job there is. The die also contradicted the three lines directly beneath it, which already handle an absent threshold by emitting nothing. It did no visible harm while the template engine swallowed die()s: the tag's line silently vanished and generation carried on with a quietly incomplete deck. a6d0512 (#92) made those errors real, which turned a silent wrong answer into a hard failure. That is the fix working as intended -- CLAUDE.md predicted it would "surface errors that were previously invisible" -- but this particular error was never worth raising. Confirmed NOT a regression from this session's changes: the version of ai.nwchem from before any of them fails identically (exit 255, same message), so the die is what is wrong. Water/STO-3G/RHF now generates a valid deck and exits 0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFMUNbw2UpRPmgsqviAowb
1 parent 6ba0486 commit 0890f81

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎scripts/parsers/ai.nwchem‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,8 +953,20 @@ sub CCThresh {
953953
local($thresh,$result);
954954

955955
$thresh = $AbiDict{"CC.ConvergenceEnergy.Value"};
956-
die "ai.nwchem: AbiDict{\"CC.ConvergenceEnergy.Value\"} is zero\n"
957-
if ($thresh == 0.0);
956+
# There used to be a die() here when the threshold was zero or absent.
957+
# It contradicted the three lines below, which already handle that case
958+
# by emitting nothing -- and nwch.tpl carries ##CCThresh## whatever the
959+
# theory is, so ANY job without coupled-cluster settings (an ordinary
960+
# SCF energy, say) reached it.
961+
#
962+
# It did no visible harm while the template engine swallowed die()s
963+
# (#92): the tag's line silently vanished and generation continued.
964+
# Since a6d0512 made those errors real, this aborted NWChem input
965+
# generation outright -- "Input files could not be generated ...
966+
# ai.nwchem ... failed" -- for the most common kind of NWChem job there
967+
# is. Reported from a live session 2026-09-22; confirmed identical
968+
# before and after that day's changes, so it is the die that is wrong,
969+
# not anything recent.
958970
$result = "";
959971

960972
if ($thresh) {

0 commit comments

Comments
 (0)