OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
96 stars 25 forks source link

Poor SCF convergence at small residuals with Kerker pre-conditioning #162

Closed davidbowler closed 11 months ago

davidbowler commented 1 year ago

In many cases during SCF with Kerker pre-conditioning, if the SCF tolerance is tighter than 1e-7 or so, we can find very slow convergence (typically the convergence to 2e-7 is fast and then it simply oscillates). This seems to be caused by the zeroing of the q=0 component of the Fourier transform of the residual in hartree.f90. See attached example, a Pt(111) surface, for an example.

SCFResidualOscillation.zip

negf commented 1 year ago

I have seen similar issues with systems which are not periodic in 3D. I had the feeling that the problem is that the Kerker pre-conditioner assumes PBC in 3D. Essentially due the finite cut-off of the basis functions the charge in the vacuum region (away from the surface) should be identical to 0. However due to the FFT (for the Kerker pre-conditioner) one gets a finite charge density there.

On Tue, Feb 14, 2023 at 10:39 PM David Bowler @.***> wrote:

In many cases during SCF with Kerker pre-conditioning, if the SCF tolerance is tighter than 1e-7 or so, we can find very slow convergence (typically the convergence to 2e-7 is fast and then it simply oscillates). This seems to be caused by the zeroing of the q=0 component of the Fourier transform of the residual in hartree.f90. See attached example, a Pt(111) surface, for an example.

SCFResidualOscillation.zip https://github.com/OrderN/CONQUEST-release/files/10732894/SCFResidualOscillation.zip

— Reply to this email directly, view it on GitHub https://github.com/OrderN/CONQUEST-release/issues/162, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADINPWVCEG3RBLPR5M73IZTWXODIZANCNFSM6AAAAAAU3SMLTQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

davidbowler commented 1 year ago

Yes, I think that's one aspect that's a problem. Fundamentally, the q=0 component should be zero (it represents the integral over all space of the residual) and if it's not then setting it to zero causes problems near SCF with tight tolerances.

If you'd like to test the fix, the branch is bugfix-poor-scf-convergence and I've just pushed a commit.

negf commented 1 year ago

Sure, I will give it a try. Thanks.

davidbowler commented 11 months ago

This is now fixed by #194