Serialization¶
- metatensor.torch.atomistic.save(file: str | Path | BytesIO, system: System) None[source]¶
Save a System object to a file.
The provided System must contain float64 data and be on the CPU device.
The saved file will be a zip archive containing the following files:
types.npy, containing the atomic types in numpy’s NPY format;positions.npy, containing the systems’ positions in numpy’s NPY format;cell.npy, containing the systems’ cell in numpy’s NPY format;pbc.npy, containing the periodic boundary conditions in numpy’s NPY format;
For each neighbor list in the System object, the following files will be saved (where
{nl_idx}is the index of the neighbor list):pairs/{nl_idx}/options.json: theNeighborListOptionsobject converted to a JSON string.pairs/{nl_idx}/data.mts: the neighbor listTensorBlockobject
For each extra data in the System object, the following file will be saved (where
{name}is the name of the extra data):data/{name}.mts: The extra dataTensorMap