diff --git a/src/aiida_sssp_workflow/protocol/convergence.yml b/src/aiida_sssp_workflow/protocol/convergence.yml index af8af6d..bd1c66e 100644 --- a/src/aiida_sssp_workflow/protocol/convergence.yml +++ b/src/aiida_sssp_workflow/protocol/convergence.yml @@ -40,7 +40,7 @@ fine: base: # base parameters is inherit by other process occupations: smearing - degauss: 0.0125 + degauss: 0.0125 smearing: fd conv_thr_per_atom: 1.0e-9 kpoints_distance: 0.1 # fine protocol of qe -> gabriel diff --git a/src/aiida_sssp_workflow/protocol/criteria.yml b/src/aiida_sssp_workflow/protocol/criteria.yml index 52cb925..769c8ac 100644 --- a/src/aiida_sssp_workflow/protocol/criteria.yml +++ b/src/aiida_sssp_workflow/protocol/criteria.yml @@ -78,7 +78,7 @@ efficiency: eos: mode: 0 - bounds: [0.0, 0.2] + bounds: [0.0, 0.2] eps: 1.0e-3 phonon_frequencies: diff --git a/src/aiida_sssp_workflow/workflows/common.py b/src/aiida_sssp_workflow/workflows/common.py index 9128997..284ac86 100644 --- a/src/aiida_sssp_workflow/workflows/common.py +++ b/src/aiida_sssp_workflow/workflows/common.py @@ -1,4 +1,7 @@ +from builtins import ConnectionError from typing import Optional +from paramiko import ssh_exception + from aiida import orm @@ -40,8 +43,12 @@ def clean_workdir(node: orm.CalcJobNode) -> Optional[int]: # other subsequent calcjob as `parent_folder`, i.e PH calculation. cached_from = node.base.extras.get("_aiida_cached_from", None) if not cached_from: - node.outputs.remote_folder._clean() # pylint: disable=protected-access - return node.pk + try: + node.outputs.remote_folder._clean() # pylint: disable=protected-access + except ssh_exception.SSHException as exc: + raise ConnectionError("ssh error") from exc + else: + return node.pk else: return None diff --git a/src/aiida_sssp_workflow/workflows/evaluate/_phonon_frequencies.py b/src/aiida_sssp_workflow/workflows/evaluate/_phonon_frequencies.py index 31fbc7c..b761a7d 100644 --- a/src/aiida_sssp_workflow/workflows/evaluate/_phonon_frequencies.py +++ b/src/aiida_sssp_workflow/workflows/evaluate/_phonon_frequencies.py @@ -194,11 +194,15 @@ def finalize(self): """set ecutwfc and ecutrho""" if self.inputs.clean_workdir.value is True: - cleaned_calcs = operate_calcjobs( - self.node, operator=clean_workdir, all_same_nodes=False - ) - - if cleaned_calcs: + try: + cleaned_calcs = operate_calcjobs( + self.node, operator=clean_workdir, all_same_nodes=False + ) + except ConnectionError as exc: + self.logger.warning( + f"clean remote workdir folder {self.inputs.clean_workir} failed: {exc}" + ) + else: self.report( f"cleaned remote folders of calculations: {' '.join(map(str, cleaned_calcs))}" )