def as_dict(self): """ Json-serializable dict representation. """ d = MSONable.as_dict(self) d["translation_vector"] = self.translation_vector.tolist() return d
def as_dict(self): """ Returns dict representations of Xmu object """ d = MSONable.as_dict(self) d["data"] = self.data.tolist() return d
def as_dict(self): """ :return: MSONAble dict """ d = MSONable.as_dict(self) # Transforming tuple object to a list to allow BSON and MongoDB d["nodes"] = list(d["nodes"]) return d
def as_dict(self): d = MSONable.as_dict(self) d1 = {} for k, v in d.items(): if not k.startswith("@"): if v: d1[k] = {} for k1, v1 in list(v.items()): if isinstance(k1, tuple): d1[k]["--".join(k1)] = v1 else: d1[k][k1] = v1 else: d1[k] = v else: d1[k] = v return d1
def as_dict(self): d = MSONable.as_dict(self) if hasattr(self, "kwargs"): d.update(**self.kwargs) return d
def as_dict(self): return MSONable.as_dict(self)
def as_dict(self): d = MSONable.as_dict(self) if hasattr(self, "kwargs"): d.update(**self.kwargs) d["config_dict"] = list(self.config_dict.items()) return d
def as_dict(self): d = MSONable.as_dict(self) if hasattr(self, "kwargs"): d.update(**self.kwargs) d["config_dict"] = self.config_dict.items() return d
def as_dict(self): d = MSONable.as_dict(self) if hasattr(self, "kwargs"): d.update(**self.kwargs) d["lammps_input"] = self.lammps_input.as_dict() return d
def as_dict(self): d = MSONable.as_dict(self) # Transforming tuple object to a list to allow BSON and MongoDB d['nodes'] = list(d['nodes']) return d