diff --git a/atomisticparsers/gromacs/parser.py b/atomisticparsers/gromacs/parser.py index eb934c0..77957cf 100644 --- a/atomisticparsers/gromacs/parser.py +++ b/atomisticparsers/gromacs/parser.py @@ -21,7 +21,7 @@ import logging import re import datetime -from typing import List, Any +from typing import List, Dict import panedr @@ -133,11 +133,6 @@ def str_to_input_parameters(val_in): value = val_scalar.group(2) if value.lower() in ['true', 'false']: value = value.lower() == 'true' - # if value.lower() == 'true': - # value = True - # elif value.lower() == 'false': - # value = False - # elif value.replace('.', '', 1).isdigit(): elif value % 1 == 0: value = float(value) if '.' in value else int(value) stack[-1][key] = value @@ -391,7 +386,7 @@ def get_interactions(self, gromacs_version: str = None): return interactions - def get_force_field_parameters(self, gromacs_version: str = None) -> List[Any]: + def get_force_field_parameters(self, gromacs_version: str = None) -> List[Dict]: # read force field parameters not saved by MDAnalysis # copied from MDAnalysis.topology.tpr.utils # TODO Revamp interactions section to only extract meaningful info @@ -410,7 +405,7 @@ def get_force_field_parameters(self, gromacs_version: str = None) -> List[Any]: with open(self.mainfile, 'rb') as f: data = tpr_utils.TPXUnpacker(f.read()) - interactions: List[Any] = [] + interactions: List[Dict] = [] # read header header = tpr_utils.read_tpxheader(data) @@ -1666,10 +1661,6 @@ 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) diff --git a/atomisticparsers/h5md/parser.py b/atomisticparsers/h5md/parser.py index 74f7fd0..5aff159 100644 --- a/atomisticparsers/h5md/parser.py +++ b/atomisticparsers/h5md/parser.py @@ -890,7 +890,6 @@ def write_to_archive(self) -> None: self.parse_observable_info() self.parse_parameter_info() - print('in parsing') # Populate the archive self.parse_method()