Skip to content

Commit

Permalink
Linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa committed Dec 12, 2024
1 parent a2fe30b commit 9482a40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions electronicparsers/castep/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ def add_unit(val):
elif line and last_parameter:
last_parameter[1].append(add_unit(line.strip()))

for key in title.keys():
for sub_key, val in title[key].items():
title[key][sub_key] = val[0] if len(val) == 1 else val
for key, tval in title.items():
for sub_key, val in tval.items():
tval[sub_key] = val[0] if len(val) == 1 else val

return title

Expand Down
8 changes: 4 additions & 4 deletions electronicparsers/quantumespresso/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3207,11 +3207,11 @@ def parse_configuration(calculation):
'damped_dynamics': 'geometry_optimization',
'vcs_wentzcovitch_damped_minimization': 'geometry_optimization',
}
for method in methods:
sampling = run.get(method)
for key, val in methods.items():
sampling = run.get(key)
if sampling is not None:
self.sampling_method = methods[method]
if method.startswith('vcs') and sampling.get('dynamics') is not None:
self.sampling_method = val
if key.startswith('vcs') and sampling.get('dynamics') is not None:
self.sampling_method = 'molecular_dynamics'
for calculation in sampling.get('self_consistent', []):
parse_configuration(calculation)
Expand Down

0 comments on commit 9482a40

Please sign in to comment.