<div dir="ltr">Thank you Dr. Paulatto,<div><br></div><div>You were exactly right! I was using the wrong volume element. </div><div><br></div><div>Thanks again,</div><div><br></div><div>Dan</div><div>PhD Student</div><div>Case Western Reserve University</div><div>Department of Chemical and Biomolecular Engineering</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 16, 2018 at 2:36 AM, Lorenzo Paulatto <span dir="ltr"><<a href="mailto:paulatz@gmail.com" target="_blank">paulatz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 02/15/2018 05:08 PM, Dan Gil wrote:<br>
> I have a charge density output from pp.x made in *.xsf format. I<br>
> integrated the total charge, but I am missing electrons.<br>
<br>
<br>
</span>Not a good idea, because the xcrysden grid format include the points on<br>
the cell surfaces twice, see<br>
<<a href="http://www.xcrysden.org/doc/XSF.html#__toc__11" rel="noreferrer" target="_blank">http://www.xcrysden.org/doc/<wbr>XSF.html#__toc__11</a>><br>
<br>
My guess is that you have both the wrong points and the wrong volume<br>
element and that they somehow almost compensate.<br>
<br>
<br>
kind regards<br>
<span class=""><br>
><br>
> I tried different integration methods: A regular sum yields 451.8 out of<br>
> 456 electrons, trapezoidal integration yields 447.7/456. Simpson's<br>
> method yields 448.4/456.<br>
><br>
</span>> <a href="http://pp.in" rel="noreferrer" target="_blank">pp.in</a> <<a href="http://pp.in" rel="noreferrer" target="_blank">http://pp.in</a>>:<br>
<div><div class="h5">> -----<br>
>   &INPUTPP<br>
>                        outdir = 'bulkQuartz' ,<br>
>                       filplot = 'filplot' ,<br>
>                      plot_num = 0,<br>
>   /<br>
>   &PLOT<br>
>                         nfile = 1 ,<br>
>                     weight(1) = 1.0,<br>
>                         iflag = 3,<br>
>                 output_format = 5,<br>
>                       fileout = 'fileout.xsf'<br>
>   /<br>
> -----<br>
><br>
> Excerpt from pw.out:<br>
> -----<br>
> bravais-lattice index     =            4<br>
>       lattice parameter (alat)  =      19.1740  a.u.<br>
>       unit-cell volume          =   67152.3918 (a.u.)^3<br>
>       number of atoms/cell      =           99<br>
>       number of atomic types    =            3<br>
>       number of electrons       =       456.00<br>
> -----<br>
><br>
><br>
> Best Regards,<br>
><br>
> Dan Gil<br>
> PhD Student<br>
> Case Western Reserve University<br>
> Department of Chemical and Biomolecular Engineering<br>
><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Pw_forum mailing list<br>
> <a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
> <a href="http://pwscf.org/mailman/listinfo/pw_forum" rel="noreferrer" target="_blank">http://pwscf.org/mailman/<wbr>listinfo/pw_forum</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Lorenzo Paulatto - Paris<br>
______________________________<wbr>_________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" rel="noreferrer" target="_blank">http://pwscf.org/mailman/<wbr>listinfo/pw_forum</a></font></span></blockquote></div><br></div>