Gaussian Smearing
Gaussian smearing is a technique used to recontrust a smooth continuous function which has suffered discrete sampling. One of its most common applications is in the smoothing of histograms, so here is it discussed in the context of creating electron density of states (DOS) plots.
A DOS plot shows density of states at different energies. It is formed by sampling the space of states uniformly, and placing the energy eigenvalues found into histogram bins. (More sophisticated methods might try non-uniform sampling of the space of states, and unequal weights for the sampling points. If the system has symmetry, this is likely to be done.)
The resulting histogram is smoothed with Gaussian smearing with a particular smearing width. But what does this mean in detail?
Smearing width
A Gaussian is simply
exp(-(x/s)2)
where increasing s increases the width of the Gaussian, and some normalisation needs to be added to ensure that its integral is one. But what value of s should correspond to a smearing width of one?
s=1
Um, isn't it obvious?
s=1.41
The canonical form is really
exp(-0.5*(x/σ)2)
for this gives a Gaussian with a standard deviation of σ. So, in terms of the original equation, s=sqrt(2) is the starting point.
s=0.6005
The Gaussian is not the only possible smearing function. One might wish to try others too. The best way of describing the width of an arbitrary smearing function is to take its full width at half maximum.
exp(-(0.6005*x)2)
has a full width at half maximum of one, so can be considered to correspond to smearing by one. (s=0.5/sqrt(ln(2)))
Smearing Method
Method 1
Calculate histogram by binning eigenvalues in normal way. Then smear the histogram by convolving with a Gaussian.
Method 2
Convolve each point to be added to the histogram with a Gaussian, so each point is smeared between multiple histogram bins.
Method 1 treats each point as though it lay at the centre of its bin. If a point lies very near the edge of a bin, then method 2 behaves smoothly as the point moves from one bin to the next, whereas method 1 will have a discrete jump.
Convolution Method
If an eigenvalue is E, and a histogram bin ranges from a to b, then
Method 1
The centre of the bin is (a+b)/2, the distance from the centre is x=E-(a+b)/2. Weight by exp(-(x/s)2)*s/sqrt(π).
Method 2
The distance from one side of the bin is (E-a), from the other is (E-b). Weight by 0.5*(erf((E-a)/s)-erf((E-b)/s))/(b-a). Factor of 0.5 as erf(∞)-erf(-∞)=2.
Method 2 guarentees to preserve the correct total weight, but method 1 is almost as good, and simpler.
Conclusions
Precise results will depend on the choices made above. However, meaningful conclusions should not be particularly sensitive to the smearing method.
All the above methods tend to reduce band-gaps, which is unfortunate.
The same smearing width may produce different results with different analysis codes due to the different choices of width definition and method above.