<p>
        Hello <span style="white-space:normal;">Khabbaz,</span> 
</p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px;">
        <p>
                As I am just a beginner of QE, I can only share my limited, personal experience with you. Note that convergence is a quite general problem that maybe everyone will confront with, I recommend you to look up QE-forum: <a href="https://www.mail-archive.com/users@lists.quantum-espresso.org/">https://www.mail-archive.com/users@lists.quantum-espresso.org/</a>.
        </p>
        <p>
                1. spin-polarized calculation is not easy to converge as non-polarized ones, so if your structure is just built without any primary optimization, I suggest you perform non-polarized optimization first, although it may be of little help on improving convergence.
        </p>
        <p>
                2. you can try different mixing_mode. In general, as suggested in QE forum, local-TF may work well for heterogeneous system, but that is not always true. Sometimes plain mode (also known as Broyden mixing) works better than local-TF. Also, the higher vacuum region you add, the harder will your system to converge.
        </p>
        <p>
                3. you can also try different smearing, although gaussian smearing is default and may be the first recommended, sometimes fd smearing can help your system converge faster, but that all depends.
        </p>
        <p>
                4. you may want to decrease mixing_beta, or modify mixing_dim, to tune the updating rate of density matrix.
        </p>
        <p>
                5. set diagonalization = 'cg' will be of help but will be slower than Davidson.
        </p>
        <p>
                6. note that your system has N element. I remember there was a discussion about one certain (old) kind of nitrogen pseudopotential cause convergence failure, maybe you can test different kinds of pseudopotential.
        </p>
</blockquote>
<p>
        <br>
</p>
<p>
        Best regards!
</p>
<p>
</p>
<p>
        Yike Huang, PhD candidate.
</p>
<p>
        Dalian Institute of Chemical Physics, CAS, China.
</p>
<p>
        <br>
</p>
<blockquote name="replyContent" class="ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0;">
        -----原始邮件-----<br>
