Skip to content

Commit

Permalink
len(all_sys) should > 0 for post_fp_cp2k (#1245)
Browse files Browse the repository at this point in the history
fix for this discussion

#1237 (reply in thread)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 13, 2023
1 parent 951350c commit b7d9135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4295,7 +4295,7 @@ def post_fp_cp2k(iter_index, jdata, rfailed=None):
all_sys.append(_sys)

icount += len(all_sys)
if all_sys is not None:
if (all_sys is not None) and (len(all_sys) > 0):
sys_data_path = os.path.join(work_path, "data.%s" % ss)
all_sys.to_deepmd_raw(sys_data_path)
all_sys.to_deepmd_npy(sys_data_path, set_size=len(sys_output))
Expand Down

0 comments on commit b7d9135

Please sign in to comment.