Skip to content

Commit

Permalink
removed comments and prints
Browse files Browse the repository at this point in the history
  • Loading branch information
jrudz committed Sep 5, 2024
1 parent a2f7ff4 commit e289304
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
15 changes: 3 additions & 12 deletions atomisticparsers/gromacs/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import logging
import re
import datetime
from typing import List, Any
from typing import List, Dict

import panedr

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion atomisticparsers/h5md/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit e289304

Please sign in to comment.