Skip to content

Commit

Permalink
fixed pytest error
Browse files Browse the repository at this point in the history
  • Loading branch information
jrudz committed Sep 5, 2024
1 parent e289304 commit bdfc6d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion atomisticparsers/gromacs/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def str_to_input_parameters(val_in):
value = val_scalar.group(2)
if value.lower() in ['true', 'false']:
value = value.lower() == 'true'
elif value % 1 == 0:
elif value.replace('.', '', 1).isdigit():
value = float(value) if '.' in value else int(value)
stack[-1][key] = value

Expand Down Expand Up @@ -1661,6 +1661,10 @@ def write_to_archive(self):
sec_run.x_gromacs_number_of_tasks = host_info[2]

# parse the input parameters using log file's hierarchical structure as default
# self.input_parameters = {
# key.replace('_', '-'): val.lower() if isinstance(val, str) else val
# for key, val in self.log_parser.get('input_parameters', {}).items()
# }
self.input_parameters = self.log_parser.get('input_parameters', {})
self.standardize_input_parameters(self.input_parameters)

Expand Down

0 comments on commit bdfc6d1

Please sign in to comment.