<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Julien <br>
      <br>
      Nicola Marzari in the email before explained  what was going
      wrong, either that  was because of too low cutoffs or because of
      some problems in the PAWS, as cutoffs looked right I wanted  to
      check  the PPs. To spot the bad one you have just to change them
      one per time. <br>
      <br>
      In the test I did, I got  convergence in less than 20 iterations,
      perhaps  you are still using a too  small value for mixing_beta. 
           <br>
      <br>
      greetings Pietro  <br>
      <br>
      On 03/08/2019 04:34 AM, Julien Barbaud wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:0f7a49e8-2e42-9b80-d55a-aa63d51e2ea6@sjtu.edu.cn">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div class="moz-forward-container">
        <div class="moz-forward-container">
          <p>    Thank you very much Pietro, this actually fixed the
            issue ! The frustrating stalling behaviour in the
            convergence has been suppressed, and I can now reach
            convergence within 1e-8Ry in less than 100 iterations.<br>
          </p>
          <p><br>
          </p>
          <p>    If I am not abusing of your time, can I ask you how you
            spotted that this particular PP was the issue? Gaining some
            insight on what was going wrong or how to debug those
            problems would be very benefitial for me.</p>
          <p><br>
          </p>
          <p>Thanks again for the help.</p>
          <p>Julien<br>
          </p>
          <div class="moz-cite-prefix">Le 01/03/2019 à 11:31, Pietro
            Davide Delugas a écrit :<br>
          </div>
          <blockquote type="cite"
            cite="mid:54b911fe-f433-8186-ca49-c3ef13286fa3@sissa.it">
            <meta http-equiv="Content-Type" content="text/html;
              charset=utf-8">
            <div class="moz-cite-prefix">Hi Julien <br>
              <br>
              I checked your input, and  <a class="element_anchor"
                target="_blank"
href="http://www.quantum-espresso.org/upf_files/N.pbesol-n-kjpaw_psl.1.0.0.UPF"
                moz-do-not-send="true">N.pbesol-n-kjpaw_psl.1.0.0.UPF</a>
              seems to be the cause of your problems, you can use   this
              one instead  <br>
              <a class="moz-txt-link-freetext"
href="http://www.quantum-espresso.org/upf_files/N.pbesol-n-kjpaw_psl.0.1.UPF"
                moz-do-not-send="true">http://www.quantum-espresso.org/upf_files/N.pbesol-n-kjpaw_psl.0.1.UPF</a>
              <br>
              <br>
              and you should  have no more problems  with negative
              charges and have a more or less fast convergence. <br>
                  Pietro <br>
              <br>
              On 02/28/2019 01:27 PM, Julien Barbaud wrote:<br>
            </div>
            <blockquote type="cite"
              cite="mid:82632677-2321-3397-a229-16e00eb191af@sjtu.edu.cn">
              <meta http-equiv="Content-Type" content="text/html;
                charset=utf-8">
              <p>Thanks very much to everyone for their answers,</p>
              <p>I have tried the different fixes suggested (higher
                ecuts, trying out different smearings, raising
                mixing_ndim, changing the mixing_mode, etc...).
                Unfortunatley, none of them worked...<br>
              </p>
              <p>Following Pietro's recommandation, I also designed an
                input geometry perfectly cubic with no distortion and
                the MA+ ion oriented along the [1 1 1] direction for
                higher symmetry. I based the quantitative part of the
                geometry on other cif files available (i.e. for the
                lattice constant, bond lengths, etc...)</p>
              <p>Benefitting from the high symmetry, the algorithm
                worked faster, but was still unable to converge to a
                threshold of 1e-7Ry in 500 iterations...</p>
              <p><br>
              </p>
              <p>I finally relaxed the condition to 1e-6Ry in order to
                reach a scf convergence, and see if I could get more
                informations on the problem from it. <br>
              </p>
              <p>Under those conditions I plotted the scf total energy
                (converged to 1e-6Ry) as a function of ecut. I got the
                curve attached. This seems surprising to me because the
                curve is raising past 45Ry<br>
              </p>
              <p>I thought that the total energy would only have a
                monotonic trend, decreasing with higher ecut, as a
                consequence of the variational principle (indeed, the
                energy of the ground state should be a minimum for all
                possible energies, so a truncated version of the ground
                state wavefunction should yield a higher value of
                energy). Here it seems to break that rule, and to
                "converge" to a value that is not the minimum among all
                possible wavefunctions. This can not be attributed to
                the accuracy of the calculation, because the scf is
                converged down to 1e-6Ry, and the augmentation observed
                is significantly above that threshold<br>
              </p>
              <p>Did I misunderstand something, or is it another sign
                that something is seriously wrong with the calculation ?</p>
              <p><br>
              </p>
              <p>(by the way, the curve stops after 65Ry, because scf
                failed to reach convergence again at ec=70Ry, even for a
                threshold at 1e-6 and 500 iterations).</p>
              <p>What other options should I try to solve this problem ?</p>
              <p><br>
              </p>
              <p>Julien<br>
              </p>
              <p><br>
              </p>
              <p><br>
              </p>
              <div class="moz-cite-prefix">Le 22/02/2019 à 16:45, Pietro
                Delugas a écrit :<br>
              </div>
              <blockquote type="cite"
                cite="mid:0244887b-b39c-55c3-471a-2a4df142d68d@sissa.it">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=utf-8">
                <p><font size="-1">Dear Julien <br>
                  </font></p>
                <p><font size="-1">even if the scf loop converges you
                    have still to check that the k-point sampling and
                    the plane wave basis set guarantee you an accurate
                    result.  <br>
                  </font></p>
                <p><font size="-1"> obviously before worrying about
                    accuracy you would like to have a converged density.
                    <br>
                  </font></p>
                <p><font size="-1">You could try to start with  a more 
                    symmetric  cell, use a  cubic cell without
                    distortions and   align the molecule along one of
                    the diagonals of the perovskite box.  <br>
                  </font></p>
                <p><br>
                </p>
                <div class="moz-cite-prefix">On 22/02/19 08:22, Julien
                  Barbaud wrote:<br>
                </div>
                <blockquote type="cite"
                  cite="mid:5ed6547f-f86e-5f57-ea86-06805e1a99fd@sjtu.edu.cn">
                  <meta http-equiv="content-type" content="text/html;
                    charset=utf-8">
                  <p> </p>
                  <div class="moz-forward-container">
                    <p>Thank you Pietro for your experienced advices,</p>
                    <p><br>
                    </p>
                    <p>I had tried to increase the kmesh size before but
                      only up to sizes of  7x7x7.  Reading your
                      suggestions, I ran additional tests up to 10x10x10
                      but this did not show any sign of improvement on
                      70 iterations. As shown in file kmesh.png, the
                      estimated accuracy is still stagnating after a
                      while and the 10*10*10 is actually giving arguably
                      worse results than the 9*9*9 although this is most
                      likely not significant. Actually, some papers
                      report DFT simulation of MAPbI3 using 6x6x6 kmesh
                      (<a class="moz-txt-link-freetext"
                        href="https://aip.scitation.org/doi/full/10.1063/1.4864778"
                        moz-do-not-send="true">https://aip.scitation.org/doi/full/10.1063/1.4864778</a>),
                      or even single gamma-point calculation (<a
                        class="moz-txt-link-freetext"
href="http://people.bath.ac.uk/aw558/publications/2013/aplm_perovskite_13.pdf"
                        moz-do-not-send="true">http://people.bath.ac.uk/aw558/publications/2013/aplm_perovskite_13.pdf</a>),
                      so I guess this should not be the obstacle to
                      convergence here.</p>
                    <p><br>
                    </p>
                    <p>Regarding the orientation of MA, I definitely
                      agree with you, but I don't think it can prevent
                      the system from converging ? Sure enough, it can
                      have an important influence on the precision of
                      the results in later uses. But I would like to
                      achieve convergence on this simple single cell
                      first, before building up supercells to take more
                      complex effects into account. A crystal with
                      perfectly aligned MA might not reflect the true
                      experimental system, but it should still be a
                      possible configuration that the QE code should be
                      able to compute, am I wrong ?</p>
                    <p><br>
                    </p>
                    <p>As to your suggestion on VdW corrections, I just
                      gave it a try, but unfortunately, this is
                      unconclusive too. I report the accuracy at each
                      iteration in vdw.png. Again, the accuracy stops
                      improving after a while. Plese note that I had to
                      change my pseudo-potentials to use 'xdm'
                      correction (which only supports PAW PP). the input
                      file for this test is included as attached file</p>
                    <p><br>
                    </p>
                    <p>Julien<br>
                    </p>
                    <div class="moz-cite-prefix">Le 21/02/2019 à 16:35,
                      Pietro Davide Delugas a écrit :<br>
                    </div>
                    <blockquote type="cite"
                      cite="mid:fb09ead9-e310-4142-0c01-7c8af7a8ab46@sissa.it">
                      <meta http-equiv="Content-Type"
                        content="text/html; charset=utf-8">
                      <div class="moz-cite-prefix">Hi <br>
                        <br>
                        Have you tried to increase the k_point mesh ?  4
                        4 4 seems a little bit lax as mesh for MAPbI3. <br>
                        If I remember well I am afraid that to get
                        convergence you will need something like
                        10X10X10.<br>
                        As for the structure neighboring
                        methylammoniums  like to orient differently one
                        from the other, you should probably use a larger
                        cell.   Also consider to add some correction for
                        van der Waals interactions see here (  <a
                          class="moz-txt-link-freetext"
href="https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm45922794348896"
                          moz-do-not-send="true">https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm45922794348896</a>)<br>
                        <br>
                        hope it helps <br>
                        Pietro  <br>
                        <br>
                         <br>
                        On 02/21/2019 04:17 AM, Julien Barbaud wrote:<br>
                      </div>
                      <blockquote type="cite"
                        cite="mid:a55d199b-54b2-09be-4cc5-9826e0151a09@sjtu.edu.cn">
                        <meta http-equiv="content-type"
                          content="text/html; charset=utf-8">
                        Dear users,
                        <div class="moz-forward-container">
                          <div class="moz-forward-container">
                            <p><br>
                            </p>
                            <p>I am new to QE, and trying to run a
                              simple scf calculation on a CH3NH3PbI3
                              crystal (semi-conducting material). I am
                              using ultrasoft pseudopotentials based on
                              the exchange-correlation functionnal
                              PBEsol.<br>
                            </p>
                            <p> I set up a first input, with values of
                              parameters inspired from literature on the
                              subject. However, I could not reach
                              convergence after 100 iterations. The
                              estimated error was actually "exploding"
                              to very high values, indicating a serious
                              problem. I tried several changes but was
                              unsuccessful: <br>
                            </p>
                            <ul>
                              <li> varying plane-wave cutoff energy does
                                not solve the problem (cf attached
                                ecut.png, giving the estimated error as
                                a function of the number of iterations.
                                It is shown here only on the first 15
                                iterations as the results pretty much
                                only stall from there)</li>
                              <li> varying cutoff energy for charge (cf
                                ecutrho.png)</li>
                              <li>taking larger k-point sampling (not
                                shown)</li>
                              <li> I also read that for metallic or
                                "close to metallic conductors", there
                                might be problems with the first
                                unoccupied states that can be solved by
                                adding a few empty bands. My system
                                being a semi-conductor, I tried adding
                                additional bands using a m-p smearing
                                but no improvement was found (not shown)</li>
                            </ul>
                            <p><br>
                            </p>
                            <p>The only change that I found effective
                              was to reduce the mixing_beta factor.<br>
                            </p>
                            <p><br>
                            </p>
                            <p>It effectively prevents the error from
                              diverging to very large values, but I
                              still do not reach convergence, even after
                              longer iterations. I tried much smaller
                              values of mixing beta which improves the
                              final value of the error, but I still
                              cannot reach convergence on 100
                              iterations. As shown in the
                              mixbeta2_zoom.png, the error reduces to
                              smaller values around ~1e-5~1e-6, but it
                              keeps stalling after a while. I do not
                              observe a well-converging behaviour for
                              any value.</p>
                            <p><br>
                            </p>
                            <p>I attached the "default version" of my
                              script on which the various modifications
                              described above have been independently
                              performed. I obtained the geometry from a
                              CIF file in literature and checked it with
                              visualization software; it seems perfectly
                              ok as far as I can tell.<br>
                            </p>
                            <p><br>
                            </p>
                            <p>Any insight on what I did wrong would be
                              really helpful. I suspect a shameful
                              beginner mistake, but can not find it out.<br>
                            </p>
                            <p><br>
                            </p>
                            <p>Thanks in advance,</p>
                            <p>Julien barbaud</p>
                            <p><br>
                            </p>
                            <p>P.S: this is my first time posting on
                              this user list. Please let me know if my
                              question is not suitable for it, or can be
                              improved either in its content or
                              presentation. I will gladly take any
                              recommandation into account in order not
                              to negatively impact the quality of this
                              user list !<br>
                            </p>
                          </div>
                        </div>
                        <br>
                        <fieldset class="mimeAttachmentHeader"></fieldset>
                        <br>
                        <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org" moz-do-not-send="true">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users" moz-do-not-send="true">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
                      </blockquote>
                      <p><br>
                      </p>
                      <br>
                      <fieldset class="mimeAttachmentHeader"></fieldset>
                      <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org" moz-do-not-send="true">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users" moz-do-not-send="true">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
                    </blockquote>
                  </div>
                  <br>
                  <fieldset class="mimeAttachmentHeader"></fieldset>
                  <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org" moz-do-not-send="true">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users" moz-do-not-send="true">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
                </blockquote>
                <br>
                <fieldset class="mimeAttachmentHeader"></fieldset>
                <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org" moz-do-not-send="true">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users" moz-do-not-send="true">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
              </blockquote>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org" moz-do-not-send="true">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users" moz-do-not-send="true">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
            </blockquote>
            <p><br>
            </p>
            <br>
            <fieldset class="mimeAttachmentHeader"></fieldset>
            <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org" moz-do-not-send="true">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users" moz-do-not-send="true">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
          </blockquote>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>