<div dir="ltr"><div>Hi,</div><div><br></div><div>You're combining a very large cutoff (1200 Ry) with a small rel_cutoff (40 Ry), which creates an unbalanced grid. Large cutoffs require a larger rel_cutoff so the added points aren't just pushed to the coarsest grids.<br></div><div><br></div><div><div style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;" class="prettyprint"><code class="prettyprint"><div class="subprettyprint"><span style="color: #066;" class="styled-by-prettify">1200</span><span style="color: #660;" class="styled-by-prettify">/</span><span style="color: #066;" class="styled-by-prettify">120</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">89892</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">600.00</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #800;" class="styled-by-prettify"># lots of points on fine grid, expensive</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">2</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">63191</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">200.00</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">3</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">42699</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">           </span><span style="color: #066;" class="styled-by-prettify">66.67</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">4</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">17703</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">           </span><span style="color: #066;" class="styled-by-prettify">22.22</span><span style="color: #000;" class="styled-by-prettify"><br> total gridlevel count  </span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">         </span><span style="color: #066;" class="styled-by-prettify">213485</span><span style="color: #000;" class="styled-by-prettify"><br><br></span><span style="color: #066;" class="styled-by-prettify">800</span><span style="color: #660;" class="styled-by-prettify">/</span><span style="color: #066;" class="styled-by-prettify">50</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">76679</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">400.00</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">2</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">57951</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">133.33</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">3</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">45900</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">           </span><span style="color: #066;" class="styled-by-prettify">44.44</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">4</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">32955</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">           </span><span style="color: #066;" class="styled-by-prettify">14.81</span><span style="color: #000;" class="styled-by-prettify"><br> total gridlevel count  </span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">         </span><span style="color: #066;" class="styled-by-prettify">213485</span><span style="color: #000;" class="styled-by-prettify"><br><br></span><span style="color: #066;" class="styled-by-prettify">1200</span><span style="color: #660;" class="styled-by-prettify">/</span><span style="color: #066;" class="styled-by-prettify">40</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">33765</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">600.00</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #800;" class="styled-by-prettify"># too few points on fine grid</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">2</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">56127</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">200.00</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">3</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">63191</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">           </span><span style="color: #066;" class="styled-by-prettify">66.67</span><span style="color: #000;" class="styled-by-prettify"><br> count </span><span style="color: #008;" class="styled-by-prettify">for</span><span style="color: #000;" class="styled-by-prettify"> grid        </span><span style="color: #066;" class="styled-by-prettify">4</span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">          </span><span style="color: #066;" class="styled-by-prettify">60402</span><span style="color: #000;" class="styled-by-prettify">          cutoff </span><span style="color: #660;" class="styled-by-prettify">[</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">u</span><span style="color: #660;" class="styled-by-prettify">.]</span><span style="color: #000;" class="styled-by-prettify">           </span><span style="color: #066;" class="styled-by-prettify">22.22</span><span style="color: #000;" class="styled-by-prettify"><br> total gridlevel count  </span><span style="color: #660;" class="styled-by-prettify">:</span><span style="color: #000;" class="styled-by-prettify">         </span><span style="color: #066;" class="styled-by-prettify">213485</span><span style="color: #000;" class="styled-by-prettify"><br></span></div></code></div><br></div><div>Simply switching to 800 Ry / 50 Ry (cutoff / rel_cutoff) or keeping your initial 1200 Ry but using a rel_cutoff of 120 Ry leads to rapid convergence.</div><div><br></div><div>-T<br></div><br>On Monday, January 27, 2020 at 2:27:42 PM UTC-4, Chris Ahart wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Dear Juerg,<div><br></div><div>Thanks for your response.</div><div><br></div><div>The 8x8x8 cell does indeed converge, giving an IP of 288.9 kcal in good agreement with the G12IP dataset SCAN value of 287.9 kcal (<span>J. G. Brandenburg, J. E. Bates, J. Sun and J. P. Perdew, </span><i>Phys. Rev. B</i><span>, 2016, </span><b>94</b><span>, 17–19.</span>).  Reducing the cell dimensions is however problematic for other systems (e.g NH3, Cl2), as a cell small enough to give non-diverging SCF then has non-zero density at the cell edges. Increasing the multigrid cutoff appears to make this problem worse.<br></div><div><br></div><div>I have also done some condensed phase tests on bulk iron oxides for polaron studies. Perhaps without any vacuum where the density becomes small, the charged state converges easily. However the resultant potential energy surface is very flat, with localised and delocalised polarons being energy degenerate (HSE and other methods predict small polarons). At least one other group has attempted to use SCAN with CP2K, and they found that SCAN performs even worse than LDA for describing solid gallium (<span>R. C. Remsing, J. Sun, U. V. Waghmare and M. L. Klein, </span><i>Mol. Phys.</i><span>, 2018, </span><b>116</b><span>, 3372–3379). </span>Combined with the knowledge that small charged systems can't converge for reasonable cell sizes, it looks like SCAN doesn't work very well with CP2K. </div><div><br></div><div>Would you have any further advice, or does this seem like a methodological problem with SCAN and CP2K?</div><div><br></div><div>Regards,</div><div>Chris</div><div><br></div><div>On Monday, 27 January 2020 13:17:16 UTC, jgh  wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
<br>
<br>I couldn't find a clear bug for this. My current best guess is
<br>that the problem is related to the numerical instabilities
<br>of the SCAN functional. 
<br>Molecules in large boxes have many grid points with small and 
<br>'random' density/gradient values that cause problems.
<br>Your special case works for me in a 8x8x8 box (instead of 10x10x10)!
<br>
<br>regards
<br>
<br>Juerg Hutter 
<br>------------------------------<wbr>------------------------------<wbr>--
<br>Juerg Hutter                         Phone : ++41 44 635 4491
<br>Institut für Chemie C                FAX   : ++41 44 635 6838
<br>Universität Zürich                   E-mail: <a rel="nofollow">h...@chem.uzh.ch</a>
<br>Winterthurerstrasse 190
<br>CH-8057 Zürich, Switzerland
<br>------------------------------<wbr>------------------------------<wbr>---
<br>
<br>-----<a rel="nofollow">c...@googlegroups.com</a> wrote: -----
<br>To: "cp2k" <<a rel="nofollow">c...@googlegroups.com</a>>
<br>From: "Chris Ahart" 
<br>Sent by: <a rel="nofollow">c...@googlegroups.com</a>
<br>Date: 01/24/2020 04:45PM
<br>Subject: [CP2K:12815] SCAN convergence problems for charged systems
<br>
<br>Dear CP2K users,
<br>
<br>I am attempting to use the SCAN functional from libXC 4.2.1 with CP2K 6, performing some basic benchmark calculations from the G12IP dataset. While SCAN converges well for neutrals systems, I am unable to get convergence for a charged system.
<br>
<br>I attach an example of the CH4 system (input and output for both neutral and charged), where the neutral state converges within 20 steps while the charged state immediately diverges. I have observed the same behaviour with many other systems. I have also tried using LDA pseudopotentials as well as the SCAN optimised pseudopotentials from <a href="http://github.com/juerghutter/GTH" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fgithub.com%2Fjuerghutter%2FGTH\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEEAj1lHu75MDwFcbxSLlA5kAfOvA';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fgithub.com%2Fjuerghutter%2FGTH\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEEAj1lHu75MDwFcbxSLlA5kAfOvA';return true;">github.com/juerghutter/GTH</a>, in addition to all electron calculations. I have confirmed that the same input file converges with HF, and with PBE from both the CP2K implementation and from libXC.
<br>
<br>I have also found that the charged system converges when only the correlation part of the SCAN functional is included, suggesting that the problem may be related to the exchange part of the SCAN functional.
<br>
<br>Any help with this problem would be greatly appreciated.
<br>
<br>Regards,
<br>Chris  
<br>  -- 
<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 rel="nofollow">c...@googlegroups.com</a>.
<br> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/4c4384f8-c896-416f-9a8f-98c2b23c0d14%40googlegroups.com" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/cp2k/4c4384f8-c896-416f-9a8f-98c2b23c0d14%40googlegroups.com';return true;" onclick="this.href='https://groups.google.com/d/msgid/cp2k/4c4384f8-c896-416f-9a8f-98c2b23c0d14%40googlegroups.com';return true;">https://groups.google.com/d/<wbr>msgid/cp2k/4c4384f8-c896-416f-<wbr>9a8f-98c2b23c0d14%<wbr>40googlegroups.com</a>.
<br> 
<br>
<br>[attachment "charged.inp" removed by Jürg Hutter/at/UZH]
<br>[attachment "charged.out" removed by Jürg Hutter/at/UZH]
<br>[attachment "neutral.inp" removed by Jürg Hutter/at/UZH]
<br>[attachment "neutral.out" removed by Jürg Hutter/at/UZH]
<br></blockquote></div></div></blockquote></div>