def from_dict(cls, d): """ Args: d (dict): Dict representation Returns: LammpsDump """ items = {"timestep": d["timestep"], "natoms": d["natoms"]} items["box"] = LammpsBox.from_dict(d["box"]) items["data"] = pd.read_json(d["data"], orient="split") return cls(**items)
def from_dict(cls, d): items = {"timestep": d["timestep"], "natoms": d["natoms"]} items["box"] = LammpsBox.from_dict(d["box"]) items["data"] = pd.read_json(d["data"], orient="split") return cls(**items)