<div dir="ltr">Thank you a lot!<br>This was a very good hint. Indeed, it is clear from the "Total charge density on r-space grids" that something is going weird with the count of electron as soon as the energy starts to diverge!<br><br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font face="courier new, monospace" style=""><b>$egrep 'outer SCF|Total charge density on r-space grids' diis.out</b><br>diis.out: Total charge density on r-space grids: 0.0000001146<br>diis.out: outer SCF iter = 1 RMS gradient = 0.47E-04 energy = -1301.1851926636<br>diis.out: Total charge density on r-space grids: 0.0000001146<br>diis.out: outer SCF iter = 2 RMS gradient = 0.42E-04 energy = -1301.2195780393<br>diis.out: Total charge density on r-space grids: 0.0000001047<br>diis.out: outer SCF iter = 3 RMS gradient = 0.14E-05 energy = -1301.2275937198<br>diis.out: Total charge density on r-space grids: 0.0003332641<br>diis.out: outer SCF iter = 4 RMS gradient = 0.62E-05 energy = -1301.2754195817<br>diis.out: Total charge density on r-space grids: -0.0424028684<br>diis.out: outer SCF iter = 5 RMS gradient = 0.96E-04 energy = -1318.9753098223<br>diis.out: Total charge density on r-space grids: 0.5522536311<br>diis.out: outer SCF iter = 6 RMS gradient = 0.13E-03 energy = -1317.2906799313<br>diis.out: Total charge density on r-space grids: 3.4918015156<br>diis.out: outer SCF iter = 7 RMS gradient = 0.52E-03 energy = -1315.3866686940<br>diis.out: Total charge density on r-space grids: 4.3723629910<br>diis.out: outer SCF iter = 8 RMS gradient = 0.97E-03 energy = -1298.6196710054<br>diis.out: Total charge density on r-space grids: 9.1128313578<br>diis.out: outer SCF iter = 9 RMS gradient = 0.20E-02 energy = -1284.6336624946<br>diis.out: Total charge density on r-space grids: 8.4010321552<br>diis.out: outer SCF iter = 10 RMS gradient = 0.20E-02 energy = -1278.9516795867<br>diis.out: Total charge density on r-space grids: 7.2155551466<br>diis.out: outer SCF iter = 11 RMS gradient = 0.20E-02 energy = -1285.4339788964<br>diis.out: outer SCF loop FAILED to converge after 11 iterations or 550 steps</font></blockquote><div><br></div><div>I'm now wondering: is there a way to stop CP2K as soon as the "Total charge density on r-space grids" exceeds a threshold (let's say 1.0) to avoid wasting time and switch to the CG algorithm without outer SCF?<br>I'm using this 2 step protocol for high-throughput DFT calculations, therefore it would be helpful not to waste time!<br><br>Regards,<br>Daniele</div><div><br></div><br>Il giorno mercoledì 3 ottobre 2018 21:45:20 UTC+2, Matthias Krack ha scritto:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<div lang="DE-CH" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span>Dear Daniele</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>You should take note of the electron count in the OT DIIS output and ask yourself, if the corresponding energy has any meaning.
</span></p>
<p class="MsoNormal"><span>The OT CG run converged to some state at least.</span><span lang="FR-CH"></span></p>
<p class="MsoNormal"><span lang="FR-CH"> </span></p>
<p class="MsoNormal"><span lang="FR-CH">HTH</span></p>
<p class="MsoNormal"><span lang="FR-CH"> </span></p>
<p class="MsoNormal"><span lang="FR-CH">Matthias</span></p>
<p class="MsoNormal"><span lang="FR-CH"> </span></p>
<p class="MsoNormal"><b><span lang="DE">Von:</span></b><span lang="DE"> <a href="javascript:" target="_blank" gdf-obfuscated-mailto="BAPgf9c9BAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a> <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="BAPgf9c9BAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>>
<b>Im Auftrag von </b>Daniele Ongari<br>
<b>Gesendet:</b> Mittwoch, 3. Oktober 2018 19:47<br>
<b>An:</b> cp2k <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="BAPgf9c9BAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>><br>
<b>Betreff:</b> [CP2K:10799] Re: Problem in the preconditioner when using UKS</span></p>
<p class="MsoNormal"> </p>
<div>
<p align="center" style="text-align:center"><img width="400" height="323" style="width:4.1666in;min-height:3.368in" src="https://groups.google.com/group/cp2k/attach/43dd77fe00304/image002.png?part=0.1&view=1&authuser=0" alt="Screenshot from 2018-10-03 19-42-55.png"></p>
<p class="MsoNormal">Hi,<br>
here I come with a similar problem for Co-MOF-74 using different settings.<br>
In the legend of the figure:<br>
"diis" is using OT DIIS with 50 inner and 10 outer SCF cycles<br>
"cg" is using OT CG with 2000 inner and no outer SCF cycles<br>
<br>
<br>
I think the problem is related to the bandgap going close to zero and making the preconditioner to diverge, but this time the energy assumes even lower energies than the final ones. <br>
Does it makes sense to have a lower energy being DFT not strictly variational, and this should be seen as a merely mathematical mess?<br>
<br>
The calculation is converging when I run the OT CG minimization without outer steps: can I consider the final result of this calculation as reliable?<br>
<br>
Thanks<br>
<br>
Daniele<br>
<br>
<br>
<br>
<br>
Il giorno mercoledì 19 settembre 2018 12:50:34 UTC+2, Daniele Ongari ha scritto:</p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Dear CP2K developers, <br>
I want to report a serious problem with the preconditioner when computing the energy of Fe-MOF-74 with UKS settings.<br>
Long story short the energy goes down, it is close to convergence but then, after recomputing the preconditioner in the outer step it starts to diverge: see the image.</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"><img width="397" height="400" style="width:4.1319in;min-height:4.1666in" src="https://groups.google.com/group/cp2k/attach/8c770f8be29e2/image.png?part=0.4&view=1&authuser=0" alt="image.png"></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Now, I attached the input and the output, but I already tried very different settings:<br>
-smearing<br>
-diagonalization without smearing<br>
-different BS<br>
-UKS false (converged, but to a higher energy, forcing the closed shell)<br>
- starting magnetization on metals<br>
- CG minimizer<br>
- lower multiplicity<br>
- 2x and 3x replicated unit cell in the shortest dimension<br>
- lowering ENERGY_GAP to 0.001<br>
These calculation ALL failed (I made 16 attempts in total, changing settings!).<br>
<br>
And at the end the only one working (the 17th attempt, ironically the unlucky number for Italians!) was to use CG minimizer with
<u>no outer SCF</u>, hence not recomputing the preconditioner. It converged after ~600 inner steps, to:</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<p class="MsoNormal"> HOMO - LUMO gap [eV] : 1.917671</p>
</div>
<div>
<p class="MsoNormal"> HOMO - LUMO gap [eV] : 0.235602</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): -1170.045288008604075</p>
</div>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Please let me know what was the problem, if it is a known issue of the preconditioner and how to circumvent it: for the moment I'm using no outer steps to have a robust convergence, but I know that this may cause the convergence to a local
miniimum!<br>
<br>
Thanks a lot!<br>
<br>
Daniele <br>
PhD candidate, LSMO, EPFL Sion</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal">-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="BAPgf9c9BAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp2k+uns...@googlegroups.<wbr>com</a>.<br>
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="BAPgf9c9BAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>.<br>
Visit this group at <a href="https://groups.google.com/group/cp2k" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/group/cp2k';return true;" onclick="this.href='https://groups.google.com/group/cp2k';return true;">https://groups.google.com/<wbr>group/cp2k</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a>.</p>
</div>
</div>
</blockquote></div>