Skip to content

Commit

Permalink
Fixed errors in input if the open shell nature or charge were None.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsaxe committed Jul 29, 2020
1 parent 942b5de commit b136a1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions psi4_step/psi4.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def _convert_structure(self, name=None):
if 'extras' in system:
extras = system['extras']

if 'open' in extras:
if 'open' in extras and extras['open'] is not None:
openshell = extras['open']
if (
(
Expand All @@ -529,13 +529,13 @@ def _convert_structure(self, name=None):
nopen = openshell
norbitals = nopen

if 'net_charge' in extras:
if 'net_charge' in extras and extras['net_charge'] is not None:
structure.append(f" {extras['net_charge']} {nopen}")
else:
structure.append(f' 0 {nopen}')
else:
if 'net_charge' in extras:
structure.append(f" {extras['net_charge']} 0")
if 'net_charge' in extras and extras['net_charge'] is not None:
structure.append(f" {extras['net_charge']} 1")

elements = system['atoms']['elements']
coordinates = system['atoms']['coordinates']
Expand Down

0 comments on commit b136a1e

Please sign in to comment.