Fix filtering of bvectors for gamma only case #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently all positive bvectors are chosen while filtering bvectors in the
delete_shells_Γ
function. This won't work if some components are negative. For example, this does not work for the Na_chain in the wannier90 tests:gives the error:
I noticed this while I was testing it for a system I was working on.
I have fixed this by modifying the
delete_shells_Γ
to find the non-unique bvectors by filtering bvectors based on whether they are negative of each other. Also, I had to sort the bvectors beforedelete_shells_Γ
as I was getting the error:otherwise. So I had to add a method
delete_shells_Γ(::KspaceStencil)
for the same. This does fix the issue and the above code works fine now. It might be useful to add the above case to the tests.I am not familiar with the codebase and I am looking at the wannier code for the first time, so not sure whether this is the best approach. Let me know if any changes need to be made.
Also, thanks for the great package :)