-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change of dimension in last kpoint when using non-converging scf #963
Comments
Good catch! With small differences the eigenvalues might not be sorted because they are recomputed after the Rayleigh-Ritz. Does https://github.com/JuliaMolSim/DFTK.jl/pull/964/files fix it? |
It seems to work yes! I was not sure if sorting directly here would break something elsewhere 😄 |
I don't see what it would break? This is a bit of a hack, a better solution would be to not recompute the eigenvalues but get them from the Rayleigh Ritz |
Yes, this fixes my problem. Thank you very much :) |
Hi all,
I currently have a problem using non converging SCF. I'm using ~1-3 steps of SCF in order to improve an initial guess for an iterative method. The problem here is, that the dimensions of
ψ1
andψ2
sometimes differ, making the method fail. This happens around ~30% of the time even for fixedψ1
.Here is a minimal working example.
I've consulted with @gkemlin and he came to the following conclusion: In this case, there is an additional occupied state in the last kpoint of
ψ2
. Inscfres_start.occupation
, we have the following :Here we can see, that 4th state is 0 and the 5th state is filled. This is because the two eigenvalues in
scfres.eigenvalues[7][4:5]
are very close, as seen here:Now for the randomness of this occuring, if you do just one iteration of the SCF, the eigenvalues are sometimes not sorted.
Is this intended behaviour? And if it is, is there any way to avoid this in order to always get a "working"
ψ2
? As the method I'm using is a Riemannian scheme, it is unfortunately not possible to introduce a very small numerical temperature to allow for fractional occupation number, as this destroys the manifold structure of the problem (at least as far as I know).Thanks for your help and best regards,
Jonas
The text was updated successfully, but these errors were encountered: