Skip to content

Commit 4214d77

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0663bd3 commit 4214d77

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

dpgen/generator/run.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4472,13 +4472,15 @@ def post_fp_cp2k(iter_index, jdata, rfailed=None):
44724472
log_file_path = os.path.join(work_path, f"{ss}.fp-fail.log")
44734473
all_sys = dpdata.MultiSystems(type_map=jdata["type_map"])
44744474
for oo in sys_output:
4475-
with open(oo, 'r') as file:
4475+
with open(oo) as file:
44764476
content = file.read()
4477-
if 'SCF run NOT converged' in content:
4478-
with open(log_file_path, 'a') as log_file:
4477+
if "SCF run NOT converged" in content:
4478+
with open(log_file_path, "a") as log_file:
44794479
log_file.write(f"Skipping file {oo} due to SCF run NOT converged\n")
44804480
continue
4481-
_sys = dpdata.LabeledSystem(oo, fmt="cp2kdata/e_f", type_map=jdata["type_map"])
4481+
_sys = dpdata.LabeledSystem(
4482+
oo, fmt="cp2kdata/e_f", type_map=jdata["type_map"]
4483+
)
44824484
all_sys.append(_sys)
44834485
icount += 1
44844486

0 commit comments

Comments
 (0)