Skip to content

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

Open
Koulb wants to merge 3 commits into
epfl-theos:masterfrom
Koulb:fix_smooth_interp
Open

Fixed the offset_nscf for the case of smooth interpolation grid#230
Koulb wants to merge 3 commits into
epfl-theos:masterfrom
Koulb:fix_smooth_interp

Conversation

@Koulb

@Koulb Koulb commented Nov 28, 2024

Copy link
Copy Markdown

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

pep8speaks commented Nov 28, 2024

Copy link
Copy Markdown

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