Skip to content

Commit

Permalink
Pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippRue committed Oct 2, 2024
1 parent 40d8fa4 commit 04b29cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion aiida_kkr/tools/find_parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@ def get_calc_from_remote(calc_remote):
raise ValueError('Parent is not unique!')

return parents[0].node

12 changes: 7 additions & 5 deletions aiida_kkr/workflows/_combine_imps.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class combine_imps_wc(WorkChain):
_workflowversion = __version__
_wf_default = {
'jij_run': False, # Any kind of addition in _wf_default should be updated into the start() as well.
'allow_unconverged_inputs': False, # start calculation only if previous impurity calculations are converged?
'allow_unconverged_inputs': False, # start calculation only if previous impurity calculations are converged?
}

@classmethod
Expand Down Expand Up @@ -232,11 +232,13 @@ def start(self): # pylint: disable=inconsistent-return-statements
message = f'INFO: started combine_imps_wc workflow version {self._workflowversion}'
self.report(message)

self.ctx.run_options = self._wf_default
self.ctx.run_options = self._wf_default
self.ctx.allow_unconverged_inputs = self._wf_default.get('allow_unconverged_inputs', False)
if 'wf_parameters_overwrite' in self.inputs:
self.ctx.wf_parameters_overwrite = self.inputs.wf_parameters_overwrite.get_dict()
self.ctx.allow_unconverged_inputs = self.ctx.wf_parameters_overwrite.get('global', {}).get('allow_unconverged_inputs', False)
self.ctx.allow_unconverged_inputs = self.ctx.wf_parameters_overwrite.get('global', {}).get(
'allow_unconverged_inputs', False
)

exit_code, self.ctx.imp1 = self.get_imp_node_from_input(iimp=1)
if exit_code != 0:
Expand Down Expand Up @@ -393,7 +395,7 @@ def extract_imps_info_exact_cluster(self):
imps_info_in_exact_cluster['ilayers'].append(imp2_impurity_info.get_dict()['ilayer_center'])
# TODO: Delete the below print line as it is for deburging
self.report(f'DEBUG: The is the imps_info_in_exact_cluster dict: {imps_info_in_exact_cluster}\n')
return 0, imps_info_in_exact_cluster # return also exit code
return 0, imps_info_in_exact_cluster # return also exit code

def get_impinfo_from_hostGF(self, imp_calc):
"""
Expand Down Expand Up @@ -547,7 +549,7 @@ def create_big_cluster(self): # pylint: disable=inconsistent-return-statements
exit_code, self.ctx.imps_info_in_exact_cluster = self.extract_imps_info_exact_cluster()
if exit_code != 0:
return exit_code

imps_info_in_exact_cluster = self.ctx.imps_info_in_exact_cluster
if single_single:
if offset_imp2.get_dict()['index'] < 0:
Expand Down

0 comments on commit 04b29cd

Please sign in to comment.