From 3d51a691a31bb57c1ed48a4425b40879beff941c Mon Sep 17 00:00:00 2001 From: Benjamin Pritchard Date: Mon, 29 Jul 2024 13:54:11 -0400 Subject: [PATCH] Fix blank lines in gaussian system format --- basis_set_exchange/writers/write.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/basis_set_exchange/writers/write.py b/basis_set_exchange/writers/write.py index 289f8421..d36fe0f4 100644 --- a/basis_set_exchange/writers/write.py +++ b/basis_set_exchange/writers/write.py @@ -292,7 +292,12 @@ def write_formatted_basis_str(basis_dict, fmt, header=None): if header is not None and _writer_map[fmt]['comment'] is not None: comment_str = _writer_map[fmt]['comment'] header_str = comment_str + comment_str.join(header.splitlines(True)) - ret_str = header_str + '\n\n' + ret_str + + # HACK - Gaussian94Lib doesn't tolerate blank lines after the header + if fmt == 'gaussian94lib': + ret_str = header_str + ret_str + else: + ret_str = header_str + '\n\n' + ret_str # HACK - Psi4 requires the first non-comment line be spherical/cartesian # so we have to add that before the header