Skip to content

Commit

Permalink
Add using options: append_text, prepend_text, additional_retrieve_list
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippRue committed Nov 24, 2022
1 parent aa53fd9 commit 0a7fe2b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions aiida_kkr/workflows/dos.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ class kkr_dos_wc(WorkChain):
'max_wallclock_seconds': 60 * 60,
'withmpi': True, # execute KKR with mpi or without
'custom_scheduler_commands': '', # some additional scheduler commands
'prepend_text': '',
'append_text': '',
'additional_retrieve_list': None
}

# intended to guide user interactively in setting up a valid wf_params node
Expand Down Expand Up @@ -200,6 +203,11 @@ def start(self):
if options_dict == {}:
options_dict = self._options_default
self.report('INFO: using default options')
self.ctx.append_text = options_dict.get('append_text', self._options_default['append_text'])
self.ctx.prepend_text = options_dict.get('prepend_text', self._options_default['prepend_text'])
self.ctx.additional_retrieve_list = options_dict.get(
'additional_retrieve_list', self._options_default['additional_retrieve_list']
)

# set values, or defaults
self.ctx.withmpi = options_dict.get(
Expand Down Expand Up @@ -391,6 +399,12 @@ def get_dos(self):
}
if self.ctx.custom_scheduler_commands:
options['custom_scheduler_commands'] = self.ctx.custom_scheduler_commands
if self.ctx.append_text:
options['append_text'] = self.ctx.append_text
if self.ctx.prepend_text:
options['prepend_text'] = self.ctx.prepend_text
if self.ctx.additional_retrieve_list:
options['additional_retrieve_list'] = self.ctx.additional_retrieve_list

inputs = get_inputs_kkr(
code, remote, options, label, description, parameters=params, serial=(not self.ctx.withmpi)
Expand Down

0 comments on commit 0a7fe2b

Please sign in to comment.