From 392a772abe71eccabb0836f0d0c07dd9821f66fc Mon Sep 17 00:00:00 2001 From: bastonero Date: Fri, 19 Apr 2024 10:54:39 +0000 Subject: [PATCH] Fix logic compatibility with `main` --- src/aiida_quantumespresso_hp/workflows/hubbard.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/aiida_quantumespresso_hp/workflows/hubbard.py b/src/aiida_quantumespresso_hp/workflows/hubbard.py index bb13deb..b4cf257 100644 --- a/src/aiida_quantumespresso_hp/workflows/hubbard.py +++ b/src/aiida_quantumespresso_hp/workflows/hubbard.py @@ -158,10 +158,12 @@ def define(cls, spec): ), cls.run_hp, cls.inspect_hp, - cls.check_convergence, + if_(cls.should_check_convergence)( + cls.check_convergence, + ), if_(cls.should_clean_workdir)( cls.clean_iteration, - ) + ), ), cls.run_results, ) @@ -414,7 +416,7 @@ def get_pseudos(self) -> dict: for kind in self.ctx.current_hubbard_structure.kinds: for key, pseudo in pseudos.items(): symbol = re.sub(r'\d', '', key) - if re.match(fr'{kind.symbol}[0-9]*', symbol): + if re.match(fr'{kind.symbol}*.', symbol): results[kind.name] = pseudo break else: @@ -634,8 +636,8 @@ def check_convergence(self): self.ctx.current_hubbard_structure = workchain.outputs.hubbard_structure self.relabel_hubbard_structure(workchain) - if not self.should_check_convergence(): - return + # if not self.should_check_convergence(): + # return if not len(ref_params) == len(new_params): self.report('The new and old Hubbard parameters have different lenghts. Assuming to be at the first cycle.')