Skip to content

Commit

Permalink
commented back in old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jrudz committed Feb 27, 2024
1 parent 43beaf6 commit de32500
Show file tree
Hide file tree
Showing 2 changed files with 416 additions and 416 deletions.
8 changes: 4 additions & 4 deletions atomisticparsers/gromacs/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ def __init__(self):

def init_quantities(self):
def str_to_header(val_in):
val = [v.split(":", 1) for v in val_in.strip().split("\n")]
val = [v.split(":", 1) for v in val_in.strip().splitlines()]
return {v[0].strip(): v[1].strip() for v in val if len(v) == 2}

def str_to_input_parameters(val_in):
re_array = re.compile(r"\s*([\w\-]+)\[[\d ]+\]\s*=\s*\{*(.+)")
re_scalar = re.compile(r"\s*([\w\-]+)\s*[=:]\s*(.+)")
parameters = dict()
val = val_in.strip().split("\n")
val = val_in.strip().splitlines()
for val_n in val:
val_scalar = re_scalar.match(val_n)
if val_scalar:
Expand Down Expand Up @@ -119,7 +119,7 @@ def str_to_energies(val_in):
return energies

def str_to_step_info(val_in):
val = val_in.strip().split("\n")
val = val_in.strip().splitlines()
keys = val[0].split()
values = [float(v) for v in val[1].split()]
return {key: values[n] for n, key in enumerate(keys)}
Expand Down Expand Up @@ -191,7 +191,7 @@ def str_to_input_parameters(val_in):
re_array = re.compile(r"\s*([\w\-]+)\[[\d ]+\]\s*=\s*\{*(.+)")
re_scalar = re.compile(r"\s*([\w\-]+)\s*[=:]\s*(.+)")
parameters = dict()
val = val_in.split("\n")
val = val_in.splitlines()
val = [line.strip() for line in val]
for val_n in val:
val_scalar = re_scalar.match(val_n)
Expand Down
Loading

0 comments on commit de32500

Please sign in to comment.