<div dir="ltr"><div dir="ltr">
<div>
<div>
<div>
<div style="direction:ltr">Hello Giuseppe,</div></div><div style="direction:ltr"><br></div><div>where exactly should I include the switch? </div><div>Thank you!</div>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-4808448308809628114divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> users <<a href="mailto:users-bounces@lists.quantum-espresso.org" target="_blank">users-bounces@lists.quantum-espresso.org</a>> on behalf of Giuseppe Mattioli <<a href="mailto:giuseppe.mattioli@ism.cnr.it" target="_blank">giuseppe.mattioli@ism.cnr.it</a>><br>
<b>Sent:</b> Wednesday, July 1, 2020 12:36:14 PM<br>
<b>To:</b> Quantum ESPRESSO users Forum <<a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a>><br>
<b>Subject:</b> Re: [QE-users] second step of scf in relax calculations didn't converge</font>
<div> </div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div><br>
A simpler but often effective trick: sometimes at (or after) the first <br>
step your system may be trapped in an unlucky configuration that <br>
prevent convergence of the scf iteration. You can either do as Matteo <br>
says, or try (after inspecting the geometry of the second step to be <br>
sure that your system isn't going bananas) to use the switch <br>
scf_must_converge=.false.<br>
Such switch forces the bfgs step even if the wfc is not fully <br>
converged, and it is sensible only if your wfc is not very far from <br>
convergence and in the initial steps of a 'relax' calculation. If you <br>
are lucky, in a few steps you jump out of your "Bermuda triangle" and <br>
further steps converge in a smoother way.<br>
HTH<br>
Giuseppe<br>
<br>
Quoting Coralie Khabbaz <<a href="mailto:khabbaz.coralie@gmail.com" target="_blank">khabbaz.coralie@gmail.com</a>>:<br>
<br>
> Hello Matteo,<br>
><br>
> Thank you so much for your reply. I didn't understand what do you mean by<br>
> initial trust radius? Also, at first my convergence threshold was at 1^-6<br>
> but the first scf step didn't converge in 1000 steps. Then, I fixed it at<br>
> 1^-4 and the first step converged. So do you think I should tighten it? I<br>
> didn't try starting a new scf from the new iconic positions because I don't<br>
> know how to.<br>
><br>
> This is my input file:<br>
><br>
> &CONTROL<br>
> calculation = "relax"<br>
> forc_conv_thr = 1.00000e-03<br>
> max_seconds = 4.32000e+05<br>
> nstep = 300<br>
> pseudo_dir = "/home/coralee/projects/def-jkopysci/coralee/.pseudopot"<br>
> /<br>
><br>
> &SYSTEM<br>
> a = 8.32716e+00<br>
> angle1(1) = 0.00000e+00<br>
> angle1(2) = 0.00000e+00<br>
> angle2(1) = 0.00000e+00<br>
> angle2(2) = 0.00000e+00<br>
> b = 8.98689e+00<br>
> c = 2.52767e+01<br>
> cosab = 6.12323e-17<br>
> cosac = 6.12323e-17<br>
> cosbc = -1.85547e-01<br>
> degauss = 2.00000e-02<br>
> ecutrho = 4.75221e+02<br>
> ecutwfc = 5.03902e+01<br>
> ibrav = 14<br>
> nat = 48<br>
> nbnd = 490<br>
> nspin = 2<br>
> ntyp = 2<br>
> occupations = "smearing"<br>
> smearing = "gaussian"<br>
> starting_magnetization(1) = 2.00000e-01<br>
> starting_magnetization(2) = 2.00000e-01<br>
> /<br>
><br>
> &ELECTRONS<br>
> conv_thr = 1.00000e-04<br>
> diagonalization = "david"<br>
> electron_maxstep = 1000<br>
> mixing_beta = 1.00000e-01<br>
> mixing_mode = "local-TF"<br>
> startingpot = "atomic"<br>
> startingwfc = "atomic+random"<br>
> /<br>
><br>
> &IONS<br>
> ion_dynamics = "bfgs"<br>
> /<br>
><br>
> &CELL<br>
> /<br>
><br>
> K_POINTS {automatic}<br>
> 2 2 1 0 0 0<br>
><br>
> ATOMIC_SPECIES<br>
> N 14.00674 N.pbe-n-kjpaw_psl.1.0.0.UPF<br>
> W 183.84000 W.pbe-spn-kjpaw_psl.1.0.0.UPF<br>
><br>
> ATOMIC_POSITIONS {angstrom}<br>
> N 3.207882 2.672960 14.837784<br>
> N 7.371462 2.672960 14.837784<br>
> N 3.207882 -1.820484 14.837784<br>
> N 7.371462 -1.820484 14.837784<br>
> W 3.207882 4.882815 14.748648<br>
> W 7.371462 4.882815 14.748648<br>
> W 3.207882 0.389371 14.748648<br>
> W 7.371462 0.389371 14.748648<br>
> N 1.126093 5.365612 14.468179<br>
> N 5.289672 5.365612 14.468179<br>
> N 1.126093 0.872168 14.468179<br>
> N 5.289672 0.872168 14.468179<br>
> W 1.126093 3.038143 14.415413<br>
> W 5.289672 3.038143 14.415413<br>
> W 1.126093 -1.455301 14.415413<br>
> W 5.289672 -1.455301 14.415413<br>
> N 3.207882 5.336567 12.630078<br>
> N 7.371462 5.336567 12.630078<br>
> N 3.207882 0.843123 12.630078<br>
> N 7.371462 0.843123 12.630078<br>
> W 3.207882 3.052977 12.540942<br>
> W 7.371462 3.052977 12.540942<br>
> W 3.207882 -1.440467 12.540942<br>
> W 7.371462 -1.440467 12.540942<br>
> N 1.126093 3.535775 12.260473<br>
> N 5.289672 3.535775 12.260473<br>
> N 1.126093 -0.957669 12.260473<br>
> N 5.289672 -0.957669 12.260473<br>
> W 1.126093 5.701750 12.207706<br>
> W 5.289672 5.701750 12.207706<br>
> W 1.126093 1.208305 12.207706<br>
> W 5.289672 1.208305 12.207706<br>
> N 3.207882 3.506729 10.422372 0 0 0<br>
> N 7.371462 3.506729 10.422372 0 0 0<br>
> N 3.207882 -0.986715 10.422372 0 0 0<br>
> N 7.371462 -0.986715 10.422372 0 0 0<br>
> W 3.207882 5.716584 10.333236 0 0 0<br>
> W 7.371462 5.716584 10.333236 0 0 0<br>
> W 3.207882 1.223140 10.333236 0 0 0<br>
> W 7.371462 1.223140 10.333236 0 0 0<br>
> N 1.126093 6.199382 10.052766 0 0 0<br>
> N 5.289672 6.199382 10.052766 0 0 0<br>
> N 1.126093 1.705938 10.052766 0 0 0<br>
> N 5.289672 1.705938 10.052766 0 0 0<br>
> W 1.126093 3.871912 10.000000 0 0 0<br>
> W 5.289672 3.871912 10.000000 0 0 0<br>
> W 1.126093 -0.621532 10.000000 0 0 0<br>
> W 5.289672 -0.621532 10.000000 0 0 0<br>
><br>
> On Wed, 1 Jul 2020 at 10:48, Matteo Cococcioni <<a href="mailto:matteo.cococcioni@unipv.it" target="_blank">matteo.cococcioni@unipv.it</a>><br>
> wrote:<br>
><br>
>> Hello,<br>
>><br>
>> it's very difficult to guess what is wrong in your input if you don't show<br>
>> it.<br>
>> In any case, if you have converged forces and stresses on cut-off(s) and<br>
>> number of k-points/smearing, it might be a good idea to tighten your<br>
>> convergence threshold and reduce the initial trust radius. Maybe your<br>
>> forces and stresses are so loosely converged and your ionic/cell step so<br>
>> big that the system moves to a configuration that is difficult to converge.<br>
>> Or maybe your starting lattice parameter/ionic configuration are very far<br>
>> from equilibrium and the system tries to make a big jump at the beginning.<br>
>> Also, have you tried to start a new scf from the new ionic position?<br>
>><br>
>> Please add your affiliation<br>
>><br>
>> Regards,<br>
>><br>
>> Matteo<br>
>><br>
>> Il giorno mer 1 lug 2020 alle ore 13:45 Coralie Khabbaz <<br>
>> <a href="mailto:khabbaz.coralie@gmail.com" target="_blank">khabbaz.coralie@gmail.com</a>> ha scritto:<br>
>><br>
>>> Hello,<br>
>>><br>
>>> I am doing a relax calculation on my WN (48 atoms) slab. The first step<br>
>>> of scf calculations converged but then the second step didn't converge in<br>
>>> 1000 steps (which was my limit). So, the calculations stopped, and I got<br>
>>> many files (data-file.xml, charge-density.dat, paw.txt,<br>
>>> spin-polarization.dat...) but no output file. If my first scf step<br>
>>> converged doesn't that mean that all of my other scf steps should converge<br>
>>> but need more steps? Or is there a problem in my input file?<br>
>>> _______________________________________________<br>
>>> Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank">www.max-centre.eu/quantum-espresso</a>)<br>
>>> users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
>>> <a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> Matteo Cococcioni<br>
>> Department of Physics<br>
>> University of Pavia<br>
>> Via Bassi 6, I-27100 Pavia, Italy<br>
>> tel +39-0382-987485<br>
>> e-mail <a href="mailto:matteo.cococcioni@unipv.it" target="_blank">matteo.cococcioni@unipv.it</a> <<a href="mailto:lucio.andreani@unipv.it" target="_blank">lucio.andreani@unipv.it</a>><br>
>> _______________________________________________<br>
>> Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank">www.max-centre.eu/quantum-espresso</a>)<br>
>> users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
>> <a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a><br>
<br>
<br>
<br>
GIUSEPPE MATTIOLI<br>
CNR - ISTITUTO DI STRUTTURA DELLA MATERIA<br>
Via Salaria Km 29,300 - C.P. 10<br>
I-00015 - Monterotondo Scalo (RM)<br>
Mob (*preferred*) +39 373 7305625<br>
Tel + 39 06 90672342 - Fax +39 06 90672316<br>
E-mail: <<a href="mailto:giuseppe.mattioli@ism.cnr.it" target="_blank">giuseppe.mattioli@ism.cnr.it</a>><br>
<br>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a><br>
</div>
</span></font></div>
</div>
</div></div>