Skip to content
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

Fix normalization of wavefunctions #960

Merged
merged 2 commits into from
Mar 19, 2024
Merged

Conversation

antoine-levitt
Copy link
Member

@azadoks Do you agree? The wavefunctions are not in units of energy, so there should not be a factor of 2 here.

@mfherbst
Copy link
Member

@azadoks ping 😄

@azadoks
Copy link
Contributor

azadoks commented Mar 19, 2024

Ah yes, my bad the factor of two should probably not be there. However, in checking this, I found something else to consider:

@antoine-levitt
Copy link
Member Author

I don't understand your comment, is the current version (with fix in) correct?

@antoine-levitt antoine-levitt merged commit a99ef64 into master Mar 19, 2024
4 of 7 checks passed
@antoine-levitt antoine-levitt deleted the fix_normalization branch March 19, 2024 18:46
@azadoks
Copy link
Contributor

azadoks commented Mar 19, 2024

I think the factor of two needs to go, but we should also probably be normalizing the wavefunctions by their norm. Abinit does chi ./= sqrt.(integrate(r, chi.^2)) where chi is the data from the file (i.e. with the factor of r included). QE does the same thing, but it also sets the occupations for any wavefunctions which have a norm < 1e-8 to a small negative number so that they are not used in the initial guess wavefunction.

@antoine-levitt
Copy link
Member Author

OK, I'll open an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants