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 TestMPStaticSet using MPRelaxSet in test_user_incar_kspacing and test_kspacing_override #3268

Merged
merged 3 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions pymatgen/io/vasp/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1882,18 +1882,17 @@ def from_symbol_and_functional(symbol: str, functional: str | None = None):
if d is None:
raise ValueError(
f"No POTCAR for {symbol} with {functional=} found. Please set the PMG_VASP_PSP_DIR "
"environment in .pmgrc.yaml, or you may need to set PMG_DEFAULT_FUNCTIONAL to PBE_52 or "
"PBE_54 if you are using newer psps from VASP."
"environment in .pmgrc.yaml."
)
paths_to_try = [
os.path.join(d, funcdir, f"POTCAR.{symbol}"),
os.path.join(d, funcdir, symbol, "POTCAR"),
]
for p in paths_to_try:
p = os.path.expanduser(p)
p = zpath(p)
if os.path.exists(p):
return PotcarSingle.from_file(p)
for path in paths_to_try:
path = os.path.expanduser(path)
path = zpath(path)
if os.path.isfile(path):
return PotcarSingle.from_file(path)
raise OSError(
f"You do not have the right POTCAR with {functional=} and label {symbol} "
f"in your VASP_PSP_DIR. Paths tried: {paths_to_try}"
Expand Down
11 changes: 3 additions & 8 deletions tests/core/test_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,15 @@ def setUp(self):
["Ti", "Ti", "Ti"],
[
[0, 0, 0],
[0.333333, 0.666667, 0.500000],
[0.666667, 0.333333, 0.500000],
[0.333333, 0.666667, 0.5],
[0.666667, 0.333333, 0.5],
],
)

Ag_fcc = Structure(
Lattice.cubic(4.06),
["Ag", "Ag", "Ag", "Ag"],
[
[0, 0, 0],
[0, 0.500000, 0.500000],
[0.500000, 0, 0.500000],
[0.500000, 0.500000, 0],
],
[[0, 0, 0], [0, 0.5, 0.5], [0.5, 0, 0.5], [0.5, 0.5, 0]],
)

m = [[3.913449, 0, 0], [0, 3.913449, 0], [0, 0, 5.842644]]
Expand Down
Loading