Skip to content

Commit

Permalink
Relocate basis set default:
Browse files Browse the repository at this point in the history
- only add the default when no other basis sets are present
- do not allow uncaught settings to be added as basis sets
  • Loading branch information
Nathan Daelman committed May 29, 2024
1 parent 684c1f3 commit 8331c62
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions electronicparsers/gaussian/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,10 @@ 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 len(basis_sets) == 0:
basis_sets.add(resolve_basis_set('STO-3G'))

sec_dft = DFT()
sec_method.dft = sec_dft
Expand All @@ -1406,8 +1409,8 @@ def resolve_xc_functional(parameter):
type='gaussians',
scope=['full-electron'],
)
basis_set_name = basis_set[1] if basis_set else 'STO-3G'
bs.atom_centered.append(BasisSetAtomCentered(name=basis_set_name))
bs.atom_centered.append(BasisSetAtomCentered(name=basis_set[1]))
# ? what does it mean to have multiple basis sets
sec_method.electrons_representation = [
BasisSetContainer(
type='atom-centered orbitals',
Expand Down

0 comments on commit 8331c62

Please sign in to comment.