gem.lattice.Lattice.save_lattice
- Lattice.save_lattice(filename, overwrite=True)[source]
Save the lattice parameters to a file.
Not collective, and not MPI-aware: guard it yourself. The lattice is replicated on every rank, so under MPI exactly one rank must call this:
if comm.Get_rank() == 0: lattice.save_lattice('lattice.h5')
- Parameters:
filename – str. Path to the file where the lattice parameters will be saved.
overwrite – bool, optional. Whether to overwrite the file if it already exists (default: True).