<b>发件人:</b><span id="rc_from">"Coralie Khabbaz" <khabbaz.coralie@gmail.com></span><br>
<b>发送时间:</b><span id="rc_senttime">2020-06-13 01:13:33 (星期六)</span><br>
<b>收件人:</b> users@lists.quantum-espresso.org<br>
<b>抄送:</b> <br>
<b>主题:</b> [QE-users] SCF calculation with no convergence<br>
<br>
        <div dir="ltr">
                <div dir="ltr">
                        Hello,
                        <div>
                                <br>
                        </div>
                        <div>
                                I am doing an scf calculation on a tungsten nitride (WN) slab (catalyst), with a methane molecule 5 Angstrom away from the surface. The energy values are not converging, even after 533 iterations. The energy values are very negative, and then they increase to a positive value then decrease a lot again. Before building the supercell, I had a WN unit cell with 433 K-points. Then, I built the super cell by using a scaling of 333 and miller indices of 100. I tried using K points of 111 and 222 for my super cell, but the calculations didn't converge for both. 
                        </div>
                        <div>
                                <br>
                        </div>
                        <div>
                                This is the input file I am using:
                        </div>
                        <div>
                                <div>
                                        <br>
                                </div>
                                <div>
                                        &CONTROL
                                </div>
                                <div>
                                            calculation  = "scf"
                                </div>
                                <div>
                                            max_seconds  =  1.72800e+05
                                </div>
                                <div>
                                            pseudo_dir   = "/home/coralee/projects/def-jkopysci/coralee/.pseudopot"
                                </div>
                                <div>
                                            restart_mode = "from_scratch"
                                </div>
                                <div>
                                        /
                                </div>
                                <div>
                                        <br>
                                </div>
                                <div>
                                        &SYSTEM
                                </div>
                                <div>
                                            a                         =  1.24907e+01
                                </div>
                                <div>
                                            angle1(1)                 =  0.00000e+00
                                </div>
                                <div>
                                            angle1(2)                 =  0.00000e+00
                                </div>
                                <div>
                                            angle2(1)                 =  0.00000e+00
                                </div>
                                <div>
                                            angle2(2)                 =  0.00000e+00
                                </div>
                                <div>
                                            b                         =  1.34803e+01
                                </div>
                                <div>
                                            c                         =  2.52767e+01
                                </div>
                                <div>
                                            cosab                     =  6.12323e-17
                                </div>
                                <div>
                                            cosac                     =  6.12323e-17
                                </div>
                                <div>
                                            cosbc                     = -1.85547e-01
                                </div>
                                <div>
                                            degauss                   =  1.00000e-02
                                </div>
                                <div>
                                            ecutrho                   =  2.70000e+02
                                </div>
                                <div>
                                            ecutwfc                   =  3.00000e+01
                                </div>
                                <div>
                                            ibrav                     = 14
                                </div>
                                <div>
                                            nat                       = 113
                                </div>
                                <div>
                                            nspin                     = 2
                                </div>
                                <div>
                                            ntyp                      = 4
                                </div>
                                <div>
                                            occupations               = "smearing"
                                </div>
                                <div>
                                            smearing                  = "gaussian"
                                </div>
                                <div>
                                            starting_magnetization(1) =  2.00000e-01
                                </div>
                                <div>
                                            starting_magnetization(2) =  6.00000e-01
                                </div>
                                <div>
                                            starting_magnetization(3) =  0.00000e+00
                                </div>
                                <div>
                                            starting_magnetization(4) =  0.00000e+00
                                </div>
                                <div>
                                        /
                                </div>
                                <div>
                                        <br>
                                </div>
                                <div>
                                        &ELECTRONS
                                </div>
                                <div>
                                            conv_thr         =  1.00000e-06
                                </div>
                                <div>
                                            diagonalization  = "david"
                                </div>
                                <div>
                                            electron_maxstep = 528
                                </div>
                                <div>
                                            mixing_beta      =  4.00000e-01
                                </div>
                                <div>
                                            startingpot      = "atomic"
                                </div>
                                <div>
                                            startingwfc      = "atomic+random"
                                </div>
                                <div>
                                        /
                                </div>
                                <div>
                                        <br>
                                </div>
                                <div>
                                        K_POINTS {automatic}
                                </div>
                                <div>
                                         2  2  2  0 0 0
                                </div>
                                <div>
                                        <br>
                                </div>
                                <div>
                                        ATOMIC_SPECIES
                                </div>
                                <div>
                                        N      14.00674  N.pbe-n-rrkjus_psl.1.0.0.UPF
                                </div>
                                <div>
                                        W     183.84000  W.pbe-spn-rrkjus_psl.1.0.0.UPF
                                </div>
                                <div>
                                        C      12.01070  C.pbe-n-rrkjus_psl.1.0.0.UPF
                                </div>
                                <div>
                                        H       1.00794  H.pbe-rrkjus_psl.1.0.0.UPF
                                </div>
                                <div>
                                        <br>
                                </div>
                                <div>
                                        ATOMIC_POSITIONS {angstrom}
                                </div>
                                <div>
                                        N       2.481849   0.418242  14.837784
                                </div>
                                <div>
                                        N       6.645429   0.418242  14.837784
                                </div>
                                <div>
                                        N      10.809008   0.418242  14.837784
                                </div>
                                <div>
                                        N       2.481849   4.911686  14.837784
                                </div>
                                <div>
                                        N       6.645429   4.911686  14.837784
                                </div>
                                <div>
                                        N      10.809008   4.911686  14.837784
                                </div>
                                <div>
                                        N       2.481849   9.405131  14.837784
                                </div>
                                <div>
                                        N       6.645429   9.405131  14.837784
                                </div>
                                <div>
                                        N      10.809008   9.405131  14.837784
                                </div>
                                <div>
                                        W       2.481849   2.628097  14.748648
                                </div>
                                <div>
                                        W       6.645429   2.628097  14.748648
                                </div>
                                <div>
                                        W      10.809008   2.628097  14.748648
                                </div>
                                <div>
                                        W       2.481849   7.121541  14.748648
                                </div>
                                <div>
                                        W       6.645429   7.121541  14.748648
                                </div>
                                <div>
                                        W      10.809008   7.121541  14.748648
                                </div>
                                <div>
                                        W       2.481849  -1.865347  14.748648
                                </div>
                                <div>
                                        W       6.645429  -1.865347  14.748648
                                </div>
                                <div>
                                        W      10.809008  -1.865347  14.748648
                                </div>
                                <div>
                                        N       0.400059   3.110895  14.468179
                                </div>
                                <div>
                                        N       4.563639   3.110895  14.468179
                                </div>
                                <div>
                                        N       8.727218   3.110895  14.468179
                                </div>
                                <div>
                                        N       0.400059   7.604339  14.468179
                                </div>
                                <div>
                                        N       4.563639   7.604339  14.468179
                                </div>
                                <div>
                                        N       8.727218   7.604339  14.468179
                                </div>
                                <div>
                                        N       0.400059  -1.382549  14.468179
                                </div>
                                <div>
                                        N       4.563639  -1.382549  14.468179
                                </div>
                                <div>
                                        N       8.727218  -1.382549  14.468179
                                </div>
                                <div>
                                        W       0.400059   0.783425  14.415413
                                </div>
                                <div>
                                        W       4.563639   0.783425  14.415413
                                </div>
                                <div>
                                        W       8.727218   0.783425  14.415413
                                </div>
                                <div>
                                        W       0.400059   5.276869  14.415413
                                </div>
                                <div>
                                        W       4.563639   5.276869  14.415413
                                </div>
                                <div>
                                        W       8.727218   5.276869  14.415413
                                </div>
                                <div>
                                        W       0.400059   9.770314  14.415413
                                </div>
                                <div>
                                        W       4.563639   9.770314  14.415413
                                </div>
                                <div>
                                        W       8.727218   9.770314  14.415413
                                </div>
                                <div>
                                        N       2.481849   3.081849  12.630078  0 0 0
                                </div>
                                <div>
                                        N       6.645429   3.081849  12.630078  0 0 0
                                </div>
                                <div>
                                        N      10.809008   3.081849  12.630078  0 0 0
                                </div>
                                <div>
                                        N       2.481849   7.575293  12.630078  0 0 0
                                </div>
                                <div>
                                        N       6.645429   7.575293  12.630078  0 0 0
                                </div>
                                <div>
                                        N      10.809008   7.575293  12.630078  0 0 0
                                </div>
                                <div>
                                        N       2.481849  -1.411595  12.630078  0 0 0
                                </div>
                                <div>
                                        N       6.645429  -1.411595  12.630078  0 0 0
                                </div>
                                <div>
                                        N      10.809008  -1.411595  12.630078  0 0 0
                                </div>
                                <div>
                                        W       2.481849   0.798260  12.540942  0 0 0
                                </div>
                                <div>
                                        W       6.645429   0.798260  12.540942  0 0 0
                                </div>
                                <div>
                                        W      10.809008   0.798260  12.540942  0 0 0
                                </div>
                                <div>
                                        W       2.481849   5.291704  12.540942  0 0 0
                                </div>
                                <div>
                                        W       6.645429   5.291704  12.540942  0 0 0
                                </div>
                                <div>
                                        W      10.809008   5.291704  12.540942  0 0 0
                                </div>
                                <div>
                                        W       2.481849   9.785148  12.540942  0 0 0
                                </div>
                                <div>
                                        W       6.645429   9.785148  12.540942  0 0 0
                                </div>
                                <div>
                                        W      10.809008   9.785148  12.540942  0 0 0
                                </div>
                                <div>
                                        N       0.400059   1.281057  12.260473  0 0 0
                                </div>
                                <div>
                                        N       4.563639   1.281057  12.260473  0 0 0
                                </div>
                                <div>
                                        N       8.727218   1.281057  12.260473  0 0 0
                                </div>
                                <div>
                                        N       0.400059   5.774502  12.260473  0 0 0
                                </div>
                                <div>
                                        N       4.563639   5.774502  12.260473  0 0 0
                                </div>
                                <div>
                                        N       8.727218   5.774502  12.260473  0 0 0
                                </div>
                                <div>
                                        N       0.400059  10.267946  12.260473  0 0 0
                                </div>
                                <div>
                                        N       4.563639  10.267946  12.260473  0 0 0
                                </div>
                                <div>
                                        N       8.727218  10.267946  12.260473  0 0 0
                                </div>
                                <div>
                                        W       0.400059   3.447032  12.207706  0 0 0
                                </div>
                                <div>
                                        W       4.563639   3.447032  12.207706  0 0 0
                                </div>
                                <div>
                                        W       8.727218   3.447032  12.207706  0 0 0
                                </div>
                                <div>
                                        W       0.400059   7.940476  12.207706  0 0 0
                                </div>
                                <div>
                                        W       4.563639   7.940476  12.207706  0 0 0
                                </div>
                                <div>
                                        W       8.727218   7.940476  12.207706  0 0 0
                                </div>
                                <div>
                                        W       0.400059  -1.046412  12.207706  0 0 0
                                </div>
                                <div>
                                        W       4.563639  -1.046412  12.207706  0 0 0
                                </div>
                                <div>
                                        W       8.727218  -1.046412  12.207706  0 0 0
                                </div>
                                <div>
                                        N       2.481849   1.252012  10.422372  0 0 0
                                </div>
                                <div>
                                        N       6.645429   1.252012  10.422372  0 0 0
                                </div>
                                <div>
                                        N      10.809008   1.252012  10.422372  0 0 0
                                </div>
                                <div>
                                        N       2.481849   5.745456  10.422372  0 0 0
                                </div>
                                <div>
                                        N       6.645429   5.745456  10.422372  0 0 0
                                </div>
                                <div>
                                        N      10.809008   5.745456  10.422372  0 0 0
                                </div>
                                <div>
                                        N       2.481849  10.238900  10.422372  0 0 0
                                </div>
                                <div>
                                        N       6.645429  10.238900  10.422372  0 0 0
                                </div>
                                <div>
                                        N      10.809008  10.238900  10.422372  0 0 0
                                </div>
                                <div>
                                        W       2.481849   3.461867  10.333236  0 0 0
                                </div>
                                <div>
                                        W       6.645429   3.461867  10.333236  0 0 0
                                </div>
                                <div>
                                        W      10.809008   3.461867  10.333236  0 0 0
                                </div>
                                <div>
                                        W       2.481849   7.955311  10.333236  0 0 0
                                </div>
                                <div>
                                        W       6.645429   7.955311  10.333236  0 0 0
                                </div>
                                <div>
                                        W      10.809008   7.955311  10.333236  0 0 0
                                </div>
                                <div>
                                        W       2.481849  -1.031577  10.333236  0 0 0
                                </div>
                                <div>
                                        W       6.645429  -1.031577  10.333236  0 0 0
                                </div>
                                <div>
                                        W      10.809008  -1.031577  10.333236  0 0 0
                                </div>
                                <div>
                                        N       0.400059   3.944664  10.052766  0 0 0
                                </div>
                                <div>
                                        N       4.563639   3.944664  10.052766  0 0 0
                                </div>
                                <div>
                                        N       8.727218   3.944664  10.052766  0 0 0
                                </div>
                                <div>
                                        N       0.400059   8.438108  10.052766  0 0 0
                                </div>
                                <div>
                                        N       4.563639   8.438108  10.052766  0 0 0
                                </div>
                                <div>
                                        N       8.727218   8.438108  10.052766  0 0 0
                                </div>
                                <div>
                                        N       0.400059  -0.548780  10.052766  0 0 0
                                </div>
                                <div>
                                        N       4.563639  -0.548780  10.052766  0 0 0
                                </div>
                                <div>
                                        N       8.727218  -0.548780  10.052766  0 0 0
                                </div>
                                <div>
                                        W       0.400059   1.617195  10.000000  0 0 0
                                </div>
                                <div>
                                        W       4.563639   1.617195  10.000000  0 0 0
                                </div>
                                <div>
                                        W       8.727218   1.617195  10.000000  0 0 0
                                </div>
                                <div>
                                        W       0.400059   6.110639  10.000000  0 0 0
                                </div>
                                <div>
                                        W       4.563639   6.110639  10.000000  0 0 0
                                </div>
                                <div>
                                        W       8.727218   6.110639  10.000000  0 0 0
                                </div>
                                <div>
                                        W       0.400059  10.604083  10.000000  0 0 0
                                </div>
                                <div>
                                        W       4.563639  10.604083  10.000000  0 0 0
                                </div>
                                <div>
                                        W       8.727218  10.604083  10.000000  0 0 0
                                </div>
                                <div>
                                        C      10.809008   2.628097  19.750000
                                </div>
                                <div>
                                        H      10.177000   1.997000  20.383000
                                </div>
                                <div>
                                        H      11.443000   1.997000  19.117000
                                </div>
                                <div>
                                        H      10.177000   3.263000  19.117000
                                </div>
                                <div>
                                        H      11.443000   3.263000  20.383000
                                </div>
                                <div>
                                        <br>
                                </div>
                                <div>
                                        <br>
                                </div>
                        </div>
                </div>
        </div>
</blockquote>
<br>
<br>
<br>