<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Dear Michele,</p>
    <p>I'm not 100% sure if that is the problem, but the
      tefield+dipfield option are still 3D PBC - thus, you might get
      some influence from the 3rd direction on the total energy even if
      it shouldn't change much if you increase z. I think it is more
      important that the band structures are the same... Are those
      comparable?</p>
    <p>Regards</p>
    <p>Thomas<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 09/14/17 14:39, Michele Re Fiorentin
      wrote:<br>
    </div>
    <blockquote
cite="mid:CA+mtspRLAdic=OKksR=OCB0f=VT+BDG5_4AxM-1CXqxt98w4mQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>Dear all,<br>
                            <br>
                          </div>
                          I tried to compare the results of the ESM
                          example <span class="gmail-final-path">Al001_bc2_efield.out
                            (Al slab within a capacitor) with those you
                            get when using tefield.<br>
                          </span></div>
                        <span class="gmail-final-path">I can reproduce
                          the reference values reported in the ESM
                          example, getting a total energy of -49.2553
                          Ry.<br>
                        </span></div>
                      <span class="gmail-final-path">Then, I setup a
                        simulation using tefield ad dipfield (and no ESM
                        of course) with the same amount of vacuum around
                        the Al slab as in the ESM output and eamp set to
                        half esm_efield (accounting for Ha/a.u instead
                        of Ry/a.u.).<br>
                      </span></div>
                    <span class="gmail-final-path">I get a final total
                      energy of -49.5166, which is rather far from the
                      ESM case. I attach here my two input files.<br>
                    </span></div>
                  <span class="gmail-final-path">What am I missing?<br>
                  </span></div>
                <span class="gmail-final-path">Thank you very much for
                  your cooperation.<br>
                </span></div>
              <span class="gmail-final-path">Best,<br>
                <br>
              </span></div>
            <span class="gmail-final-path">Michele<br>
              <br>
              <br>
            </span></div>
          <span class="gmail-final-path">***** ESM INPUT FILE *****<br>
            &control<br>
                calculation='scf',<br>
                restart_mode='from_scratch',<br>
                prefix='Al_esm_efieldM01',<br>
                outdir='./Al_esm_efieldM01/',<br>
                tprnfor = .TRUE.,<br>
             /<br>
             &system<br>
                ibrav = 0,<br>
                nat= 4, ntyp= 1,<br>
                ecutwfc = 20.0,<br>
                nosym=.TRUE.<br>
                occupations='smearing', <br>
                smearing='mp', <br>
                degauss=0.03<br>
                assume_isolated='esm', <br>
                esm_bc='bc2', <br>
                esm_efield= 0.00192148511256006<br>
             /<br>
             &electrons<br>
                mixing_beta = 0.3<br>
             /<br>
             &ions<br>
             /<br>
            ATOMIC_SPECIES<br>
             Al  26.981538   Al.pbe-n-van.UPF<br>
            CELL_PARAMETERS bohr<br>
             10.82227686   0.00000000   0.00000000<br>
              0.00000000  10.82227686   0.00000000<br>
            0.00000000 0.00000000 22.67672253<br>
            ATOMIC_POSITIONS bohr<br>
            Al  0.00000000   0.00000000   0<br>
            Al  5.41113843   0.00000000   0<br>
            Al  0.00000000   5.41113843   0<br>
            Al  5.41113843   5.41113843   0<br>
            K_POINTS automatic<br>
            6 6 1 1 1 0<br>
          </span></div>
        <div><br>
          <span class="gmail-final-path"></span></div>
        <div><span class="gmail-final-path"><br>
          </span></div>
        <div><span class="gmail-final-path"><br>
          </span></div>
        <span class="gmail-final-path">**** tefield INPUT FILE ****<br>
          <br>
          &control<br>
              calculation='scf',<br>
              restart_mode='from_scratch',<br>
              prefix='Al_efieldM01',<br>
              outdir='./Al_efieldM01/',<br>
              tprnfor = .true.,<br>
              tefield = .true.,<br>
              dipfield = .true.<br>
           /<br>
           &system<br>
              ibrav = 6,<br>
              celldm(1) = 10.82227686,<br>
              celldm(3) = 4.19074891972,<br>
              nat= 4, ntyp= 1,<br>
              ecutwfc = 20.0,<br>
              nosym=.true.<br>
              occupations='smearing', <br>
              smearing='mp', <br>
              degauss=0.03<br>
              edir = 3,<br>
              emaxpos = 0.9,<br>
              eopreg = 0.1,<br>
              eamp = -0.00097234533<br>
           /<br>
           &electrons<br>
              mixing_beta = 0.3<br>
           /<br>
           &ions<br>
           /<br>
          ATOMIC_SPECIES<br>
           Al  26.981538   Al.pbe-n-van.UPF<br>
          ATOMIC_POSITIONS bohr<br>
          Al  0.00000000   0.00000000   22.67672253<br>
          Al  5.41113843   0.00000000   22.67672253<br>
          Al  0.00000000   5.41113843   22.67672253<br>
          Al  5.41113843   5.41113843   22.67672253<br>
          K_POINTS automatic<br>
          6 6 1 1 1 0<br>
          <br>
          <br>
        </span>
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>
                            <div>
                              <div><br clear="all">
                                <div>
                                  <div>
                                    <div class="gmail_signature">
                                      <div dir="ltr"><font face="arial,
                                          helvetica, sans-serif"
                                          size="2">--<br>
                                          Michele Re Fiorentin, PhD<br>
                                           <br>
                                          Istituto Italiano di
                                          Tecnologia (IIT)<br>
                                          Center for Sustainable Future
                                          Technologies @ PoliTO<br>
                                          Corso Trento, 21<br>
                                          10129 Torino (Italy)<br>
                                          Tel.:     +39 011/5091904<br>
                                          email:    <a
                                            moz-do-not-send="true"
                                            href="mailto:michele.refiorentin@iit.it"
                                            target="_blank">michele.refiorentin@iit.it</a></font></div>
                                    </div>
                                  </div>
                                  <div dir="ltr"><br>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </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>
    <pre class="moz-signature" cols="72">-- 
Dr. rer. nat. Thomas Brumme
Wilhelm-Ostwald-Institute for Physical and Theoretical Chemistry
Leipzig University
Phillipp-Rosenthal-Strasse 31
04103 Leipzig

Tel:  +49 (0)341 97 36456

email: <a class="moz-txt-link-abbreviated" href="mailto:thomas.brumme@uni-leipzig.de">thomas.brumme@uni-leipzig.de</a>
</pre>
  </body>
</html>