Hi Matthias, normally I use BFGS.  In my case of an adsorbate on metal, BFGS just hops around the minimum with no clear progress. CG (2pnt) does slowly work toward the minimum which is why I switched to it, its just slower.<br><div><br></div><div>I disabled USE_MODEL_HESSIAN and the convergence become much worse.</div><div><br></div><div>Still looking at some variations of the settings in "GOLD" line search to match Filipe's recommendation, but to no avail. So, so far, 2 point line search seems the best option, but there's something better hiding in the settings I can feel.</div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Friday, July 22, 2022 at 3:44:39 AM UTC-7 Matthias Krack wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">





<div lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word">
<div>
<p class="MsoNormal"><span lang="DE-CH">Hi Nick<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="DE-CH"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">According to my experience BFGS works best (fastest) in GEO_OPT and CELL_OPT runs. I suggest to disable the default USE_MODEL_HESSIAN with BFGS. For larger systems (>3000 atoms), I suggest
 LBFGS.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Matthias
<u></u><u></u></span></p></div></div><div lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word"><div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">"<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>" <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>> on behalf of Nicholas Winner <<a href data-email-masked rel="nofollow">nwi...@berkeley.edu</a>><br>
<b>Reply to: </b>"<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>" <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>><br>
<b>Date: </b>Friday, 22 July 2022 at 01:13<br>
<b>To: </b>"<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>" <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>><br>
<b>Subject: </b>[CP2K:17348] Geometry Optimization with Brent's Algorithm: CP2K and VASP<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt">Hi all,  <u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">I'm working with some people that are using VASP while I am using CP2K. While CP2K has really fast SCF procedure, it seems to be slower when it comes to geometry optimization for some reason.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">I've dug into VASP's manual and they claim that their CG method uses "a modified version of Brent's algorithm." No further details are given. Normally with CP2K, I use 2PNT line search with my CG minimizations,
 and I think this is pretty standard for everyone else. I do know that CP2K supports FIT and GOLD line search options which use Brent's algorithm (actually I don't 100% know how FIT and Brent's Algorithm are related, but gold uses it at least). However, GOLD
 line search is very slow in CP2K, as we are warned in the manual.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">So, my hunch, is that CP2K with some type of gold or fit line search would be able to match this "modified Brent's algorithm" and provide faster minimization than what I am currently getting. Are there some insights
 that people can provide for choosing settings for gold line search that can give decent results? To remind, the flags we have to play with are:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<br>
BRACK_LIMIT {Real}<br>
<em><span style="font-family:"Calibri",sans-serif">Limit in 1D bracketing during line search in Conjugate Gradients Optimization.</span></em><br>
Default value: 1.00000000E+002<br>
<br>
<br>
BRENT_MAX_ITER {Integer}<br>
<em><span style="font-family:"Calibri",sans-serif">Maximum number of iterations in brent algorithm (used for the line search in Conjugated Gradients Optimization)</span></em><br>
Default value: 100<br>
<br>
BRENT_TOL {Real}<br>
<em><span style="font-family:"Calibri",sans-serif">Tolerance requested during Brent line search in Conjugate Gradients Optimization.</span></em><br>
Default value: 1.00000000E-002<br>
<br>
INITIAL_STEP {Real}<br>
<em><span style="font-family:"Calibri",sans-serif">Initial step size used, e.g. for bracketing or minimizers. Might need to be reduced for systems with close contacts</span></em><br>
Default value: 2.00000000E-001<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">Could it be that VASP uses a loose value for BRENT_TOL, or maybe a small number of max steps? Furthermore, what is the tolerance in the algorithm? Tolerance for the atomic position refinement, or forces?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">If anyone has any ideas, it would be much appreciated.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">-Nick<u></u><u></u></p>
</div>
</div></div><div lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word"><div><p class="MsoNormal" style="margin-left:36.0pt">-- <br></p></div></div><div lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word"><div><p class="MsoNormal" style="margin-left:36.0pt">
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 data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/c3f8726c-7587-4240-8e97-c2a97f3ebdafn%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/c3f8726c-7587-4240-8e97-c2a97f3ebdafn%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1658777195217000&usg=AOvVaw0plyVIni6j33YKdk8P3ZRC">
https://groups.google.com/d/msgid/cp2k/c3f8726c-7587-4240-8e97-c2a97f3ebdafn%40googlegroups.com</a>.<br>
<br>
<u></u><u></u></p></div></div></blockquote></div>

<p></p>

-- <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="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/b4d40576-d050-4d64-944c-37d9aad53ae5n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/b4d40576-d050-4d64-944c-37d9aad53ae5n%40googlegroups.com</a>.<br />