<div dir="ltr"><br>Dear Dr. Krack,<br>for the Fe-MOF-74 case I tried already FULL_KINETIC but it didn't work, so I neglected that any preconditioner which is assumed to be less robust than FULL_ALL would work. I will test the different ones. <br>I agree that a black-box approach is not generally a good idea for these cases but practically speaking this 2 step protocol that we are using is working well, and to give an idea, out of ca. 300 frameworks (MOFs, COFs and zeolites), less then 10% passed to to the second step (i.e., CG + no outer SCF). So, I'm thinking if I can improve the efficiency even more but I'm already happy with these results!<br><br>Daniele<br><br>Il giorno giovedì 4 ottobre 2018 15:10:30 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="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Dear Daniele</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I am not aware of any control key to stop an SCF run as soon as the electron count becomes unreasonable. It shouldn’t be too difficult, however,
to implement such a control. The use of an outer SCF should converge faster in most cases. Did you try already a different preconditioner like FULL_SINGLE_INVERSE with OT CG and an outer SCF? If such choice does not result in a robust convergence behaviour
then you are dealing with problematic systems which you can hardly run in a black-box manner.</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Best,</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Matthias</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a href="javascript:" target="_blank" gdf-obfuscated-mailto="B1LBWuB2BAAJ" 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="B1LBWuB2BAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>>
<b>On Behalf Of </b>Daniele Ongari<br>
<b>Sent:</b> Donnerstag, 4. Oktober 2018 14:47<br>
<b>To:</b> cp2k <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="B1LBWuB2BAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>><br>
<b>Subject:</b> Re: [CP2K:10804] Re: Problem in the preconditioner when using UKS</span></p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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!</p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"><b><span style="font-family:"Courier New"">$egrep 'outer SCF|Total charge density on r-space grids' diis.out</span></b><span style="font-family:"Courier New""><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</span></p>
</blockquote>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">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</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<p class="MsoNormal"><br>
Il giorno mercoledì 3 ottobre 2018 21:45:20 UTC+2, Matthias Krack 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>
<div>
<p class="MsoNormal"><span lang="DE-CH">Dear Daniele</span></p>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
<p class="MsoNormal"><span lang="DE-CH">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 lang="DE-CH">The OT CG run converged to some state at least.</span></p>
<p class="MsoNormal"><span lang="FR-CH"> </span><span lang="DE-CH"></span></p>
<p class="MsoNormal"><span lang="FR-CH">HTH</span><span lang="DE-CH"></span></p>
<p class="MsoNormal"><span lang="FR-CH"> </span><span lang="DE-CH"></span></p>
<p class="MsoNormal"><span lang="FR-CH">Matthias</span><span lang="DE-CH"></span></p>
<p class="MsoNormal"><span lang="FR-CH"> </span><span lang="DE-CH"></span></p>
<p class="MsoNormal"><b><span lang="DE">Von:</span></b><span lang="DE">
<a>cp...@googlegroups.com</a> <<a>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>cp...@googlegroups.com</a>><br>
<b>Betreff:</b> [CP2K:10799] Re: Problem in the preconditioner when using UKS</span><span lang="DE-CH"></span></p>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
<div>
<p align="center" style="text-align:center"><span lang="DE-CH"><img border="0" width="400" height="323" style="width:4.1666in;min-height:3.3645in" 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"></span></p>
<p class="MsoNormal"><span lang="DE-CH">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:</span></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="DE-CH">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.</span></p>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"><img border="0" width="397" height="400" style="width:4.1354in;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"></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH">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:</span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> HOMO - LUMO gap [eV] : 1.917671</span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> HOMO - LUMO gap [eV] : 0.235602</span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): -1170.045288008604075</span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH">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</span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE-CH"> </span></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span lang="DE-CH">--
<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>cp2k+...@googlegroups.com</a>.<br>
To post to this group, send email to <a>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>.</span></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="B1LBWuB2BAAJ" 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="B1LBWuB2BAAJ" 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>