-
Notifications
You must be signed in to change notification settings - Fork 875
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
Robustness of Poscar
parser should be further improved
#3666
Comments
BadPoscarWarning
reported on valid POSCARPoscar
parser could be further improved
Poscar
parser could be further improvedPoscar
parser should be further improved
It seems you started with an empty first line, which should be the comment line. And therefore the This should work: from pymatgen.io.vasp.inputs import Poscar
poscar_text = """Lu3
1.0
8.212068 -1.711729 -0.004637
8.212068 1.711729 -0.004637
7.856937 -0.000000 2.938818
Lu
3
direct
0.000000 0.000000 -0.000000 Lu
0.221900 0.221900 0.221900 Lu
0.778100 0.778100 0.778100 Lu
"""
Poscar.from_str(poscar_text) |
Thank you, @DanielYang59. Apologies about the false report here! I was trying to track down a |
No worries at all. Not sure if you mean #3662 (to which I confessed...). I tried to run your code on my MacOS machine and didn't notice any Maybe you can try
|
Nah, what I mean is I transferred a POSCAR from my Linux machine to Windows (or vice versa) and imagine that this probably was potentially the root cause of my problem. In any case, it's all good! |
Python version
3.9+
Pymatgen version
2024.3.1
Operating system version
No response
Current behavior
When using the various Pymatgen input parsing utilities on the POSCAR below, a
BadPoscarWarning
is raised even though it is seemingly valid. I've drilled down to the root cause below.Expected Behavior
A valid parse.
Minimal example
Reports:
Relevant files to reproduce this bug
No response
The text was updated successfully, but these errors were encountered: