-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Atoms that contribute to the density not correctly found #821
Comments
This might be related to #511. |
No, I don't think The computed lattice to pass to
so it only includes up to z=14. I don't know what |
Aaaah ok, I see what is happening. I think previously So |
Thanks for backtracking, and fixing! Have been hung up all day! |
Describe the bug
This part of the code:
sisl/src/sisl/physics/densitymatrix.py
Lines 913 to 926 in 115479f
which finds atoms with an orbital that reaches the unit cell, does not work properly.
This is critical because it gives wrong densities, since atoms that should contribute are not taken into account.
Code to reproduce problem
The simplest reproducing code that I could come up with is the following. I build a cell with two atoms inside and no periodic boundary conditions. Clearly, it should find both atoms to contribute to the unit cell.
With a cell
[10, 10, 20]
, if the second atom is atz=10
it is correctly found, while if it is atz=15
it is not found.I have no idea what causes this problem, but it is pretty nasty :(
(I didn't change anything in this part when I implemented the new algorithm for the density)
The text was updated successfully, but these errors were encountered: