diff --git a/dpgen2/op/collect_data.py b/dpgen2/op/collect_data.py index b1e057e5..68f397ff 100644 --- a/dpgen2/op/collect_data.py +++ b/dpgen2/op/collect_data.py @@ -95,9 +95,9 @@ def execute( ms = dpdata.MultiSystems(type_map=type_map) for ii in labeled_data: - if len(list(ii.rglob("fparam.npy"))) > 0: + if ii and len(list(ii.rglob("fparam.npy"))) > 0: setup_ele_temp(False) - if len(list(ii.rglob("aparam.npy"))) > 0: + if ii and len(list(ii.rglob("aparam.npy"))) > 0: setup_ele_temp(True) ss = dpdata.LabeledSystem(ii, fmt="deepmd/npy") ms.append(ss) diff --git a/dpgen2/op/run_lmp.py b/dpgen2/op/run_lmp.py index 3ff366c9..cca2acfd 100644 --- a/dpgen2/op/run_lmp.py +++ b/dpgen2/op/run_lmp.py @@ -195,7 +195,8 @@ def execute( with open("job.json", "w") as f: json.dump(data, f, indent=4) - merge_pimd_files() + merge_pimd_files() + ret_dict = { "log": work_dir / lmp_log_name, "traj": work_dir / lmp_traj_name, diff --git a/dpgen2/op/select_confs.py b/dpgen2/op/select_confs.py index cddcca55..e8ba891d 100644 --- a/dpgen2/op/select_confs.py +++ b/dpgen2/op/select_confs.py @@ -126,7 +126,7 @@ def validate_trajs( if tt is not None and mm is not None: rett.append(tt) retm.append(mm) - if optional_outputs: + if optional_outputs and any(optional_outputs): oo = optional_outputs[i] if oo is not None: reto.append(oo)