Skip to content

Commit

Permalink
format only relevant lines
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Jun 15, 2024
1 parent f9c6ca1 commit 078d168
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions package/MDAnalysis/coordinates/H5MD.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,16 @@ def _read_frame(self, frame):
def _copy_to_data(self):
"""assigns values to keys in data dictionary"""

if 'observables' in self._file:
for key in self._file['observables'].keys():
if "observables" in self._file:
for key in self._file["observables"].keys():
try:
self.ts.data[key] = self._file['observables'][key][
'value'][self._frame]
self.ts.data[key] = self._file["observables"][key][
"value"
][self._frame]
except KeyError:
logger.warning(f"Unable to read '{key}' from 'observables'")
logger.warning(
f"Unable to read '{key}' from 'observables'"
)


# pulls 'time' and 'step' out of first available parent group
Expand Down

0 comments on commit 078d168

Please sign in to comment.