<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1445674877966_2877">To make sure I understood you:</div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2818">-case one gives a charge density plot</div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2878">-case two gives a numerical charges difference, right?</div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2879">>><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_1_1445674877966_2885" class="">You may also use the external Bader post processing to</span><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_1_1445674877966_2887" class=""> </span></div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2891"><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_1_1445674877966_2890">estimate atomic charges, but it requires (to be reliable) PAW or NC pseudopotentials and hand-adjusted very dense FFT grids</span></div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2891">I'm using Ultrasoft PP which means it won't work in my case?</div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2891"><br></div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2891">best</div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2891">-jaret</div><div dir="ltr" id="yui_3_16_0_1_1445674877966_2891">ASU</div><br><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Friday, October 23, 2015 2:36 AM, Giuseppe Mattioli <giuseppe.mattioli@ism.cnr.it> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><br clear="none">Dear Jaret<br clear="none">You may do two (complementary) things:<br clear="none"><br clear="none">1) a Deltarho map. a) Calculation of your whole system and usage of pp.x to extract the charge density (plot_num=0). b) two separate scf calculations <br clear="none">of the insulator slab and metal slab in the same atomic position of the previous one and usage of pp.x to extract the charge densities. c) Subtract <br clear="none">the charge densities calculated in b) to the charge densities calculated in a). If you open the obtained file with xcrysden you can visualize the <br clear="none">charge displacement at the interface (menu tools --> data grid).<br clear="none"><br clear="none">Something like this, which has been set up for a molecule/surface system...<br clear="none"><br clear="none">export FILEA="molecule+surface"<br clear="none">export INPFILE=$FILEA-cha.inp<br clear="none">export OUTFILE=$FILEA-cha.out<br clear="none">echo " $FILEA"<br clear="none">echo " $INPFILE"<br clear="none">echo " $OUTFILE"<br clear="none">cat > $INPFILE << EOF<br clear="none"> &inputpp<br clear="none">    prefix  = '$FILEA'<br clear="none">    outdir = '$TMP_DIR/'<br clear="none">    filplot = '$FILEA-cha.dat'<br clear="none">    plot_num= 0<br clear="none"> /<br clear="none">EOF<br clear="none">$PARA_PREFIX $ESPRESSO/pp.x $PARA_POSTFIX < $INPFILE >> $OUTFILE<br clear="none"><br clear="none">export FILEB="molecule"<br clear="none">export INPFILE=$FILEB-cha.inp<br clear="none">export OUTFILE=$FILEB-cha.out<br clear="none">echo " $FILEB"<br clear="none">echo " $INPFILE"<br clear="none">echo " $OUTFILE"<br clear="none">cat > $INPFILE << EOF<br clear="none"> &inputpp<br clear="none">    prefix  = '$FILEB'<br clear="none">    outdir = '$TMP_DIR/'<br clear="none">    filplot = '$FILEB-cha.dat'<br clear="none">    plot_num= 0<br clear="none"> /<br clear="none">EOF<br clear="none">$PARA_PREFIX $ESPRESSO/pp.x $PARA_POSTFIX < $INPFILE >> $OUTFILE<br clear="none"><br clear="none"><br clear="none">export FILEC="surface"<br clear="none">export INPFILE=$FILEC-cha.inp<br clear="none">export OUTFILE=$FILEC-cha.out<br clear="none">echo " $FILEC"<br clear="none">echo " $INPFILE"<br clear="none">echo " $OUTFILE"<br clear="none">cat > $INPFILE << EOF<br clear="none"> &inputpp<br clear="none">    prefix  = '$FILEC'<br clear="none">    outdir = '$TMP_DIR/'<br clear="none">    filplot = '$FILEC-cha.dat'<br clear="none">    plot_num= 0<br clear="none"> /<br clear="none">EOF<br clear="none">$PARA_PREFIX $ESPRESSO/pp.x $PARA_POSTFIX < $INPFILE >> $OUTFILE<br clear="none"><br clear="none">export FILE="rho-int-$FILEA"<br clear="none">export INPFILE=$FILE.inp<br clear="none">export OUTFILE=$FILE.out<br clear="none">echo " $FILE"<br clear="none">echo " $INPFILE"<br clear="none">echo " $OUTFILE"<br clear="none">cat > $INPFILE << EOF<br clear="none"> &inputpp<br clear="none"> /<br clear="none"> &plot<br clear="none">    nfile = 3<br clear="none">    filepp(1) = '$FILEA-cha.dat'<br clear="none">    weight(1) = 1.0<br clear="none">    filepp(2) = '$FILEB-cha.dat'<br clear="none">    weight(2) = -1.0<br clear="none">    filepp(3) = '$FILEC-cha.dat'<br clear="none">    weight(3) = -1.0<br clear="none">    iflag = 3<br clear="none">    output_format = 5<br clear="none">    fileout = '$FILE.plot'<br clear="none">    e1(1) =1.0, e1(2)=1.0, e1(3) = 0.0,<br clear="none">    e2(1) =0.0, e2(2)=0.0, e2(3) = 1.0,<br clear="none">    nx=56, ny=40<br clear="none"> /<br clear="none">EOF<br clear="none">$PARA_PREFIX $ESPRESSO/pp.x $PARA_POSTFIX < $INPFILE >> $OUTFILE<br clear="none"><br clear="none">2) Use projwfc.x to obtain (Lowdin) atomic charges of your whole system and of the separate slabs (you may also relax the slabs, in this case, to <br clear="none">account for surface effects). Then you compare the atomic charges to look for charge displacement. Be aware that there is a spilling parameter at the <br clear="none">end of the projwfc output which indicates how much of your charge density does not fit into the Lowding atomic partitioning. Your results are <br clear="none">reasonably meaningful only if the spilling parameter is similar for all your calculations... You may also use the external Bader post processing to <br clear="none">estimate atomic charges, but it requires (to be reliable) PAW or NC pseudopotentials and hand-adjusted very dense FFT grids. You may like to have a <br clear="none">look here if you want to try<br clear="none"><br clear="none"><a shape="rect" href="http://theory.cm.utexas.edu/henkelman/code/bader/" target="_blank">http://theory.cm.utexas.edu/henkelman/code/bader/</a><br clear="none"><br clear="none">HTH<br clear="none">Giuseppe<br clear="none"><div class="yqt9930322730" id="yqtfd49446"><br clear="none">On Friday, October 23, 2015 06:12:17 AM you wrote:<br clear="none">> Dear Giuseppe,My system is an interface between an insulator and half-metal.<br clear="none">> -Jaret<br clear="none">> AST, USA>Dear mahmoudASU<br clear="none">> <br clear="none">> >First of all sign always your posts to this Forum with name and affiliation, please.<br clear="none">> ><br clear="none">> >There are many ways to calculate charge displacements (Deltarho plots, atomic charge calculations, ...), but their best usage depends on >the kind<br clear="none">> >of  charge displacement occurring in your system (molecule-surface interaction, charge transfer affecting dopants or defects in a >semiconductor<br clear="none">> >matrix, ...). Impossible to say more without knowing more...<br clear="none">> ><br clear="none">> >HTH<br clear="none">> ><br clear="none">> >Giuseppe  <br clear="none">> ><br clear="none">> >On Wednesday, October 21, 2015 11:42:37 PM Jaret Qi wrote:<br clear="none">> >> Hello QE users,Is there a way to calculate Charge accumulation and depletion in quantum espresso, if so then how?<br clear="none">> >> -mahmoudASU</div><br clear="none"><br clear="none">********************************************************<br clear="none">- Article premier - Les hommes naissent et demeurent<br clear="none">libres et ègaux en droits. Les distinctions sociales<br clear="none">ne peuvent être fondèes que sur l'utilitè commune<br clear="none">- Article 2 - Le but de toute association politique<br clear="none">est la conservation des droits naturels et <br clear="none">imprescriptibles de l'homme. Ces droits sont la libertè,<br clear="none">la propriètè, la sùretè et la rèsistance à l'oppression.<br clear="none">********************************************************<br clear="none"><br clear="none">   Giuseppe Mattioli                            <br clear="none">   CNR - ISTITUTO DI STRUTTURA DELLA MATERIA   <br clear="none">   v. Salaria Km 29,300 - C.P. 10                <br clear="none">   I 00015 - Monterotondo Stazione (RM), Italy    <br clear="none">   Tel + 39 06 90672836 - Fax +39 06 90672316    <br clear="none">   E-mail: <<a shape="rect" ymailto="mailto:giuseppe.mattioli@ism.cnr.it" href="mailto:giuseppe.mattioli@ism.cnr.it">giuseppe.mattioli@ism.cnr.it</a>><br clear="none">   <a shape="rect" href="http://www.ism.cnr.it/english/staff/mattiolig" target="_blank">http://www.ism.cnr.it/english/staff/mattiolig</a><br clear="none">   ResearcherID: F-6308-2012<br><br></div>  </div> </div>  </div></div></body></html>