-
-
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
Mulliken's total charge seems to be only half of the real total charge #611
Comments
thanks for your report, could you share the folder with the content so I can debug it! :) |
I believe you are correct. I think I am missing a copy, hence the update happens in the same array. |
This will only affect spin-polarized calculations. As for the 3, it is because the current way the matrices are built up is by having the density matrices in the first elements, and the last one (in this case 3) will be the overlap matrix. |
OK! Which way do you prefer, by email or something else? |
Thanks! I get it! |
I am playing a bit now, perhaps I don't need it, lets wait and see. I'll ping you for more information, if needed! :) Thanks! |
Ok, no problem! |
This happened because we were forgetting to do a copy of the element matrix. This resulted in creating a view, but calculating on the same array leaving the exact calculation wrong. Essentially the old Mulliken was non-sense M[0] was M[0] + M[0] - M[1] Signed-off-by: Nick Papior <[email protected]>
Ok, I have now fixed the bug! thanks for discovering! Could you please install the latest sisl development version, then you should have the fix! Let me know! |
Successfully running!! |
Thanks for returning! I'll close this issue then! |
Describe the issue
I use Mulliken analysis on a system with 120 shell electrons(60 up and 60 down) using spin polarization. However, through DM.mulliken operation which outputs [Total, Sz], I only find total charge is 60 sumed in all atoms.
PS: In #501, I found the definiton(consistent with me)
Total = up + down (So in this case Total should be 120?)
z = up - down
Here I have 2 questions:
I am a beginner in Sisl so maybe there are some naive mistakes above. Thanks!
Version details
Run the below code and add to issue (if an issue is relevant for the issue):
The text was updated successfully, but these errors were encountered: