Skip to content

Commit

Permalink
Merge pull request #49 from pyiron/todict
Browse files Browse the repository at this point in the history
Implement from_dict
  • Loading branch information
pmrv authored Feb 23, 2024
2 parents 860dda8 + c1c3cf2 commit fb91765
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pyiron_potentialfit/mlip/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,9 @@ def to_dict(self):
data_dict[self.mlip.table_name + "/" + k] = v
return data_dict

def from_hdf(self, hdf5):
with hdf5.open("input") as hdf5_input:
self.mlip.from_hdf(hdf5_input)
super(MlipInput, self).from_hdf(hdf5)
def from_dict(self, data_dict):
super().from_dict(data_dict)
self.mlip.from_dict(data_dict[self.mlip.table_name])


class MlipParameter(GenericParameters):
Expand Down

0 comments on commit fb91765

Please sign in to comment.