<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Work function = (average potential in the vacuum) - (Fermi Energy)<div>So you had the solution already, the missing (and not very surprising) step is the identification of the vacuum level with the average of the potential "out in the vacuum" (as discussed many, many times in this forum as well as many, many times in the literature)</div><div><br></div><div>SB</div><div><br><div><div>On Nov 14, 2008, at 3:36 AM, oulihui666 wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear pwscf users,</div> <div>I want to calculate work function, I have got the fermi level, so I must get the vacuum level.</div> <div> <span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: red; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><strong>work = (vacuum level) - (fermi level)</strong></span></div> <div><span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: red; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"><font color="#000000">My input file displayed as follows:</font></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"><font color="#000000">(1)scf calculation:</font></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"><font color="#000000"><o:p><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">&control<br> calculation='scf'<br> restart_mode='from_scratch',<br> prefix='Al',<br> pseudo_dir = './',<br> outdir='./'<br> /<br> &system<br> ibrav= 0, nat=11, ntyp= 1,<br> ecutwfc =16, <br> occupations='smearing', smearing='methfessel-paxton', degauss=0.01<br> /<br> &electrons<br> conv_thr = 1.0d-8<br> mixing_beta = 0.7<br> /<br>CELL_PARAMETERS cubic<br>5.41176 0 0<br>0 5.41176 0<br>0 0 60.9909 <br>ATOMIC_SPECIES<br>Al 13.867 Al.vbc.UPF <br>ATOMIC_POSITIONS {angstrom}<br>Al 0 0 0<br>Al 1.43189 1.43189 2.025<br>Al 0 0 4.05<br>Al 1.43189 1.43189 6.075<br>Al 0 0 8.1<br>Al 1.43189 1.43189 10.125<br>Al 0 0 12.15<br>Al 1.43189 1.43189 14.175<br>Al 0 0 16.2<br>Al 1.43189 143189 18.225<br>Al 0 0 20.25<br>K_POINTS {automatic}<br> 8 8 1 0 0 0<br style="mso-special-character: line-break"></span></o:p></font></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"><font color="#000000"><o:p><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">(2)Electrostatic potential calculation:</span></o:p></font></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"><font color="#000000"><o:p><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"> &inputpp<br> prefix = 'Al'<br> outdir = './'<br> filplot = 'Al.pot'<br> plot_num= 11<br> /<br style="mso-special-character: line-break"></span></span></o:p></font></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"><font color="#000000"><o:p><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">(3)<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">macroscopic averages calculation: average.x.</span></span></span></o:p></font></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"><font color="#000000"><o:p><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">1<br>Al.pot<br>1.D0<br>5000<br>3<br>2.95<br style="mso-special-character: line-break"></span></span></span></span></o:p></font></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"><font color="#000000"><o:p><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">Finally, I get a output file, <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">column 1: coordinate u, <b style="mso-bidi-font-weight: normal"><span style="COLOR: red">defined over a mesh of npt=5000 point</span></b>s along the direction idir=3, <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">column 2: <b style="mso-bidi-font-weight: normal"><span style="COLOR: red">averaged quantity</span></b> V, </span></span></span></span></span></span></o:p></font></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt">column 3: <b style="mso-bidi-font-weight: normal"><span style="COLOR: red">macroscopically averaged quantity V</span></b>, I should how to get the vacuum level? any suggestion will be appreciated.</span></div><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt"></span> </p><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt">Thank you</span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0pt; margin-left: 0cm; line-height: 150%; "><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; mso-font-kerning: 0pt">Lihui Ou</span></div></span></div> <div><br>--<br> <div> <div><font face="Arial" size="3">======================================</font></div> <div><font face="Arial" size="3">Lihui Ou</font></div> <div><font face="Arial" size="3">PH.D Candidate in Electrochemistry </font></div> <div><font face="Arial" size="3">College of Chemistry and Molecular Science </font></div> <div><font face="Arial" size="3">Wuhan University,<em>430072</em>,Hubei Province,China </font></div> <div><em><font face="Arial" size="3">E-mail:</font><a href="mailto:oulihui666@126.com" target="_blank"><font face="Arial" size="3">oulihui666@126.com</font></a></em></div> <div><font face="Arial" size="3">======================================</font></div></div></div><br><!-- footer --><br><hr> <a href="http://www.yeah.net">网易邮箱10周年,技术见证辉煌</a> _______________________________________________<br>Pw_forum mailing list<br><a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>http://www.democritos.it/mailman/listinfo/pw_forum<br></blockquote></div><br></div><br><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">---</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Stefano Baroni - SISSA</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "> </span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">&</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "> </span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">DEMOCRITOS National Simulation Center - Trieste</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "><a href="http://www.sissa.it/~baroni">http://www.sissa.it/~baroni</a> / [+39] 040 3787 406 (tel) -528 (fax) / stefanobaroni (skype)</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; font-size: 12px; "><br style="font-size: 12px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; font-size: 12px; "><span class="Apple-style-span" style="font-size: 14px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">La morale est une logique de l'action comme la logique est une morale de la pensée - Jean Piaget</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "><br></span></font></div></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Please, if possible, don't</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "> </span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">send me MS Word or PowerPoint attachments</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Why? See:</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "> </span></font><font class="Apple-style-span" color="#0023E9" size="3"><span class="Apple-style-span" style="font-size: 12px; "><a href="http://www.gnu.org/philosophy/no-word-attachments.html">http://www.gnu.org/philosophy/no-word-attachments.html</a></span></font></div><div><font class="Apple-style-span" color="#0023E9" size="3"><span class="Apple-style-span" style="font-size: 12px; "><br class="webkit-block-placeholder"></span></font></div></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>