DoS Dangers

Sometimes DoS plots can be very misleading. Consider the following DoS for ZrBe2.

$ c2x -v --dos_gnu:500o ZrBe2.bands out.gnu

ZrBe2 DOS, with missing peak

It looks credible. The pseudopotential used has left a deep core-like state at around -90eV. This comes from the Be 1s orbitals. The interesting part of the DoS is the mostly-continuous and poorly-scaled part from 0eV and above. The system has no gap at the Fermi level, so is metallic (correct), and the main problem is that the huge peak from the Be 1s states combined with autoscaling has made the interesting part tiny. Adding --xrange=0:15 to the command-line would solve the autoscaling issue.

But actually it is much worse than that.

$ c2x -v --widths --null ZrBe2.check
Fermi energy: 7.461515 eV
   band spin  occupancy       min eval       max eval       width (eV)
     14  0     0.000000      10.184184      14.094317       3.910133
     13  0     0.000000      10.184184      12.802240       2.618055
     12  0     0.000000       8.177877      11.573312       3.395435
*    11  0     0.250518       6.871129      10.963607       4.092477
*    10  0     0.730729       5.996984       9.034196       3.037212
*     9  0     0.953005       4.897383       8.140458       3.243074
      8  0     1.000000       3.727063       6.737647       3.010583
      7  0     1.000000       0.408631       3.903884       3.495253
      6  0     1.000000     -18.525463     -18.201080       0.324383
      5  0     1.000000     -18.595077     -18.432258       0.162819
      4  0     1.000000     -18.710693     -18.471529       0.239164
      3  0     1.000000     -40.458479     -40.408880       0.049600
      2  0     1.000000     -89.645131     -89.602396       0.042735
      1  0     1.000000     -89.648849     -89.621478       0.027372

There is a band at around -40eV which is completely absent from the DoS plot.

Looking in more detail, the missing band extends from -40.459eV to -40.409eV. The 500 point sampling used for the graph sampled at -40.606eV and -40.397eV. The whole of this band fitted between two sampling points, so was missed.

A Better Approach

There are two ways of constructing a DoS plot. Inevitably one samples the DoS at a number of discrete points. So let the points be the set xi for i=1 to n. Blöchl's method gives a formula for ρ(xi), the density, directly, and it is very tempting to plot this, as was done above. But Blöchl's also gives a formula for n(x), being the integral from -∞ to x of ρ(x). This means that one can also calculate the average of ρ(x) over the small interval from halfway to the next lower point and half way to the next higher. Rather than plotting

y(i)=ρ(xi)

one can plot

y(i)=(n(xi+0.5)-n(xi-0.5))/δx

where δx is the difference between the sampling points. These approaches are equivalent in the limit of δx tends to zero, but the second approach gives narrow peaks nowhere to hide.

The same argument applies to Gaussian smearing, for which c2x has always used the averaging method. For Blöchl's method, versions up to 2.50 inclusive use the first method. From 2.50a the default is the averaging method, and the old method is available via the "o" flag. So with 2.50a:

$ c2x -v --dos_gnu:500 ZrBe2.bands out2.gnu

ZrBe2 DOS, missing peak restored

The peak at -40eV is now present, and that at -90eV is shown to have been overstated previously.

Why retain both methods in c2x? In most cases the second method is superior, but cases in which the two methods are significantly different may need careful consideration. If one does not have both methods, one cannot tell when they differ.

C2x also prints the integral of the DoS. This can give hints that things are not going well. For the first version it produced

14 bands, 1 spin and 50 k-points
DOS sum,      spin=0: 43.417734
DOS integral, spin=0: 37.476466

Two integration methods, a simple sum and Simpson's rule, and two very different answers. As 14 bands should integrate to 28 electrons, neither very good. The two-electron band at -40eV was missed, but the four-electron band at -90eV has been exaggerated. The plot samples at intervals of approximately 0.2eV, so the sample which hit the band at -90eV is assumed to be representative of a region of 0.2eV, whereas that band is under 0.05eV in width. When this one sample is integrated by summation, it contributes almost 21.9 electrons to the total, instead of just four. The total sum is 15.4 electrons too large, mostly caused by this narrow band having an excess of almost 17.9, and the missing band a deficit of two.

For the second method c2x produced

DOS sum,      spin=0: 28.000000
DOS integral, spin=0: 28.036129

A better-behaved function, in that the two integration techniques give similar answers, and the sum is completely correct. But do not read too much into the sum being correct. Unless there is a bug in c2x, even with the most coarse sampling using the average DoS over a region will produce the correct sum. One can also construct a smeared Gaussian technique which is guaranteed to get the sum correct, which not necessarily giving the same answer as other sum-reserving approaches.

Summary: a claim that a DoS was produced by Blöchl's method still leaves uncertainty about precisely how it was produced, uncertainty which could be important.