Calculating Density of States (DOS and PDOS) in Quantum ESPRESSO
Quantum Espresso

Calculating Density of States (DOS and PDOS) in Quantum ESPRESSO

Step-by-step Quantum ESPRESSO DOS and PDOS tutorial: scf, dense nscf, dos.x total DOS, projwfc.x projected DOS, orbital contributions, and Fermi-level alignment.

Calculating Density of States (DOS and PDOS) in Quantum ESPRESSO
Photo by Pawel Czerwinski on Unsplash · View photo

The density of states (DOS) tells you how many electronic states are available at each energy, and its projection onto atomic orbitals (PDOS) reveals which atoms and which orbitals contribute to bonding, band edges, and magnetism. This tutorial covers the complete Quantum ESPRESSO workflow for both total and projected DOS, from the self-consistent run through interpretation and plotting.

What the Density of States Tells You

The total DOS integrates the electronic structure over the entire Brillouin zone and reports states per unit energy:

$$ D(E) = \sum_{n}\frac{1}{\Omega_{\mathrm{BZ}}}\int_{\mathrm{BZ}}\delta\bigl(E - \varepsilon_{n\mathbf{k}}\bigr)\,d\mathbf{k} $$

A finite \(D(E_{\mathrm{F}})\) means the material is metallic; a clean gap means it is a semiconductor or insulator. The projected DOS decomposes that curve into contributions from individual atomic orbitals — \(s\), \(p\), \(d\) — so you can attribute, for example, a valence-band feature to oxygen \(2p\) states or a conduction band to transition-metal \(3d\) states.

Because the DOS is a Brillouin-zone integral, it demands far denser \(\mathbf{k}\)-point sampling than a band structure or a geometry optimization. This is why the workflow separates the physics into distinct runs with different \(\mathbf{k}\)-grids.

The DOS Workflow at a Glance

The pipeline mirrors the band structure workflow but replaces the \(\mathbf{k}\)-path with a dense uniform grid:

flowchart LR
  A["pw.x scf<br/>converge density"] --> B["pw.x nscf<br/>dense k-grid"]
  B --> C["dos.x<br/>total DOS"]
  B --> D["projwfc.x<br/>PDOS / Lowdin"]
  C --> E["Align to E_F and plot"]
  D --> E
  1. SCF (pw.x, calculation='scf') to converge the charge density.
  2. Dense NSCF (pw.x, calculation='nscf') on a much finer Monkhorst–Pack grid using the tetrahedron method or fine smearing.
  3. Total DOS with dos.x.
  4. Projected DOS with projwfc.x.
  5. Alignment and plotting relative to the Fermi level.

Step 1: The Self-Consistent Field Run

We use bulk fcc copper — a metal — so the DOS clearly shows the filled 3d band below the Fermi level and the free-electron-like 4s states crossing it. Metals require smearing to handle the partially filled bands.

&CONTROL
    calculation = 'scf'
    prefix      = 'cu'
    outdir      = './out'
    pseudo_dir  = './pseudo'
/
&SYSTEM
    ibrav          = 2
    celldm(1)      = 6.83
    nat            = 1
    ntyp           = 1
    ecutwfc        = 45.0
    ecutrho        = 360.0
    occupations    = 'smearing'
    smearing       = 'mv'
    degauss        = 0.02
/
&ELECTRONS
    conv_thr       = 1.0d-8
    mixing_beta    = 0.7
/
ATOMIC_SPECIES
 Cu  63.546  Cu.pbe-dn-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS (alat)
 Cu  0.00  0.00  0.00
K_POINTS (automatic)
 12 12 12 0 0 0

Here smearing = 'mv' selects Marzari-Vanderbilt cold smearing, which is well-behaved for metals, and degauss = 0.02 Ry sets the broadening.

pw.x -in cu.scf.in > cu.scf.out

Step 2: The Dense Non-SCF Calculation

The NSCF run reads the converged density and re-diagonalizes on a dense grid. For DOS you typically double or triple the SCF grid density. The tetrahedron method (occupations = 'tetrahedra_opt') is often preferred for DOS because it needs no broadening parameter and integrates accurately.

&CONTROL
    calculation = 'nscf'
    prefix      = 'cu'
    outdir      = './out'
    pseudo_dir  = './pseudo'
/
&SYSTEM
    ibrav          = 2
    celldm(1)      = 6.83
    nat            = 1
    ntyp           = 1
    ecutwfc        = 45.0
    ecutrho        = 360.0
    occupations    = 'tetrahedra_opt'
    nbnd           = 16
/
&ELECTRONS
    conv_thr       = 1.0d-8
/
ATOMIC_SPECIES
 Cu  63.546  Cu.pbe-dn-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS (alat)
 Cu  0.00  0.00  0.00
K_POINTS (automatic)
 24 24 24 0 0 0

The extra bands (nbnd = 16) ensure the conduction-band region above the Fermi level is well represented.

pw.x -in cu.nscf.in > cu.nscf.out

Step 3: Total DOS with dos.x

The dos.x tool reads the NSCF eigenvalues and integrates them onto an energy grid.

&DOS
    prefix   = 'cu'
    outdir   = './out'
    fildos   = 'cu.dos'
    emin     = -12.0
    emax     =  20.0
    deltae   =  0.05
/
dos.x -in cu.dos.in > cu.dos.out

The output file cu.dos has three columns: energy (eV), DOS (states/eV), and integrated DOS. The header line reports the Fermi energy — note it down, because everything gets aligned to it.

Step 4: Projected DOS with projwfc.x

