3 Plotting the density of states

Using the eigenvalues obtained from the run containing the charges, the density of states can be visualized by smearing the eigenvalues with Gaussians. This can be done using the dosplot script, which can be downloaded from the web site (it is part of the tgz archive of this tutorial). As a first step the data in the output file band.out should be converted to raw data. You do that with band2dat script by issuing:

band2dat -N band.out band.dat
After successfull execution, the file band.dat contains the raw data. (The option -N instructs the script not to include an enumeration of the K-points as first column of the raw data.)

Then, the following dosplot input should be created:

[gauss]

coefficient = 0.2
exponent = 20.0

[data]

nr_kpoints = 256
kweights =  1.000000

eigenvalues = << band.dat
eigval_order = k_major

The first block specifies the parameters of the Gaussian functions

$\displaystyle f(x) = C\,\exp\left(-\alpha(x-x_0)\right)$    

where $ C$ is the coefficient and $ \alpha$ is the exponent. These parameters strongly influence the resulting DOS. Setting the exponent too small, the DOS will be smeared too much and loose details. Setting the exponent too high yields a "spiky" DOS. The optimal values depend on the system you are calculating, so that one should adjust them accordingly.

The [data] block defines the nr. of k-points and their weights. If the weights of the K-points is equal, only one value must be specified. Otherwise, the weight for all K-points must be specified individually. Please note, that continuation lines must be marked by a space or a tab at the beginning of that line.

The eigenvalues option specifies the eigenvalues. In the example above, they are read in from a the external file band.dat. The values in the file must be arranged either in band_major order (each line contains the values for a given band in all K-points) or in k_major order (each line contains the values of all bands in a given K-point). The band.dat file contains the eigenvalues in k_major order.

After storing the input in a file (e.g. dosplot.in) the dosplot program should be invoked as

dosplot dosplot.in > dos.dat
The resulting output (dos.dat) can be plotted by any scientifical visualisation tool (e.g. gnuplot, xmgrace etc.). For GaAs Figure [*] shows the result.

Figure: Density of states for GaAs with DFTB+ using the parametrisation set hyb-0-1.
Image dos