Skip to content

Commit

Permalink
Make sure that parse_xyz returns a dict xyz (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfir4444 committed May 4, 2023
2 parents 6e1334e + 8413b6c commit a56b0df
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arc/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,11 @@ def parse_geometry(path: str) -> Optional[Dict[str, tuple]]:
raise InputError(f'Could not find file {path}')
if path.endswith('.yml'):
content = read_yaml_file(path)
if isinstance(content, dict) and 'xyz' in content.keys():
return content['xyz']
if isinstance(content, dict) and 'opt_xyz' in content.keys():
return content['opt_xyz']
if isinstance(content, dict):
if 'xyz' in content.keys():
return content['xyz'] if isinstance(content['xyz'], dict) else str_to_xyz(content['xyz'])
elif 'opt_xyz' in content.keys():
return content['opt_xyz'] if isinstance(content['opt_xyz'], dict) else str_to_xyz(content['opt_xyz'])
software = identify_ess(path)
xyz_str = ''
if software == 'xtb':
Expand Down

0 comments on commit a56b0df

Please sign in to comment.