The projwfc.x tool projects each Kohn-Sham state onto atomic (pseudo-)orbitals and produces both a summed PDOS and per-orbital files.

&PROJWFC
    prefix   = 'cu'
    outdir   = './out'
    filpdos  = 'cu.pdos'
    emin     = -12.0
    emax     =  20.0
    deltae   =  0.05
    ngauss   = 0
    degauss  = 0.01
/
projwfc.x -in cu.projwfc.in > cu.projwfc.out

This creates a family of files. The naming encodes the atom and orbital:

FileMeaning
cu.pdos_totTotal PDOS summed over all projections
cu.pdos_atm#1(Cu)_wfc#1(s)s-orbital PDOS on atom 1
cu.pdos_atm#1(Cu)_wfc#2(p)p-orbital PDOS on atom 1
cu.pdos_atm#1(Cu)_wfc#3(d)d-orbital PDOS on atom 1

The projwfc.x output also prints Lowdin charges, an orbital-resolved breakdown of the electron count per atom — useful for tracking oxidation states and charge transfer.

Step 5: Aligning to the Fermi Level

Raw energies are on the internal Quantum ESPRESSO scale. To make plots physically meaningful, subtract the Fermi energy so \(E_{\mathrm{F}}\) sits at zero — plot versus \(E - E_{\mathrm{F}}\). Read it from either the SCF output or the dos.x header:

grep "Fermi energy" cu.scf.out

For a semiconductor with no states at the Fermi level, align instead to the valence band maximum. Consistent alignment across total DOS and PDOS is essential — always use the same reference.

Step 6: Plotting and Interpreting the Results

A simple gnuplot script overlays the total DOS with the orbital-resolved PDOS.

gnuplot -persist <<'EOF'
ef = 15.62   # Fermi energy in eV from the header
set xlabel "E - E_F (eV)"
set ylabel "DOS (states/eV)"
set xrange [-10:6]
set arrow from 0,graph 0 to 0,graph 1 nohead dt 2
plot "cu.dos"                          using ($1-ef):2 w l lw 2 title "Total", \
     "cu.pdos_atm#1(Cu)_wfc#3(d)"      using ($1-ef):2 w l lw 2 title "Cu 3d", \
     "cu.pdos_atm#1(Cu)_wfc#1(s)"      using ($1-ef):2 w l lw 2 title "Cu 4s"
EOF

Reading the physics

For copper you should see a tall, narrow 3d band roughly 2 to 5 eV below the Fermi level, dominating the total DOS, while the broad, low 4s band stretches through and above E_F. Because there is a finite DOS at zero, copper is correctly identified as a metal. The narrowness of the d-band reflects the localized, weakly dispersing nature of d electrons; the width of the s-band reflects delocalized, free-electron-like behavior.

For an oxide or semiconductor, the same PDOS decomposition immediately tells you the orbital character of the valence-band top and conduction-band bottom — critical for understanding optical transitions and doping.

Integrated DOS and electron counting

The third column of the dos.x output is the integrated DOS, the running total of states up to each energy. Evaluated at the Fermi level it must equal the number of valence electrons per cell — a quick sanity check that your NSCF sampling and band count are correct. For copper, the integrated DOS at E_F should return 11 electrons (the 3d10 4s1 valence configuration of the pseudopotential). A mismatch usually points to too few bands or a misplaced Fermi energy.

Spin-polarized DOS

For magnetic systems, set nspin = 2 and provide starting_magnetization in the SCF and NSCF runs. Both dos.x and projwfc.x then resolve the DOS into majority and minority spin channels. The convention is to plot spin-up as positive and spin-down as negative on the same axis, so the exchange splitting between the two channels — the microscopic origin of the magnetic moment — is immediately visible. The area imbalance between up and down channels below E_F equals the net magnetic moment in Bohr magnetons.

DOS at the Fermi level and material classification

The value of the total DOS exactly at \(E_{\mathrm{F}}\), written \(N(E_{\mathrm{F}})\), is a single number with outsized importance. It enters the electronic specific heat \(\gamma \propto N(E_{\mathrm{F}})\), the Pauli paramagnetic susceptibility, and — through the electron-phonon coupling — estimates of superconducting transition temperatures. A large \(N(E_{\mathrm{F}})\) driven by flat \(d\)-bands sitting at the Fermi level is a recurring signature in correlated and superconducting materials.

Common Pitfalls

  • NSCF grid too coarse: a jagged, spiky DOS usually means insufficient k-points. Double the grid and recompute.
  • Mixing smearing methods: if you used tetrahedra in the NSCF, do not impose a Gaussian broadening in dos.x that washes out real features.
  • Forgetting extra bands: without enough nbnd, the DOS is truncated above the Fermi level.
  • Inconsistent Fermi reference: aligning the total DOS and PDOS to different energies produces misleading plots.

For related electronic-structure workflows, see our guide to band structure calculations in the blog, the platform’s computational engines, and the official Quantum ESPRESSO documentation.

Run it on Simatra

Converged DOS and PDOS demand dense k-grids and large nbnd values, which is exactly where GPU acceleration pays off. Simatra runs Quantum ESPRESSO on GPU-accelerated clusters (instance GPU-Opt-V2) delivering up to 5x faster convergence and supporting supercells up to ~2,000 atoms, so even fine 24x24x24 NSCF grids finish quickly. Claim your free trial with $100 in credits at app.simatra.io, and see the full lineup of computational engines — Quantum ESPRESSO alongside our native C++20 KRONOS engine — available on the platform.