From 8d2be1664d870e17b6fab1dcb65598763eb4d245 Mon Sep 17 00:00:00 2001 From: Alvin Noe Ladines Date: Wed, 29 May 2024 12:31:16 +0200 Subject: [PATCH] Fix test --- electronicparsers/gaussian/parser.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/electronicparsers/gaussian/parser.py b/electronicparsers/gaussian/parser.py index 7918d557..2f51076a 100644 --- a/electronicparsers/gaussian/parser.py +++ b/electronicparsers/gaussian/parser.py @@ -1321,9 +1321,6 @@ def resolve_basis_set(parameter: str) -> tuple[str, str]: ) return (basis_keys[0], parameter) - # fall back onto default basis set - return ('STO-3G', 'STO-3G') - def resolve_xc_functional(parameter): xc_functional = self._xc_functional_map.get(parameter, None) if xc_functional is not None: @@ -1379,7 +1376,12 @@ def resolve_xc_functional(parameter): basis_set_parameter = parameter[0] if not parameter[1:] else parameter[1] # ! invert logic basis_set = resolve_basis_set(basis_set_parameter.strip()) - basis_sets.add(basis_set) + if basis_set is not None: + basis_sets.add(basis_set) + + if not basis_sets: + # fall back onto default basis set + basis_sets.add(('STO-3G', 'STO-3G')) sec_dft = DFT() sec_method.dft = sec_dft