grogupy.io.save

grogupy.io.save(object: DefaultTimer | Contour | Kspace | MagneticEntity | Pair | Hamiltonian | Builder, path: str, compress: int = 2) None[source]

Saves the instance from a pickled state.

The compression level can be set to 0,1,2,3,4. Every other value defaults to 2.

  1. This means that there is no compression at all.

  2. This means, that the keys “_dh” and “_ds” are set to None, because othervise the loading would be dependent on the sisl version

  3. This contains compression 1, but sets the keys “Gii”, “Gij”, “Gji”, “Vu1” and “Vu2” to [ ], to save space

  4. This contains compression 1 and 2, but sets the keys “S”, “H”, to [ ], to save space

  5. This contains compression 1, 2 and 3, but sets the keys “kpoints”, “samples”, “weights” (for kpoints and energy points) to [ ], to save space

Parameters

objectUnion[DefaultTimer, Contour, Kspace, MagneticEntity, Pair, Hamiltonian, Builder]

Object from the grogupy library

path: str

The path to the output file

compress: int, optional

The level of lossy compression of the output pickle, by default 2