From f5c2920bbe9395f643677ae77aad1758b9cf31da Mon Sep 17 00:00:00 2001 From: Marvin Poul Date: Tue, 28 Sep 2021 11:48:38 +0200 Subject: [PATCH] Don't conflict with HasHDF Drops support for legacy storage format --- .../atomistics/structure/structurestorage.py | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/pyiron_atomistics/atomistics/structure/structurestorage.py b/pyiron_atomistics/atomistics/structure/structurestorage.py index eef76d6ca..78f0e6621 100644 --- a/pyiron_atomistics/atomistics/structure/structurestorage.py +++ b/pyiron_atomistics/atomistics/structure/structurestorage.py @@ -205,22 +205,5 @@ def _number_of_structures(self): return len(self) - def to_hdf(self, hdf, group_name="structures"): - # just overwrite group_name default - super().to_hdf(hdf=hdf, group_name=group_name) - - def from_hdf(self, hdf, group_name="structures"): - with hdf.open(group_name) as hdf_s_lst: - version = hdf_s_lst.get("HDF_VERSION", "0.0.0") - if version == "0.0.0": - self._per_element_arrays["symbols"] = hdf_s_lst["symbols"].astype(np.dtype("U2")) - self._per_element_arrays["positions"] = hdf_s_lst["positions"] - - self._per_chunk_arrays["start_index"] = hdf_s_lst["start_indices"] - self._per_chunk_arrays["length"] = hdf_s_lst["len_current_struct"] - self._per_chunk_arrays["identifier"] = hdf_s_lst["identifiers"].astype(np.dtype("U20")) - self._per_chunk_arrays["cell"] = hdf_s_lst["cells"] - - self._per_chunk_arrays["pbc"] = np.full((self.num_chunks, 3), True) - else: - super().from_hdf(hdf=hdf, group_name=group_name) + def _get_hdf_group_name(self): + return "structures"