-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Reading spin densities from CHGCAR #754
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #754 +/- ##
=======================================
Coverage 86.77% 86.78%
=======================================
Files 410 410
Lines 51785 51811 +26
=======================================
+ Hits 44939 44965 +26
Misses 6846 6846 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a link to the documentation or something, so it is clear what the indices of grid
values refers too?
src/sisl/io/vasp/chg.py
Outdated
# one line of nx, ny, nz | ||
rl() | ||
assert len(rl().split()) == 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps do another assert that these values matches the nx, ny, nz
, that would be great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! Will do.
Where would you add a link? The docstring already describes the |
It seems to me that line 35 is then wrong, no? |
Oh, I see. Yes, indeed |
Yes, currently this is a left-over from the Probably that should also be stream-lined. |
I've now updated the docstring and included some examples. I think the stream-lining could be a future PR. |
and added the down_density as well. Signed-off-by: Nick Papior <[email protected]>
Signed-off-by: Nick Papior <[email protected]>
The spin densities were not correctly read from CHGCAR, because after the augmentation occupancies an additional block of values (apparently one per atom) is found on file.
I could not determine what this extra block refers to, as it is not explicitly mentioned in the documentation from the VASP forum, which just mentions:
This PR resolves this issue and adds some further checks.