Skip to content

Raise RIM-W G_max from next-nearest idx_G_2 - #232

Open
shaneraphel wants to merge 1 commit into
yambo-code:5.4from
shaneraphel:fix-227-rimw-gmax
Open

shaneraphel wants to merge 1 commit into
yambo-code:5.4from
shaneraphel:fix-227-rimw-gmax

Conversation

@shaneraphel

@shaneraphel shaneraphel commented Sep 18, 2026

Copy link
Copy Markdown

QP_interpolate_W raises G_max_ibz from nearest-neighbour idx_G only, then indexes X_mat with next-nearest idx_G_2. After the RIM-W interpolation merge those maps can land one G beyond the loaded polarizability block (index 52 vs bound 51 on MoS2 BSE+RIM-W). The nearest-neighbour cutoff already governs io_X; this uses the same cutoff with the next-nearest stencil, including nn=8..13 only at G=1 where find_q_nnns fills them. Skipping the X_mat(idx_G_2) write, or clipping idx_G_2 to X%ng, would drop the next-nearest W stencil.

Fixes #227.

G_max_ibz was filled from nearest-neighbour idx_G only, then X_mat
was indexed with idx_G_2. After the interpolation merge those maps
can exceed the loaded polarizability block.

Fixes yambo-code#227.
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.

1 participant