[QE-developers] Forces are not exact derivatives of the energy for U_projection_type = 'ortho-atomic'
Max Amsler
amsler.max at gmail.com
Sat Sep 12 12:44:33 CEST 2020
Dear all,
After extensively testing the recently implemented forces for U_projection_type = 'ortho-atomic’, I have come across several cases where the geometry optimizations would fail: the energy would fluctuate without convergence using BFGS, and even damped dynamics would frequently not converge. Such a behavior usually points to a problem with the forces, which are either not exact or noisy.
Based on this observation, I decided to perform a routine test: I compute the integral of the forces times displacement along a path in configurational space, and compare it with the energy difference between the initial and final point. If the forces are exact derivatives of the energy, the path integral must be identical to the energy difference (up to machine precision if the step size of the path integral goes to zero). The method is described in sec 3.3, https://doi.org/10.1016/j.cpc.2020.107415 <https://doi.org/10.1016/j.cpc.2020.107415>, see also the attachment of the relevant section.
I performed this test for a TiO2 Rutile structure with 6 atoms per cellI, along a path in a random direction with 0.001 Ang step size and with a total of 501 steps. I used 3 different settings: DFT without U, DFT+U with U_projection_type = ‘atomic’ (U=4.7147), and DFT+U with U_projection_type = 'ortho-atomic’ (U=4.7147). In the case of No-U and ‘atomic’, the relative error of the path integral and energy difference is less than1.d-4%, as expected when the forces are correct. But for 'ortho-atomic’ the relative error is a whopping 8%! This indicates that the forces are not the exact derivatives of the energy for U_projection_type = 'ortho-atomic’ (see also plot below, note that the y scale is logarithmic for the last two subplots).
It seems that there is a bug in the implementation of the forces for U_projection_type = 'ortho-atomic’, or that some terms have been neglected when computing the derivatives.
In the long run, it might be helpful to include such tests routinely as part of the QE development process.
Best
Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20200912/ab96eaee/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Method.pdf
Type: application/pdf
Size: 300459 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20200912/ab96eaee/attachment-0002.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20200912/ab96eaee/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Comparison.pdf
Type: application/pdf
Size: 12841 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20200912/ab96eaee/attachment-0003.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20200912/ab96eaee/attachment-0005.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1379 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20200912/ab96eaee/attachment-0001.p7s>
More information about the developers
mailing list