Skip to content

Commit 1aef97a

Browse files
precommit
1 parent 7ad56a9 commit 1aef97a

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

src/custodian/vasp/handlers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,9 @@ def correct(self, directory="./"):
687687
# This is basically the same as bravais
688688
vasp_recommended_symprec = 1e-6
689689
if (symprec := vi["INCAR"].get("SYMPREC", 1e-5)) > vasp_recommended_symprec:
690-
actions.append({"dict": "INCAR", "action": {"_set": {"SYMPREC": min(symprec/10., vasp_recommended_symprec)}}})
690+
actions.append(
691+
{"dict": "INCAR", "action": {"_set": {"SYMPREC": min(symprec / 10.0, vasp_recommended_symprec)}}}
692+
)
691693
elif vi["INCAR"].get("ISYM") > 0: # Default ISYM is variable, but never 0
692694
actions.append({"dict": "INCAR", "action": {"_set": {"ISYM": 0}}})
693695

tests/lobster/test_jobs.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,23 +97,19 @@ def test_postprocess(self) -> None:
9797

9898
def test_postprocess_v51(self) -> None:
9999
# test gzipped and zipping of additional files for lobster v5.1
100-
LOBSTER_TEST_FILES = {
101-
*VASP_OUTPUT_FILES, *LOBSTEROUTPUT_FILES, *FW_FILES
102-
}.difference({"POSCAR.lobster", "bandOverlaps.lobster"}) # these files are not in the directory
103-
100+
LOBSTER_TEST_FILES = {*VASP_OUTPUT_FILES, *LOBSTEROUTPUT_FILES, *FW_FILES}.difference(
101+
{"POSCAR.lobster", "bandOverlaps.lobster"}
102+
) # these files are not in the directory
103+
104104
with cd(os.path.join(test_files_lobster4)):
105105
with ScratchDir(".", copy_from_current_on_enter=True):
106106
shutil.copy("lobsterin", "lobsterin.orig")
107107
v = LobsterJob("hello", gzipped=True, add_files_to_gzip=VASP_OUTPUT_FILES)
108108
v.postprocess()
109-
assert all(
110-
os.path.isfile(f"{file}.gz") for file in LOBSTER_TEST_FILES
111-
)
112-
assert os.path.isfile(f"{file}.gz")
109+
assert all(os.path.isfile(f"{file}.gz") for file in LOBSTER_TEST_FILES)
113110

114111
with ScratchDir(".", copy_from_current_on_enter=True):
115112
shutil.copy("lobsterin", "lobsterin.orig")
116113
v = LobsterJob("hello", gzipped=False, add_files_to_gzip=VASP_OUTPUT_FILES)
117114
v.postprocess()
118115
assert all(os.path.isfile(file) for file in LOBSTER_TEST_FILES)
119-

0 commit comments

Comments
 (0)