[CP2K-user] [CP2K:17350] Geometry Optimization with Brent's Algorithm: CP2K and VASP
Filipe Menezes
filipemmenezes at gmail.com
Fri Jul 22 08:02:19 UTC 2022
Hi Nicholas,
I’ve experience two problems in line searches. One is that some of them require too many SCF calculations. For instance, Fletcher proposed a few quadratic line searches, and at each point you end up evaluating the function and its gradients (the function here is the SCF). In my test calculations, for each line search, I was calling 5 SCF. This resulted in extremely (perhaps painfully) slow geometry optimization.
The other problem is related to the confidence radius. If the line search is not in optimal conditions, it will penalize the step scaling, sometimes too much. For instance, some line searches are based on the Wolfe conditions, and if you do not have all criteria checked, you basically allow for a step of norm 1e-4 (Angstrom) or even less. Consequently, you don’t get out of the point you are, and this behaviour is kept for long. In many mathematical applications this is however better than shooting off and killing your root finding or minimization.
My first guess from checking a few papers of others is that something like the second point is happening with CP2K's Brent line search. The Brent method uses a mixture of golden section and quadratic fit of the function, and I believe that if you play around with the criteria that decides whether to use one or another, you will be able to improve results. The cost of the modification might however be that you will sacrifice the convergence properties of well behaved systems.
An alternative, if you like a bit of programming and code digging, would be to implement other methods. I can also give you some advice, since I spent some time on that problem.
Best
Filipe
> On 22. Jul 2022, at 01:12, Nicholas Winner <nwinner at berkeley.edu> wrote:
>
> Hi all,
>
> 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.
>
> 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.
>
> 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:
>
> BRACK_LIMIT {Real}
> Limit in 1D bracketing during line search in Conjugate Gradients Optimization.
> Default value: 1.00000000E+002
>
>
> BRENT_MAX_ITER {Integer}
> Maximum number of iterations in brent algorithm (used for the line search in Conjugated Gradients Optimization)
> Default value: 100
>
> BRENT_TOL {Real}
> Tolerance requested during Brent line search in Conjugate Gradients Optimization.
> Default value: 1.00000000E-002
>
> INITIAL_STEP {Real}
> Initial step size used, e.g. for bracketing or minimizers. Might need to be reduced for systems with close contacts
> Default value: 2.00000000E-001
>
>
> 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?
>
>
> If anyone has any ideas, it would be much appreciated.
>
> -Nick
>
> --
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com <mailto:cp2k+unsubscribe at googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/c3f8726c-7587-4240-8e97-c2a97f3ebdafn%40googlegroups.com <https://groups.google.com/d/msgid/cp2k/c3f8726c-7587-4240-8e97-c2a97f3ebdafn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/7057A62E-058A-4BDE-B946-D8E293951428%40gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20220722/bbcb5742/attachment-0001.htm>
More information about the CP2K-user
mailing list