Skip to content

Commit c75e78e

Browse files
committed
updated docs
1 parent 82a5a05 commit c75e78e

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

atomate/common/powerups.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ def set_queue_adapter(
223223

224224

225225
def powerup_by_kwargs(
226-
wf,
226+
original_wf: Workflow,
227227
add_powerup_module: List[str] = None,
228-
**kwargs,
228+
**powerup_kwargs,
229229
):
230230
"""
231231
apply powerups in the form using a kwargs dictionary of the form:
@@ -239,6 +239,15 @@ def powerup_by_kwargs(
239239
"update_dict" : {"foo" : "bar"}
240240
}
241241
)
242+
243+
Args:
244+
original_wf: workflow that will be changed
245+
add_powerup_module: user_made modules that contain powerups
246+
powerup_kwargs: KWARGS used to apply any power: {"add_modify_incar": {
247+
"modify_incar_params": {
248+
"incar_update": {"KPAR": 8}}
249+
}}
250+
242251
"""
243252
# a list of possible powerups in atomate (most specific first)
244253
powerup_modules = [
@@ -250,13 +259,13 @@ def powerup_by_kwargs(
250259
if add_powerup_module is not None:
251260
powerup_modules = add_powerup_module + powerup_modules
252261

253-
for k, v in kwargs.items():
262+
for k, v in powerup_kwargs.items():
254263
for module_name in powerup_modules:
255264
try:
256265
module = import_module(module_name)
257266
powerup = getattr(module, k)
258-
wf = powerup(wf, **v)
267+
original_wf = powerup(original_wf, **v)
259268
break
260269
except Exception:
261270
pass
262-
return wf
271+
return original_wf

0 commit comments

Comments
 (0)