-
Notifications
You must be signed in to change notification settings - Fork 867
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
Read NBANDS in io.vasp.outputs.Outcar
init
#4195
base: master
Are you sure you want to change the base?
Read NBANDS in io.vasp.outputs.Outcar
init
#4195
Conversation
|
||
# Test VASP 6.3.0 | ||
assert Outcar(f"{VASP_OUT_DIR}/OUTCAR_vasp_6.3.gz").data["nbands"] == 64 | ||
|
||
def test_nplwvs(self): | ||
outcar = Outcar(f"{VASP_OUT_DIR}/OUTCAR.gz") | ||
assert outcar.data["nplwv"] == [[34560]] |
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.
Question
Why would the "total number of plane waves (NPLWV)" value take a nested list format (added in #1757)?
pymatgen/src/pymatgen/io/vasp/outputs.py
Lines 2139 to 2147 in 31f1e1f
# Read "total number of plane waves", NPLWV: | |
self.read_pattern( | |
{"nplwv": r"total plane-waves NPLWV =\s+(\*{6}|\d+)"}, | |
terminate_on_match=True, | |
) | |
try: | |
self.data["nplwv"] = [[int(self.data["nplwv"][0][0])]] | |
except ValueError: | |
self.data["nplwv"] = [[None]] |
pymatgen/tests/io/vasp/test_outputs.py
Lines 1330 to 1332 in 31f1e1f
def test_nplwvs(self): | |
outcar = Outcar(f"{VASP_OUT_DIR}/OUTCAR.gz") | |
assert outcar.data["nplwv"] == [[34560]] |
@Andrew-S-Rosen Is currently implementation looking good to you? :) |
Due to time commitments, I can just say that I trust you. 👍 Happy to report if something comes up. |
Thanks for saying that, I tested on multiple VASP versions (included in unit test) and didn't find any issue for now, do let me know if you notice any :) |
Summary
io.vasp.outputs.Outcar
init, to close Support parsing of NBANDS from a VASP OUTCAR file #3843zgrep 'I found NBANDS' OUTCAR*
returns nothing)VASP version stability
Reason for using current pattern instead of
NBANDS = (\d+)
As mentioned in #3843 (comment), the NBANDS could be modified to be "number of cores compatible". More specifically:
For example if I set NBANDS to 30 on a 64-core job, it would be modified to 32 with the following message: