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

Fixed the offset_nscf for the case of smooth interpolation grid #230

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Koulb
Copy link

@Koulb Koulb commented Nov 28, 2024

PR that fixes the problem of using smooth_interpolation together with offset_nscf. The later flag allows the shift of the k-grid so that the grid lies in the [0,1) interval. In principle, offset_nscf allows arbitrary shifts, but in practice, it is only used to shift the grid to non-negative values that some codes (e.g., EPW) require. At some point, one needs to also consider checking if this is how users use this flag. Using the definition of MP grid, one could see that the shift for the grid Nk is:

offset_nscf = $0.5(1-1/Nk)$

The problem arises in the final stage when nscf calculation is performed for the smooth DFT grid. The workflow uses the offset for the smaller grid, whereas you need to use the following ($Nk_{smth}$ = Nk * smth_int_factor):

offset_nscf_smth = $0.5(1-1/Nk_{smth})$

The fix transforms the initial offset to the smooth one using the abovementioned equations.

@pep8speaks
Copy link

pep8speaks commented Nov 28, 2024

Hello @Koulb! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-11-28 12:23:30 UTC

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.

2 participants