This section describes classes for electronic structure analysis. The basic class is the ElectronicStates class described below.

ElectronicStates class

The class ElectronicStates are a python list of ElectronicState objects.

Additional methods defined to describe the collection of electronic states:

The generic ElectronicStates class can read from a NetCDF format (equal to the GPAW netCDF restart file). A specific calculator can overload this methods to be able to read a specific format. Examples of this is given in STMTool.
Typically the unitcell
Number of different kpoint in the list
Number of different spins in the list
Number of different bands for each spin and kpoint.
The fermi level for the calculation.

Calculator methods relating to the ElectronicStates class

The calculator could implement these methods:

Return a ElectronicStates object. This method could at some point replace the DFT calculator interface methods, GetIBZKPoints, GetEigenValues, GetWaveFunctions, etc.
Return the localixation matrix for doing maximally localized wannier functions the given set of electronic states. For a detailed description see <Analysis#maximally localized wannier functions>`.
Return the Hamiltonian matrix for the given set of electronic states.


The class ElectronicState (derived from a Grid class) describes a single electronic state.

It is assumed that the Grid class holds the wave function, i.e. the Bloch function for the state, multiplied by the phase factor exp(ikx).

Two representations for the state are available via the ElectronicState class. A compact representation via the methods Get/SetWaveFunction, and a real space representation. For this latter representation the Grid class handle the 3 dimensional grid information.

For the generic version of ElectronicState the two methods GetWaveFunction and GetArray will be identical.

For a code with a different internal representation, like a pseudopotential planewave code, it is natural that the internal representation is the reciprocal planewave expansion coefficients.

In addition to the method from the Grid class described below, the ElectronicState class has the following methods to define a electronic states (which could be a eigenstate):

Define the kpoint
Define the eigenvalue
Define the spin
Define the occupation number, 0:2 for a paramagnetic calculation, 0:1 for a magnetic caculation.
Symmetry weight on the kpoint.
Same as GetArray, see the Grid class below. A non real space program will here implement a method to represent the wavefunction on a real space grid.
Same as GetArray, a not real space program will here return its reciprocal space representation.

Grid class

A grid represents a collection of values defined in an 'N' -dimensional space. A single value of the collection then represents the grid at a discrete position having coordinates given in terms of the space. The values may be scalars but can in general have any number of components.

The following methods should always be available:

Returns the space in which the grid is defined.
Returns an array representing the collection of values.
Returns the origin of the grid.
Returns an array with the cartesian coordinates of the discrete points at which the collection of points are defined.