ESCDF - Densities
Page under construction
File format version number: 0.1
To represent densities, we have to follow the way they are decomposed within the different methods in use:
- norm-conserving pseudopotentials: ;
- ultrasoft pseudopotentials and PAW: ;
- all-electrons: .
For the use cases considered, the cell-associated electronic density can be represented in the following ways:
- norm-conserving pseudopotentials method: ;
- ultrasoft pseudopotentials and PAW methods: ;
- all-electrons methods: .
For the use cases considered, the atom-centered electronic density can be represented in the following ways:
- all-electrons methods: ;
- gaussians (?): .
In the case of PAW, providing the occupancy matrix elements in addition to the density components allows the rebuilding of all necessary quantities to restart a calculation.
In the presence of spinors, there are 2 possible ways of representing the 4 density components:
- total density + magnetic moment (well-suited for visualisation);
- the matrix elements , for ;
which means that the chosen representation must be indicated as metadata.
Detailed description of variables
All densities should be stored in the densities group of a ESCDF file.
If several densities are present, they should be put in subgroups, with explicit names.
Variables relating to the cell associated densities
The cell description is identical to the one in the ESCDF - Geometries. It must contain the following information:
number_of_physical_dimensions: unsigned int (always
dimension_types: int [number_of_physical_dimensions] (between
lattice_vectors: double [number_of_physical_dimensions] [number_of_physical_dimensions] (dimensional variable: length)
These variables are designed to represent densities that are stored on a regular real-space grid. This grid is defined by its mesh size.
number_of_grid_points: unsigned int [number_of_physical_dimensions]
When a direction is defined as periodic, the grid points in that direction do not contain the last plane, while for the other cases, the last plane in that direction contains a value.
values_on_grid: double ['number_of_components, product(number_of_grid_points), real_or_complex]
The default order is along z, y, and x (values along x axis are contiguous in memory). If the default ordering is not used, the attribute use_default_ordering must be set to false and grid_ordering must be provided.
This attribute specifies if the default z, y, and x ordering is used or not. When false, the optional variable grid_ordering must be present.
grid_ordering: unsigned int [product(number_of_grid_points]
This array provides a lookup table.
grid_ordering[i] = jmeans that values_on_grid[:,i,:] is the jth component of the density. This variable is optional, when not present the default ordering for the density is implicit.