<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Dear Bahadır,<br>
    <br>
    the input file seems to be OK. Nevertheless, you always have to test
    in the end<br>
    that no charge is spilling into the vacuum because the sawtooth
    function is<br>
    creating an artificial potential minimum. Do this by plotting to
    total potential<br>
    (pp.x, plot_num=1) for example as 3D data file and using average.x
    to average<br>
    over the in-plane directions. If charge is spilling the potential is
    not linear in the<br>
    vacuum region or shows other weird behavior. In this case you have
    to reduce<br>
    the vacuum region in order to reduce the depth of the artificial
    minimum. This<br>
    on the other hand can lead (for too large electric fields) to a
    vacuum region<br>
    which is too small, i.e., leading to interactions between the
    repeated slabs.<br>
    <br>
    The wrong gap you get can be due to anything - your initial input
    file was just<br>
    wrong. The sawtooth within the slab itself is an unphysical
    situation.<br>
    <br>
    Regards<br>
    <br>
    Thomas<br>
    <br>
    <br>
    P.S.: You're using an ultrasoft pseudopotential. In such cases
    ecutrho needs to<br>
    be larger than just 4 times ecutwfc. More like 10 times... Which is
    also stated in<br>
    the documentation...<br>
    <br>
    <div class="moz-cite-prefix">On 11/20/2015 03:27 PM, Bahadır
      salmankurt wrote:<br>
    </div>
    <blockquote
cite="mid:CADT9cuswAWJBs=OuCFYHw8r76npOv_C1j-Ye41hu5_CVB5whwA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="ltr"><font face="arial, helvetica, sans-serif">Dear Dr. <span
            style="font-size:12.8px;white-space:nowrap">Thomas Brumme,</span></font>
        <div><font face="arial, helvetica, sans-serif"><span
              style="font-size:12.8px;white-space:nowrap"><br>
            </span></font></div>
        <div><font face="arial, helvetica, sans-serif"><span
              style="font-size:12.8px;white-space:nowrap">Thank you for
              clear explanation. </span></font></div>
        <div><font face="arial, helvetica, sans-serif"><span
              style="font-size:12.8px;white-space:nowrap"><br>
            </span></font></div>
        <div><font face="arial, helvetica, sans-serif"><span
              style="font-size:12.8px;white-space:nowrap">And also I
              have changed my input file. now, Is everything ok? </span></font></div>
        <div><font face="arial, helvetica, sans-serif"><span
              style="font-size:12.8px;white-space:nowrap"><br>
            </span></font></div>
        <div><font face="arial, helvetica, sans-serif"><span
              style="font-size:12.8px;white-space:nowrap">****</span></font></div>
        <div><font face="arial, helvetica, sans-serif">
            <div style=""><span style="white-space:nowrap"><font
                  size="1">&control</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    calculation='scf'</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    restart_mode='from_scratch',</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    prefix='As',</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    tstress = .true.</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    tprnfor = .true.</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    pseudo_dir
                  ='/home/hakan/tubitak/espresso-5.2.0/pseudo/',</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">   
                  outdir='/home/hakan/tubitak/As/efield/out/',</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">!           etot_conv_thr = 1.0E-4,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">!           forc_conv_thr = 1.0D-3,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">     wf_collect=.true.,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">!     verbosity='high',</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">tefield=.true.</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1"><b>dipfield=.true.</b></font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1"> /</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">&system</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">nbnd=10,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    ibrav=0,celldm(1)=1.8897,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    nat= 2, ntyp=1,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    ecutwfc =30.0,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">    ecutrho=120,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1"><b>  emaxpos=0.95,</b></font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">  eopreg=0.10,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1">  edir = 3,</font></span></div>
            <div style=""><span style="white-space:nowrap"><font
                  size="1"> </font></span><span
                style="font-size:x-small;font-family:arial,sans-serif">eamp
                = 0.0105,</span></div>
          </font><font face="arial, helvetica, sans-serif">
            <div style=""><span style="white-space:nowrap"><font
                  size="1">   /</font></span></div>
            <div style=""><font size="1"><span
                  style="white-space:nowrap">..</span></font><span
                style="white-space:nowrap;font-size:x-small">.</span></div>
            <div style=""><font size="1"><span
                  style="white-space:nowrap"><br>
                </span></font></div>
            <div style="font-size:12.8px;white-space:nowrap">****</div>
            <div style="font-size:12.8px;white-space:nowrap"><br>
            </div>
            <div style="font-size:12.8px;white-space:nowrap">By the way,
              the difference is that  , when <span
                style="font-size:12.8px">E field was </span><span
                style="font-size:12.8px">applied </span><span
                style="font-size:12.8px;font-family:arial,sans-serif">under
                5.00 V/nm ( eamp = </span><span
                style="font-size:12.8px;font-family:arial,sans-serif">0.0097
                au) E field</span><span style="font-size:12.8px"> </span><span
                style="font-size:12.8px">in prb paper which I shared ,
                the band gap became about 0.80 eV. But I find this band
                gap under 10.5 V/nm (eamp=0.0205 au) E field ( I have
                used new input data).  </span></div>
          </font></div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">what does the reason such a difference
          happen? </div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">Thank you again.. </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Dr. rer. nat. Thomas Brumme
Max Planck Institute for the Structure and Dynamics of Matter
Luruper Chaussee 149
22761 Hamburg

Tel:  +49 (0)40 8998 6557

email: <a class="moz-txt-link-abbreviated" href="mailto:Thomas.Brumme@mpsd.mpg.de">Thomas.Brumme@mpsd.mpg.de</a>
</pre>
  </body>
</html>