diff --git a/aiida_fleur/workflows/scf.py b/aiida_fleur/workflows/scf.py index 720e130dd..1dbd83797 100644 --- a/aiida_fleur/workflows/scf.py +++ b/aiida_fleur/workflows/scf.py @@ -759,13 +759,14 @@ def condition(self): self.ctx.last_hubbard1_elem_distance >= self.ctx.wf_dict.get('hubbard1_elem_converged'): ldahia_notconverged = True + ignore_convergence_criteria = ldau_notconverged or ldahia_notconverged if mode == 'density': if self.ctx.wf_dict.get('density_converged') >= self.ctx.last_charge_density: - if not ldau_notconverged or not ldahia_notconverged: + if not ignore_convergence_criteria: return False elif mode in ('energy', 'gw'): if self.ctx.wf_dict.get('energy_converged') >= self.ctx.energydiff: - if not ldau_notconverged or not ldahia_notconverged: + if not ignore_convergence_criteria: return False elif mode == 'force': if self.ctx.last_charge_density is None: @@ -774,7 +775,7 @@ def condition(self): except NotExistent: pass else: - if not ldau_notconverged or not ldahia_notconverged: + if not ignore_convergence_criteria: return False elif self.ctx.wf_dict.get('density_converged') >= self.ctx.last_charge_density: @@ -783,7 +784,7 @@ def condition(self): except NotExistent: pass else: - if not ldau_notconverged or not ldahia_notconverged: + if not ignore_convergence_criteria: return False if self.ctx.loop_count >= self.ctx.max_number_runs: