# How to calculate the energy of conduction band and valence band with respect to vacuum in quantum espresso?

I was able to calculate band energies in quantum espresso. How to convert them to values that are in terms of difference from vacuum energy?

First of all, you need to find where the vacuum energy level is. To that purpose, you need first calculate the planar average of the electrostatic potential like the following figure:

from which you can find the vacuum energy level. How to obtain this figure with Quantum Espresso?

• Self-consistent calculation with pp.x.

• Postprocessing with pp.x.

 &INPUTPP
outdir='./tmp'
plot_num=11
filplot='pp11.dat'
/

• Take the planar average of the electrostatic potential with average.x.

• If the question author is asking about band energies from a bulk calculation, you should also align the potential at the center of the slab with that of the bulk calculation as well. – Kevin J. May Nov 11 '20 at 1:48
• Along which axis is this diagram? and How do I define it? – Ashique Lal Nov 11 '20 at 8:16
• @AshiqueLal z direction – Jack Nov 11 '20 at 8:37
• What is the unit for the output of average.x? – Ashique Lal Dec 26 '20 at 5:16