Skip to content
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

Fix Vasprun.get_potcars search method; tweak fake POTCARs #3587

Merged
merged 10 commits into from
Jan 28, 2024

Conversation

esoteric-ephemera
Copy link
Contributor

The main change here is to correct the update_potcar_spec method of Vasprun found by @Andrew-S-Rosen in issue #3586. Specifying Vasprun("vasprun.xml") would not find POTCARs, but specifying the leading Vasprun("./vasprun.xml") would. That has been corrected.

Other fixes:

  • Add test for this behavior, io/test_outputs.TestVasprun.test_parse_potcar_cwd_relative
  • Update potcar scrambling to ensure that scrambled POTCARs have same TITELs as originals. A "FAKE" comment still exists in the scrambled POTCARs to show that they're gobbled, but this is no longer parsed into PotcarSingle.TITEL

@@ -272,6 +272,7 @@ def from_file(cls, filename, check_for_potcar=True, read_velocities=True, **kwar
[get_el_sp(n) for n in names] # ensure valid names
except Exception:
names = None
print("shitfucker", names, dirname, filename)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my favorite line in this PR! 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL I am losing it over here. Legit have tears in my eyes 🤣

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhhhhh I'm so sorry! I was maybe working a bit too fast lol

@janosh janosh enabled auto-merge (squash) January 27, 2024 08:10
@janosh janosh added io Input/output functionality fix Bug fix PRs vasp Vienna Ab initio Simulation Package labels Jan 27, 2024
Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @esoteric-ephemera for the quick fix!

@janosh janosh disabled auto-merge January 28, 2024 07:45
@janosh janosh merged commit d677a0a into materialsproject:master Jan 28, 2024
19 of 22 checks passed
@esoteric-ephemera esoteric-ephemera deleted the fix_potcar_search branch January 29, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PRs io Input/output functionality vasp Vienna Ab initio Simulation Package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants