-
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
When reading in a POTCAR file with pymatgen.io.vasp.inputs.Potcar, the object can't distinguish between PBE_54 and PBE. #3951
Comments
I think this is intended: pymatgen/src/pymatgen/io/vasp/inputs.py Lines 1776 to 1788 in 5256fce
Probably because POTCAR itself doesn't carry a one-to-one mapping to VASP version (but compatible functionals) itself with its I think the reason versioned functional tags exist in pymatgen/src/pymatgen/io/vasp/inputs.py Lines 1757 to 1763 in 5256fce
|
Hi @DanielYang59. Thank you for the reply. At the moment, I am storing my results on my personal MongoDB database. When I read in a POTCAR file that I used with PBE_54, I would just like it to say PBE_54 to reflect the actual 54 version that I use instead of the old PBE. I am wondering if there is any way around this. If not, that is ok. |
No problem at all. I wish I could be more helpful on this, but I don't have much experience with the functionality you were looking for. Hopefully others would have smarter solutions. The from pymatgen.io.vasp.inputs import Potcar
potcar = Potcar.from_file("POTCAR")
potcar.functional = "PBE_54"
print(potcar.functional) # >>> "PBE_54" But you have to double check if such modification breaks any downstream operations (i.e. OPs that require If you just want to "tag" the
Hope this helps. |
@DanielYang59 Thanks again for your help. I've opted for the first option (overwrite directly) for now. Cheers. |
All good, and do let me know if you (or any other) come up with smarter options :) |
This has also confused me in the past but I don't know that it's a bug. The Conversely, the It would probably make sense to have these be consistent in terms of what the So as @DanielYang59 said, the |
Python version
3.12.4
Pymatgen version
2024.6.10
Operating system version
Ubuntu-22.04
Current behavior
I have a POTCAR file written with PBE_54. When I read it into a Potcar object, potcar.functional will equal PBE instead of PBE_54.
Expected Behavior
I would expect it to be PBE_54 to reflect the actual POTCAR file being read.
Minimal example
Relevant files to reproduce this bug
Try any PBE_54 POTCAR file.
The text was updated successfully, but these errors were encountered: