Пример #1
0
    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)
Пример #2
0
 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)
Пример #3
0
 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)