Skip to content

Commit

Permalink
Fix logic compatibility with main
Browse files Browse the repository at this point in the history
  • Loading branch information
bastonero committed Apr 19, 2024
1 parent 83bbbed commit 392a772
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/aiida_quantumespresso_hp/workflows/hubbard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.')
Expand Down

0 comments on commit 392a772

Please sign in to comment.