# 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 first need to 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 pw.x.

• Postprocessing with pw.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. Nov 11, 2020 at 1:48
• Along which axis is this diagram? and How do I define it? Nov 11, 2020 at 8:16
• @AshiqueLal z direction
– Jack
Nov 11, 2020 at 8:37
• What is the unit for the output of average.x? Dec 26, 2020 at 5:16
• Is your answer complete? I actually wonder how large the vacuum region has to be and at what distance from the film you have to calculate the planar average of the potential. I mean, the electrostatic interaction has a long range. One probably has to introduce a large vacuum region to extract the quantity in this way. I would have assumed that there are extrapolation schemes that are more efficient. Jun 21 at 16:50