Silicon Density of States with Vasp
Using Vasp to calculate a density of states or a band structure makes the manner in which a charge density is first calculated in a self-consistent fashion, and then frozen to provide the potential for some non self-consistent calculations, particularly clear. For the self-consistent "base" calculation, the input files were as follows:
Bas calculation, input files
POSCAR
comment
1.0000000000000000
2.695464 2.695464 0.000000
0.000000 2.695464 2.695464
2.695464 0.000000 2.695464
Si
2
Direct
0.000000 0.000000 0.000000
0.250000 0.250000 0.250000
KPOINTS
# 0 Gamma 6 6 6
INCAR
ENCUT = 125 ISMEAR = 0
A suitable Si pseudopotential from the Vasp distribution was copied
into POTCAR, and vasp run.
Non self-consistent calculation
The non self-consistent calculation was performed in a different
directory. The old POSCAR and POTCAR were
copied, as too was the CHGCAR output from the first
calculation. Now a denser regular k-point mesh is required, so
the KPOINT file was copied and the "6 6 6" line changed
to "16 16 16".
Finally a new INCAR is needed to tell Vasp to perform a non
self-consistent calculation.
ICHARG = 11 ENCUT = 125 ISMEAR = -5
Results
Vasp calculates a DOS using Blöchl's method itself, so there
is nothing for c2x to do. The output is in the
file DOSCAR. The DOSCAR file has a header of
six lines before the actual plot data, so to plot it with gnuplot one
can try:
gnuplot> plot "DOSCAR" skip 6 with lines

If one wishes to repeat the DOS calculation with c2x, it is best to
run it on the EIGENVAL file. As the k-points there are
symmetrised, it will also need the unit cell description in order to
calculate the symmetry operations (assuming c2x was compiled with
spglib). These it will automatically read from a POSCAR
or CONTCAR file. It will also look for a DOSCAR
file from which it will read the Fermi energy.
$ c2x --dos_gnu EIGENVAL out.gnu Additionally reading CONTCAR Additionally reading DOSCAR No symmetry operations given, and kpoints appear to be symmetrised Attempting to find symmetry operations Tol=0.0001 48 symmetry operations found. DOS sum, spin=0: 15.898579 DOS integral, spin=0: 15.904811 $ gnuplot -p out.gnu

The plots are qualitatively similar without being identical. One
difference is that Vasp defaults to 300 points, and c2x to 200 (one could use --dos_gnu:300). There
may also be differences in how Blöchl's method is implimented,
either through minor bugs, or because there is a free choice in
Blöchl's method if the minimum length body diagonal of the
reciprocal space unit cell is not unique (e.g. primitive cubic).