Read and Write Support¶
Read and write functionality in QuantumATK is provided by two functions: nlread and
nlsave. Storage of several objects per file is supported. Each object in native
ATK files is associated with a unique identifier – the object_id.
If a new entry is saved without specifying an object_id, the entry is appended to the
file with an auto-generated object_id. If an object_id is specified which already
is present in the file, the old entry is automatically deleted.
ATK natively supports the HDF5 file format (from QuantumATK version \(\ge\) 2017). It is platform independent, i.e. the files can, for instance, be written on a Linux platform and later be read on a Windows platform. The internal data structure is performance-optimized.
HDF5 (Default File Format)¶
specification |
|
|
classname_x with x being an increasing integer |
HDF5 is the default file format for QuantumATK version \(\ge\) 2017. The file format supports Metatext, and deleting objects – see nldelete. Due to the performance-optimized storage, the file size is not automatically reduced if objects have been deleted / overwritten. The free space can be reclaimed with nlrepack. The stored data can easily be accessed by hdf-view or by any program based on libhdf5.