Further Electonic LDOS plotting options
From version 2.50a of c2x, rather more options are available when plotting DoSes. The graphical functionality with phonon DoSes is available for electronic DoSes too.
This means that c2x always stores internally the full DoS as well as any projected electronic DoS. By default, if an electronic LDoS is present, the full DoS is not plotted. Here the Si surface example is represented, and the extra syntax of c2x 2.50a to include both surfaces is used.


The left-hand plot is an LDoS projected on slabs from 0.1 to 0.227 and 0.734 to 0.85, i.e. the two surfaces.
$ c2x -v --dos_eps:G --ldos=0.1-0.227+0.734-0.85c Si_surface.orbitals Si_surface_LDOS.eps
The right-hand plot then turns on the full DoS plot too.
$ c2x -v --dos_eps:G --ldos=0.1-0.227+0.734-0.85c --doscolour=++ Si_surface.orbitals Si_surface_DOS_LDOS.eps

$ c2x --dos_eps:G --ldos=0.1-0.227+0.734-0.85c --doscolour=grad,red --doslinecolour=black,white --dosfill=+- Si_surface.orbitals Si_surface.eps
Remembering that the first DoS stored by c2x is the full DoS, and the second the partial LDoS, this means:
- gradient colour for the DoS, and red for the LDoS when calculating gradient fill colour
- plot the lines as black for the DoS, white for the LDoS
- fill the DoS, do not fill the LDoS
What does this mean physically? That with this small slab the states which have appeared in the gap are biased towards the surface region defined, but by no means completely localised to that region.
Is it Right?
It looks pretty, but is it correct, or, at least, consistent with other ways of analysing the bands?
The system contains 32 Si atoms, each with four valence electrons, so, if an insulator, bands up to number 64 would have two electrons each, and higher bands would be empty. The surface states mean that it is not an insulator, and c2x can report which bands cross the Fermi level.
$ c2x --widths --null Si_surface.bands Additionally reading Si_surface.cell Bands crossing Fermi level: band spin occupancy min eval max eval width (eV) * 66 0 0.000000 0.351758 1.168806 0.817048 * 65 0 0.000000 0.336174 1.142536 0.806362 * 64 0 0.000000 0.216670 0.554974 0.338304 (Widths etc. are meaningless for crossing bands.)
One can try to visualise a band with an isosurface.
$ c2x -B=64 -A -w=k -k=- -v Si_surface.orbitals B64.xsf
So this is the lowest of the bands crossing the Fermi surface. It
is being visualised as a charge density (-B), using all
k-points (-k=-, short for -k=1-30). All of
the contributions are accumulated (-A), after weighting by
k-point weight (-w=k).

The band is localised at the surface, and extends into the slab to
about the third layer. But tails are difficult to see with
isosurfaces, so one could try a 1D averaged plot. (Versions of c2x
before 2.50a had a bug relating to 1D averaged plots
with -B.)
$ c2x -B=64 -A -w=k -k=- -v --gnu -P=c:w -i=1,1,0 Si_surface.orbitals B64_1d.gnu

Now a significant tail in the slab region is seen, and no tail in
the vacuum region. But it might be even easier to see how
significant this tail is if the above is integrated, but
changing c:w to c:a.

The original LDoS plot went up to c=0.227, i.e. 8A, and then restarted at c=0.734, i.e. 25.7A. Reading values from the .gnu file for the above graph, the values of the integral at these points are around 0.27 and 0.72. So we have missed about 45% of the band. This is consistent with the LDoS plot showing that we have captured just over half of the density at the Fermi level.
One might ask if the other two Fermi level crossing bands are similar? One can try plotting the sum of all three:
$ c2x -B=64-66 -A -w=k -k=- -v --gnu -P=c:a -i=1,1,0 Si_surface.orbitals B64_66_1d.gnu

It looks very similar. In contrast, the lowest
band, -B=1, is found in the centre of the slab, not near
the surfaces.

Density from lowest band

Integrated density from lowest band