# 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. Nov 11 '20 at 1:48
• Along which axis is this diagram? and How do I define it? 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? Dec 26 '20 at 5:16
{"ft_lang_label":"__label__en","ft_lang_prob":0.89848393,"math_prob":0.94838756,"size":1201,"snap":"2021-31-2021-39","text_gpt3_token_len":295,"char_repetition_ratio":0.12781955,"word_repetition_ratio":0.041025642,"special_character_ratio":0.25062448,"punctuation_ratio":0.10775862,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9936792,"pos_list":[0,1,2],"im_url_duplicate_count":[null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-20T06:13:16Z\",\"WARC-Record-ID\":\"<urn:uuid:48c42688-6f1f-4dc8-af20-00a7a1d68457>\",\"Content-Length\":\"157655\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8ced5a18-f693-4ee8-9b38-318015b02537>\",\"WARC-Concurrent-To\":\"<urn:uuid:21e4652a-2def-4bea-8174-7bd7c2e05f94>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://mattermodeling.stackexchange.com/questions/3720/how-to-calculate-the-energy-of-conduction-band-and-valence-band-with-respect-to\",\"WARC-Payload-Digest\":\"sha1:JYGFKSR53BI3TDSCXLFYLIGKXOLULHLN\",\"WARC-Block-Digest\":\"sha1:R63Z456QORPPKSCL3NEOUKD5R2A3XTH3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057018.8_warc_CC-MAIN-20210920040604-20210920070604-00426.warc.gz\"}"}