pymatgen.util.serialization module¶
Most features of this module has been moved to monty. Please refer to monty.json and monty.serialization documentation.
-
class
PmgPickler[source]¶ Bases:
_pickle.PicklerPersistence of External Objects as described in section 12.1.5.1 of https://docs.python.org/3/library/pickle.html
-
class
PmgUnpickler[source]¶ Bases:
_pickle.UnpicklerPersistence of External Objects as described in section 12.1.5.1 of https://docs.python.org/3/library/pickle.html
-
class
SlotPickleMixin[source]¶ Bases:
objectThis mixin makes it possible to pickle/unpickle objects with __slots__ defined.
-
json_pretty_dump(obj, filename)[source]¶ Serialize obj as a JSON formatted stream to the given filename ( pretty printing version)
-
pmg_pickle_dump(obj, filobj, **kwargs)[source]¶ Dump an object to a pickle file using PmgPickler.
- Parameters
obj – Object to dump.
fileobj – File-like object
**kwargs – Any of the keyword arguments supported by PmgPickler