Skip to content

Commit 68e12fa

Browse files
andyclaude
andcommitted
ai.nwchem: no stray ##DispersionCorrection## line in DFT decks
DispersionCorrection returned an empty string without setting $_, so the template engine left the tag line in every DFT deck with dispersion None (the default). NWChem skipped it as a comment. Found by tests/teaching. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0167GfjZWhsGJh9at1F9sc9y
1 parent 19d32ca commit 68e12fa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎scripts/parsers/ai.nwchem‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,9 @@ sub DispersionCorrection {
19521952
&& $dispersionModel{$choice} ne "") {
19531953
$result = "disp " . $dispersionModel{$choice};
19541954
}
1955+
# The engine keeps the template line unless $_ is set, as the other
1956+
# resolvers do; without it "##DispersionCorrection##" stayed in the deck.
1957+
$_ = $result;
19551958
return $result;
19561959
}
19571960

0 commit comments

Comments
 (0)