From 248afef844ac91e335952f206b0374adc0afd091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Tue, 26 Dec 2023 20:41:47 +0100 Subject: [PATCH] fix from_hdf() --- pyiron_atomistics/lammps/base.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pyiron_atomistics/lammps/base.py b/pyiron_atomistics/lammps/base.py index 6ef6bacad..3bf03c6ab 100644 --- a/pyiron_atomistics/lammps/base.py +++ b/pyiron_atomistics/lammps/base.py @@ -1082,9 +1082,8 @@ def from_hdf(self, hdf5): hdf5: Returns: """ - with hdf5.open("input") as hdf5_input: - self.from_dict( - data_dict=hdf5_input.read_dict_from_hdf( - ["input", "input/control_inp", "input/potential_inp"] - ) + self.from_dict( + data_dict=hdf5.read_dict_from_hdf( + ["input", "input/control_inp", "input/potential_inp"] ) + )