<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Dear Reza,<br>
         the integrated density is computed in many places giving the
      right result.<br>
         check your code with some of these places. for instance when
      Hartree potential is computed in PW/src/v_of_rho.f90<br>
      <br>
      stefano<br>
      <br>
      On 26/05/2016 21:56, reza vatan wrote:<br>
    </div>
    <blockquote
cite="mid:CA+GC1ES+j2H6VzuQERHaSQ151SoWogn-DcBNN2=3QF79biKrBw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Dear Paolo and Stefano,<br>
              <br>
            </div>
            Thank you so much for your reply. <br>
            Both ways give me the same values but still incorrect value
            which is 8 electron per unit cell however I have only 2
            electron per unit cell. Is it possible that QE is giving me
            charge density in a unit different than e/bhor^3 unit?<br>
            <br>
             Paolo! I only have one hydrogen molecule per unit cell.
            Following is my input file:<br>
            <br>
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
             &control<br>
                prefix='h2-scf',<br>
                pseudo_dir='./'<br>
                outdir = './',<br>
                wf_collect=.true.,<br>
                verbosity ='high',<br>
             /<br>
             &system    <br>
            ibrav = 6, celldm(1) =20.37, celldm(3) =1.0,   nat  =2,
            ntyp=1,<br>
                ecutwfc = 12.0,<br>
                ecutrho = 100,<br>
                nbnd=10,<br>
              degauss     = 0.05D0,<br>
              occupations = "fixed",<br>
              smearing    = "methfessel-paxton",    <br>
                force_symmorphic= .true.<br>
             /<br>
             &electrons<br>
             /<br>
            ATOMIC_SPECIES<br>
             H  1.01  Si.blyp-hgh.UPF<br>
            ATOMIC_POSITIONS (angstrom)<br>
            H        0.099985299   0.099985299   0.077144425<br>
            H        0.100014701   0.100014701   0.862855575<br>
            K_POINTS {automatic}<br>
            4 4 4 0 0 0<br>
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
            <br>
          </div>
          Best,<br>
        </div>
        Reza<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, May 25, 2016 at 10:40 PM,
          Stefano de Gironcoli <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:degironc@sissa.it"
              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:degironc@sissa.it">degironc@sissa.it</a></a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Reza
            Vatan,<br>
                  In order to canculate the total charge you should sum
            the density on all point and multiply the result by the
            volume element. That is multiply by 20.37^3 and divide by
            45^3 or 72^3 depending on the grid used.<br>
            Which gives 8 in both cases<br>
            <br>
            Di you place 4 molecules in the unit cell ?<br>
            <br>
            stefano<br>
            (sent from my phone)<br>
            <div class="HOEnZb">
              <div class="h5"><br>
                > On 26 May 2016, at 01:44, reza vatan <<a
                  moz-do-not-send="true"
                  href="mailto:rezavatan64@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:rezavatan64@gmail.com">rezavatan64@gmail.com</a></a>>
                wrote:<br>
                ><br>
                > Dear all,<br>
                ><br>
                > I have one hydrogen molecule in a unit cell
                repeating in 3D space in such a way non of the hydrogen
                molecules can't see each other. I'm trying to calculate
                the "electron (pseudo-)charge density" in the entire
                unit cell using pp.x. The problem is that when I add the
                charge density of all meshes to get the total charge
                density of the entire unit cell I get different values
                depends on the used grid. For instance, when I use
                45x45x45 grid I get 86.25 for charge density, but when I
                use 72x72x72 I get 353.26.<br>
                ><br>
                > However, since my unit cell size is
                20.37x20.37x20.37 bhor^3 and I have 2 electrons in the
                unit cell, I think I should get
                2/(20.37x20.37x20.37)=0.000236623. Does any one know why
                I'm not getting this number?<br>
                ><br>
                > Thanks in advances,<br>
                ><br>
                > Best,<br>
                > Reza Vatan,<br>
                > Electrical Engineering Department,<br>
                > Arizona State University.<br>
              </div>
            </div>
            <div class="HOEnZb">
              <div class="h5">>
                _______________________________________________<br>
                > Pw_forum mailing list<br>
                > <a moz-do-not-send="true"
                  href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
                > <a moz-do-not-send="true"
                  href="http://pwscf.org/mailman/listinfo/pw_forum"
                  rel="noreferrer" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br>
                <br>
                <br>
                _______________________________________________<br>
                Pw_forum mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
                <a moz-do-not-send="true"
                  href="http://pwscf.org/mailman/listinfo/pw_forum"
                  rel="noreferrer" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Pw_forum mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a>
<a class="moz-txt-link-freetext" href="http://pwscf.org/mailman/listinfo/pw_forum">http://pwscf.org/mailman/listinfo/pw_forum</a></pre>
    </blockquote>
    <br>
  </body>
</html>