[QE-users] How to obatin orbital projected band structre
Nicola Marzari
nicola.marzari at epfl.ch
Sat Feb 28 15:49:53 CET 2026
On 28/02/2026 06:41, Narayanan Namboodiri P via users wrote:
> Dear QE Users,
>
>
> I am using QE for my DFT calculations and i want
> to plot atom projected band structure for my compounds. Can anyone
> kindly help me how i can plot this.
>
> Thanking you in advance
>
> with regards
> Narayanan
These days you do not even need chatgpt and similars - google is enough.
nicola
"I am using QE for my DFT calculations and i want to plot atom projected
band structure for my compounds. Can anyone kindly help me how i can
plot this."
Plotting atom-projected band structures ("fat bands") in Quantum
ESPRESSO (QE) involves a four-step workflow: self-consistent field (SCF)
calculation, non-self-consistent field (NSCF) band structure
calculation, projection of wavefunctions (
projwfc.x), and plotting.
Here is the step-by-step guide to generating and plotting atom-projected
band structures.
Step 1: Ground State (SCF) Calculation
Run pw.x to get the converged charge density.
Input: scf.in (standard SCF input, high-quality k-mesh)
Command: pw.x < scf.in > scf.out
Step 2: Band Structure (NSCF) Calculation
Run pw.x to calculate eigenvalues along a high-symmetry path.
Input: bands.in (Use calculation = 'bands', define a K_POINTS
crystal_b path)
Command: pw.x < bands.in > bands.out
Note: Ensure the prefix and outdir are the same as in Step 1.
Step 3: Atomic Projection (projwfc.x)
This step projects the Kohn-Sham states onto atomic orbitals.
Input: projwfc.in
Key parameters:
fortran
&PROJWFC
prefix = 'your_prefix', outdir = './tmp/', ngauss = 0, degauss =
0.01, Esigma = 0.01, kresolveddos = .true. ! Required for projected bands
filproj = 'atom_proj'
/
Command: projwfc.x < projwfc.in > projwfc.out
Output: This generates files like atomic_proj.xml and *.kpdos files
containing the projections.
Step 4: Plotting the Projected Bands
There are two main ways to plot the results:
Method A: Using pyprocar (Recommended)
pyprocar is a Python library tailored for QE to plot fat bands easily.
Install: pip install pyprocar
Run: Use the following Python command to generate the plot:
python
import pyprocar
pyprocar.bandsplot(dirname='.', mode='atomic', code='qe')
Method B: Using projwfc.x + Gnuplot
You can extract the projected bands from projwfc.x output.
Extract Data: Use sumpdos.x to sum projections for specific
atoms/orbitals. For example, to sum all orbitals of atom 1:
bash
sumpdos.x *\(atom1\)* > atom1_proj.dat
Plotting: Use gnuplot or matplotlib to plot the filproj.kpdos
files, mapping the projected weight to color or band thickness.
Summary of Tools
projwfc.x: Projects Kohn-Sham states to atomic orbitals.
sumpdos.x: Sums desired projections.
pyprocar: Python tool for visualizing fat bands.
qe_pp_bands.py: Python script, often used with projwfc.x output.
Ensure you copy the atomic_proj.xml file from the .save directory to
your working directory before running projection scripts.
>
> _______________________________________________________________________________
> The Quantum ESPRESSO Foundation stands in solidarity with all civilians worldwide who are victims of terrorism, military aggression, and indiscriminate warfare.
> --------------------------------------------------------------------------------
> Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
> users mailing list users at lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
--
----------------------------------------------------------------------
Prof Nicola Marzari, Chair of Theory and Simulation of Materials, EPFL
Director, National Centre for Competence in Research NCCR MARVEL, SNSF
Laboratory Head, PSI Center for Scientific Computing, Theory, and Data
Contact info and websites: https://theos-wiki.epfl.ch/en/Main/Contact
More information about the users
mailing list