-
Notifications
You must be signed in to change notification settings - Fork 862
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
Outcar class returns empty magnetization attribute when parsing OUTCAR file on Windows operating system #4033
Comments
Thanks for providing the OUTCAR and code snippet, it's super helpful. I could confirm this. It's owing to difference in pymatgen/src/pymatgen/io/vasp/outputs.py Line 1941 in edcd465
In a previous bug fix, I replaced the hard-coded line separator filemap = mmap.mmap(file.fileno(), 0, access=mmap.ACCESS_READ)
n = len(filemap)
while n > 0:
i = filemap.rfind(os.linesep.encode(), 0, n)
yield filemap[i + 1 : n].decode("utf-8").rstrip(os.linesep)
n = i I would fix this soon. |
Python version
Python 3.11.5
Pymatgen version
2024.7.18
Operating system version
Windows 11, 24H2
Current behavior
When using the Outcar class to parse an OUTCAR file from VASP on Windows 11, the magnetization attribute returns an empty tuple (). However, this issue does not occur on Ubuntu 22.04 LTS, where the attribute works as expected.
I hope the attched file helps to reproduce this issue (Please remove the suffix .txt of
OUTCAR.txt
).OUTCAR.txt
Expected Behavior
I expect the
outcar.magnetization
output on Windows to be identical to the one on Ubuntu 22.04 LTS.Minimal example
No response
Relevant files to reproduce this bug
No response
The text was updated successfully, but these errors were encountered: