From 481e604aa89039722e154bfa4eac89a1846d8e56 Mon Sep 17 00:00:00 2001 From: "Andrew S. Rosen" Date: Wed, 6 Sep 2023 22:20:54 -0700 Subject: [PATCH] Improve serializability of recipe inputs (#895) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- CHANGELOG.md | 4 ++ docs/user/wflow_engine/wflow_engines2.md | 16 +++---- src/quacc/recipes/emt/defects.py | 27 +++++------ src/quacc/recipes/emt/slabs.py | 28 +++++------- src/quacc/recipes/newtonnet/ts.py | 31 ++++++------- src/quacc/recipes/vasp/mp.py | 12 ++--- src/quacc/recipes/vasp/slabs.py | 48 +++++++++----------- tests/covalent_tests/test_covalent.py | 2 +- tests/parsl_tests/test_parsl.py | 2 +- tests/prefect_tests/test_prefect.py | 2 +- tests/recipes/emt/test_emt_defect_recipes.py | 2 +- tests/recipes/emt/test_emt_recipes.py | 4 +- tests/recipes/vasp/test_vasp_recipes.py | 8 ++-- tests/redun_tests/test_redun.py | 2 +- 14 files changed, 87 insertions(+), 101 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 879e5cfda5..f13315b401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Re-added support for the Prefect workflow engine. +### Changed + +- Removed unnecessary functions as kwargs in recipes. + ## [0.2.5] ### Added diff --git a/docs/user/wflow_engine/wflow_engines2.md b/docs/user/wflow_engine/wflow_engines2.md index 23e01aa09a..8a343d6351 100644 --- a/docs/user/wflow_engine/wflow_engines2.md +++ b/docs/user/wflow_engine/wflow_engines2.md @@ -428,7 +428,7 @@ graph LR @flow def workflow(atoms): relaxed_bulk = relax_job(atoms) - relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, slab_static=None) # (1)! + relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, run_static=None) # (1)! return relaxed_slabs @@ -442,7 +442,7 @@ graph LR print(result) ``` - 1. We didn't need to wrap `bulk_to_slabs_flow` with a decorator because it is already pre-decorated with a `#!Python @flow` decorator. We also chose to set `#!Python slab_static=None` here to disable the static calculation that is normally carried out in this workflow. + 1. We didn't need to wrap `bulk_to_slabs_flow` with a decorator because it is already pre-decorated with a `#!Python @flow` decorator. We also chose to set `#!Python run_static=None` here to disable the static calculation that is normally carried out in this workflow. === "Parsl ⭐" @@ -455,7 +455,7 @@ graph LR # Define the workflow def workflow(atoms): relaxed_bulk = relax_job(atoms) - relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, slab_static=None) # (1)! + relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, run_static=None) # (1)! return relaxed_slabs @@ -470,7 +470,7 @@ graph LR print(result) ``` - 1. We didn't need to wrap `bulk_to_slabs_flow` with a decorator because it is already pre-decorated with a `#!Python @flow` decorator. We also chose to set `#!Python slab_static=None` here to disable the static calculation that is normally carried out in this workflow. + 1. We didn't need to wrap `bulk_to_slabs_flow` with a decorator because it is already pre-decorated with a `#!Python @flow` decorator. We also chose to set `#!Python run_static=None` here to disable the static calculation that is normally carried out in this workflow. === "Prefect" @@ -485,7 +485,7 @@ graph LR @flow def workflow(atoms): relaxed_bulk = relax_job(atoms) - relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, slab_static=None) # (1)! + relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, run_static=None) # (1)! return relaxed_slabs @@ -499,7 +499,7 @@ graph LR print(results) ``` - 1. We didn't need to wrap `bulk_to_slabs_flow` with a decorator because it is already pre-decorated with a `#!Python @flow` decorator. We also chose to set `#!Python slab_static=None` here to disable the static calculation that is normally carried out in this workflow. + 1. We didn't need to wrap `bulk_to_slabs_flow` with a decorator because it is already pre-decorated with a `#!Python @flow` decorator. We also chose to set `#!Python run_static=None` here to disable the static calculation that is normally carried out in this workflow. === "Redun" @@ -517,7 +517,7 @@ graph LR @flow def workflow(atoms): relaxed_bulk = relax_job(atoms) - relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, slab_static=None) # (1)! + relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, run_static=None) # (1)! return relaxed_slabs @@ -530,7 +530,7 @@ graph LR print(result) ``` - 1. We didn't need to wrap `bulk_to_slabs_flow` with a decorator because it is already pre-decorated with a `#!Python @flow` decorator. We also chose to set `#!Python slab_static=None` here to disable the static calculation that is normally carried out in this workflow. + 1. We didn't need to wrap `bulk_to_slabs_flow` with a decorator because it is already pre-decorated with a `#!Python @flow` decorator. We also chose to set `#!Python run_static=None` here to disable the static calculation that is normally carried out in this workflow. === "Jobflow" diff --git a/src/quacc/recipes/emt/defects.py b/src/quacc/recipes/emt/defects.py index abd7fcaa22..e08907b0ae 100644 --- a/src/quacc/recipes/emt/defects.py +++ b/src/quacc/recipes/emt/defects.py @@ -6,8 +6,7 @@ from pymatgen.analysis.defects.generators import VacancyGenerator from quacc import flow, job, subflow -from quacc.recipes.emt.core import relax_job as _relax_job -from quacc.recipes.emt.core import static_job as _static_job +from quacc.recipes.emt.core import relax_job, static_job from quacc.schemas import fetch_atoms from quacc.utils.defects import make_defects_from_bulk @@ -38,8 +37,7 @@ def bulk_to_defects_flow( ) = VacancyGenerator, defect_charge: int = 0, make_defects_kwargs: dict | None = None, - defect_relax: Job | None = _relax_job, - defect_static: Job | None = _static_job, + run_static: bool = True, defect_relax_kwargs: dict | None = None, defect_static_kwargs: dict | None = None, ) -> list[RunSchema | OptSchema]: @@ -62,10 +60,8 @@ def bulk_to_defects_flow( Charge state of the defect make_defects_kwargs Keyword arguments to pass to the make_defects_from_bulk - defect_relax - Default Job to use for the relaxation of the defect structures. - defect_static - Default Job to use for the static calculation of the defect structures. + run_static + Whether to run the static calculation. defect_relax_kwargs Additional keyword arguments to pass to the relaxation calculation. defect_static_kwargs @@ -96,13 +92,13 @@ def _make_defects(atoms): @subflow def _relax_distributed(defects): - return [defect_relax(defect, **defect_relax_kwargs) for defect in defects] + return [relax_job(defect, **defect_relax_kwargs) for defect in defects] @subflow def _relax_and_static_distributed(defects): return [ - defect_static( - defect_relax(defect, **defect_relax_kwargs), + static_job( + relax_job(defect, **defect_relax_kwargs), **defect_static_kwargs, ) for defect in defects @@ -110,7 +106,8 @@ def _relax_and_static_distributed(defects): defects = _make_defects(atoms) - if defect_static is None: - return _relax_distributed(defects) - - return _relax_and_static_distributed(defects) + return ( + _relax_and_static_distributed(defects) + if run_static + else _relax_distributed(defects) + ) diff --git a/src/quacc/recipes/emt/slabs.py b/src/quacc/recipes/emt/slabs.py index d7ab9d94bf..4538e3db76 100644 --- a/src/quacc/recipes/emt/slabs.py +++ b/src/quacc/recipes/emt/slabs.py @@ -4,8 +4,7 @@ from typing import TYPE_CHECKING from quacc import flow, job, subflow -from quacc.recipes.emt.core import relax_job as _relax_job -from quacc.recipes.emt.core import static_job as _static_job +from quacc.recipes.emt.core import relax_job, static_job from quacc.schemas import fetch_atoms from quacc.utils.slabs import make_max_slabs_from_bulk @@ -13,15 +12,13 @@ from ase import Atoms from quacc.schemas.ase import OptSchema, RunSchema - from quacc.utils.wflows import Job @flow def bulk_to_slabs_flow( atoms: Atoms | dict, make_slabs_kwargs: dict | None = None, - slab_relax: Job = _relax_job, - slab_static: Job | None = _static_job, + run_static: bool = True, slab_relax_kwargs: dict | None = None, slab_static_kwargs: dict | None = None, ) -> list[RunSchema | OptSchema]: @@ -42,10 +39,8 @@ def bulk_to_slabs_flow( make_slabs_kwargs Additional keyword arguments to pass to `quacc.utils.slabs.make_max_slabs_from_bulk` - slab_relax - Default Job to use for the relaxation of the slab structures. - slab_static - Default Job to use for the static calculation of the slab structures. + run_static + Whether to run the static calculation. slab_relax_kwargs Additional keyword arguments to pass to the relaxation calculation. slab_static_kwargs @@ -70,13 +65,13 @@ def _make_slabs(atoms): @subflow def _relax_distributed(slabs): - return [slab_relax(slab, **slab_relax_kwargs) for slab in slabs] + return [relax_job(slab, **slab_relax_kwargs) for slab in slabs] @subflow def _relax_and_static_distributed(slabs): return [ - slab_static( - slab_relax(slab, **slab_relax_kwargs), + static_job( + relax_job(slab, **slab_relax_kwargs), **slab_static_kwargs, ) for slab in slabs @@ -84,7 +79,8 @@ def _relax_and_static_distributed(slabs): slabs = _make_slabs(atoms) - if slab_static is None: - return _relax_distributed(slabs) - - return _relax_and_static_distributed(slabs) + return ( + _relax_and_static_distributed(slabs) + if run_static + else _relax_distributed(slabs) + ) diff --git a/src/quacc/recipes/newtonnet/ts.py b/src/quacc/recipes/newtonnet/ts.py index 9c42d03563..18576e9beb 100644 --- a/src/quacc/recipes/newtonnet/ts.py +++ b/src/quacc/recipes/newtonnet/ts.py @@ -9,9 +9,7 @@ from monty.dev import requires from quacc import SETTINGS, job -from quacc.recipes.newtonnet.core import _add_stdev_and_hess -from quacc.recipes.newtonnet.core import freq_job as _freq_job -from quacc.recipes.newtonnet.core import relax_job +from quacc.recipes.newtonnet.core import _add_stdev_and_hess, freq_job, relax_job from quacc.schemas import fetch_atoms from quacc.schemas.ase import summarize_opt_run from quacc.utils.calc import run_ase_opt @@ -35,7 +33,6 @@ from quacc.recipes.newtonnet.core import FreqSchema from quacc.schemas.ase import OptSchema - from quacc.utils.wflows import Job class TSSchema(OptSchema): freq: FreqSchema | None @@ -54,7 +51,7 @@ class QuasiIRCSchema(OptSchema): def ts_job( atoms: Atoms | dict, use_custom_hessian: bool = False, - freq_job: Job | None = _freq_job, + run_freq: bool = True, freq_job_kwargs: dict | None = None, calc_swaps: dict | None = None, opt_swaps: dict | None = None, @@ -68,8 +65,8 @@ def ts_job( The atoms object representing the system. use_custom_hessian Whether to use a custom Hessian matrix. - freq_job - Default Job to use for the frequency analysis. + run_freq + Whether to run the frequency job. freq_job_kwargs Keyword arguments to use for the `freq_job`. calc_swaps @@ -144,7 +141,7 @@ def ts_job( # Run a frequency calculation freq_summary = ( - freq_job.__wrapped__(opt_ts_summary, **freq_job_kwargs) if freq_job else None + freq_job.__wrapped__(opt_ts_summary, **freq_job_kwargs) if run_freq else None ) opt_ts_summary["freq"] = freq_summary @@ -157,7 +154,7 @@ def ts_job( def irc_job( atoms: Atoms | dict, direction: Literal["forward", "reverse"] = "forward", - freq_job: Job | None = _freq_job, + run_freq: bool = True, freq_job_kwargs: dict | None = None, calc_swaps: dict | None = None, opt_swaps: dict | None = None, @@ -172,8 +169,8 @@ def irc_job( The atoms object representing the system. direction The direction of the IRC calculation ("forward" or "reverse"). - freq_job - Default Job to use for the frequency analysis. + run_freq + Whether to run the frequency analysis. freq_job_kwargs Keyword arguments for the `freq_job`. calc_swaps @@ -261,7 +258,7 @@ def irc_job( # Run frequency job freq_summary = ( - freq_job.__wrapped__(opt_irc_summary, **freq_job_kwargs) if freq_job else None + freq_job.__wrapped__(opt_irc_summary, **freq_job_kwargs) if run_freq else None ) opt_irc_summary["freq"] = freq_summary @@ -274,7 +271,7 @@ def irc_job( def quasi_irc_job( atoms: Atoms | dict, direction: Literal["forward", "reverse"] = "forward", - freq_job: Job | None = _freq_job, + run_freq: bool = True, freq_job_kwargs: dict | None = None, irc_swaps: dict | None = None, opt_swaps: dict | None = None, @@ -288,8 +285,8 @@ def quasi_irc_job( The atoms object representing the system. direction The direction of the IRC calculation ("forward" or "reverse"). - freq_job - Default Job to use for the frequency analysis. + run_freq + Whether to run the frequency analysis. freq_job_kwargs Keyword arguments for `freq_job`. irc_swaps @@ -322,7 +319,7 @@ def quasi_irc_job( # Run IRC irc_summary = irc_job.__wrapped__( - atoms, direction=direction, opt_swaps=irc_flags, freq_job=None + atoms, direction=direction, opt_swaps=irc_flags, run_freq=None ) # Run opt @@ -330,7 +327,7 @@ def quasi_irc_job( # Run frequency freq_summary = ( - freq_job.__wrapped__(relax_summary, **freq_job_kwargs) if freq_job else None + freq_job.__wrapped__(relax_summary, **freq_job_kwargs) if run_freq else None ) relax_summary["freq"] = freq_summary relax_summary["irc"] = irc_summary diff --git a/src/quacc/recipes/vasp/mp.py b/src/quacc/recipes/vasp/mp.py index 5676a5ef01..263f59357a 100644 --- a/src/quacc/recipes/vasp/mp.py +++ b/src/quacc/recipes/vasp/mp.py @@ -115,8 +115,6 @@ def mp_relax_job( @flow def mp_relax_flow( atoms: Atoms | dict, - prerelax: Callable | None = mp_prerelax_job, - relax: Callable | None = mp_relax_job, prerelax_kwargs: dict | None = None, relax_kwargs: dict | None = None, ) -> MPRelaxFlowSchema: @@ -131,10 +129,6 @@ def mp_relax_flow( ---------- atoms Atoms object for the structure. - prerelax - Default to use for the pre-relaxation. - relax - Default to use for the relaxation. prerelax_kwargs Additional keyword arguments to pass to the pre-relaxation calculation. relax_kwargs @@ -149,7 +143,7 @@ def mp_relax_flow( relax_kwargs = relax_kwargs or {} # Run the prerelax - prerelax_results = prerelax(atoms, **prerelax_kwargs) + prerelax_results = mp_prerelax_job(atoms, **prerelax_kwargs) # Update KSPACING arguments bandgap = prerelax_results["output"].get("bandgap", 0) @@ -163,7 +157,9 @@ def mp_relax_flow( relax_kwargs["calc_swaps"] = kspacing_swaps | relax_kwargs.get("calc_swaps", {}) # Run the relax - relax_results = relax(prerelax_results, copy_files=["WAVECAR"], **relax_kwargs) + relax_results = mp_relax_job( + prerelax_results, copy_files=["WAVECAR"], **relax_kwargs + ) relax_results["prerelax"] = prerelax_results return relax_results diff --git a/src/quacc/recipes/vasp/slabs.py b/src/quacc/recipes/vasp/slabs.py index 755d942674..2a14c42882 100644 --- a/src/quacc/recipes/vasp/slabs.py +++ b/src/quacc/recipes/vasp/slabs.py @@ -153,8 +153,7 @@ def slab_relax_job( def bulk_to_slabs_flow( atoms: Atoms | dict, make_slabs_kwargs: dict | None = None, - slab_relax: Callable = slab_relax_job, - slab_static: Callable | None = slab_static_job, + run_static: bool = True, slab_relax_kwargs: dict | None = None, slab_static_kwargs: dict | None = None, ) -> list[VaspSchema]: @@ -174,10 +173,8 @@ def bulk_to_slabs_flow( the value make_slabs_kwargs Additional keyword arguments to pass to make_max_slabs_from_bulk() - slab_relax - Default to use for the relaxation of the slab structures. - slab_static - Default to use for the static calculation of the slab structures. + run_static + Whether to run the static calculation. slab_relax_kwargs Additional keyword arguments to pass to the relaxation calculation. slab_static_kwargs @@ -199,13 +196,13 @@ def _make_slabs(atoms): @subflow def _relax_distributed(slabs): - return [slab_relax(slab, **slab_relax_kwargs) for slab in slabs] + return [slab_relax_job(slab, **slab_relax_kwargs) for slab in slabs] @subflow def _relax_and_static_distributed(slabs): return [ - slab_static( - slab_relax(slab, **slab_relax_kwargs), + slab_static_job( + slab_relax_job(slab, **slab_relax_kwargs), **slab_static_kwargs, ) for slab in slabs @@ -213,10 +210,11 @@ def _relax_and_static_distributed(slabs): slabs = _make_slabs(atoms) - if slab_static is None: - return _relax_distributed(slabs) - - return _relax_and_static_distributed(slabs) + return ( + _relax_and_static_distributed(slabs) + if run_static + else _relax_distributed(slabs) + ) @flow @@ -224,8 +222,7 @@ def slab_to_ads_flow( slab: Atoms, adsorbate: Atoms, make_ads_kwargs: dict | None = None, - slab_relax: Callable = slab_relax_job, - slab_static: Callable | None = slab_static_job, + run_static: bool = True, slab_relax_kwargs: dict | None = None, slab_static_kwargs: dict | None = None, ) -> list[VaspSchema]: @@ -241,10 +238,8 @@ def slab_to_ads_flow( Atoms object for the adsorbate. make_ads_kwargs Additional keyword arguments to pass to make_adsorbate_structures() - slab_relax - Default to use for the relaxation of the slab structure. - slab_static - Default to use for the static calculation of the slab structures. + run_static + Whether to run the static calculation. slab_relax_kwargs Additional keyword arguments to pass to the relaxation calculation. slab_static_kwargs @@ -267,13 +262,13 @@ def _make_ads_slabs(atoms, adsorbate): @subflow def _relax_distributed(slabs): - return [slab_relax(slab, **slab_relax_kwargs) for slab in slabs] + return [slab_relax_job(slab, **slab_relax_kwargs) for slab in slabs] @subflow def _relax_and_static_distributed(slabs): return [ - slab_static( - slab_relax(slab, **slab_relax_kwargs), + slab_static_job( + slab_relax_job(slab, **slab_relax_kwargs), **slab_static_kwargs, ) for slab in slabs @@ -281,7 +276,8 @@ def _relax_and_static_distributed(slabs): ads_slabs = _make_ads_slabs(slab, adsorbate) - if slab_static is None: - return _relax_distributed(ads_slabs) - - return _relax_and_static_distributed(ads_slabs) + return ( + _relax_and_static_distributed(ads_slabs) + if run_static + else _relax_distributed(ads_slabs) + ) diff --git a/tests/covalent_tests/test_covalent.py b/tests/covalent_tests/test_covalent.py index 7feea96272..9c77146ade 100644 --- a/tests/covalent_tests/test_covalent.py +++ b/tests/covalent_tests/test_covalent.py @@ -187,7 +187,7 @@ def test_tutorial2c(tmpdir): @flow def workflow(atoms): relaxed_bulk = relax_job(atoms) - relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, slab_static=None) # (1)! + relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, run_static=None) # (1)! return relaxed_slabs diff --git a/tests/parsl_tests/test_parsl.py b/tests/parsl_tests/test_parsl.py index 6c0f3857c5..ef8d349e59 100644 --- a/tests/parsl_tests/test_parsl.py +++ b/tests/parsl_tests/test_parsl.py @@ -172,7 +172,7 @@ def test_tutorial2c(tmpdir): # Define the workflow def workflow(atoms): relaxed_bulk = relax_job(atoms) - relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, slab_static=None) # (1)! + relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, run_static=None) # (1)! return relaxed_slabs diff --git a/tests/prefect_tests/test_prefect.py b/tests/prefect_tests/test_prefect.py index 7ed8be5a94..0bab69a061 100644 --- a/tests/prefect_tests/test_prefect.py +++ b/tests/prefect_tests/test_prefect.py @@ -144,7 +144,7 @@ def workflow(atoms1, atoms2): # @flow # def workflow(atoms): # relaxed_bulk = relax_job(atoms) -# relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, slab_static=None) # (1)! +# relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, run_static=None) # (1)! # return relaxed_slabs diff --git a/tests/recipes/emt/test_emt_defect_recipes.py b/tests/recipes/emt/test_emt_defect_recipes.py index 2b19bd2292..51b16b7e98 100644 --- a/tests/recipes/emt/test_emt_defect_recipes.py +++ b/tests/recipes/emt/test_emt_defect_recipes.py @@ -22,7 +22,7 @@ def test_bulk_to_defects_flow(tmpdir): atoms = bulk("Cu") output = bulk_to_defects_flow( - atoms, defect_static=None, defect_relax_kwargs={"opt_swaps": {"fmax": 5}} + atoms, run_static=None, defect_relax_kwargs={"opt_swaps": {"fmax": 5}} ) assert len(output) == 1 assert len(output[0]["atoms"]) == 107 diff --git a/tests/recipes/emt/test_emt_recipes.py b/tests/recipes/emt/test_emt_recipes.py index 7dadb67fbd..da1f65d41c 100644 --- a/tests/recipes/emt/test_emt_recipes.py +++ b/tests/recipes/emt/test_emt_recipes.py @@ -81,7 +81,7 @@ def test_slab_dynamic_jobs(tmpdir): atoms = bulk("Cu") - outputs = bulk_to_slabs_flow(atoms, slab_static=None) + outputs = bulk_to_slabs_flow(atoms, run_static=None) assert len(outputs) == 4 assert outputs[0]["nsites"] == 80 assert outputs[1]["nsites"] == 96 @@ -92,7 +92,7 @@ def test_slab_dynamic_jobs(tmpdir): outputs = bulk_to_slabs_flow( atoms, - slab_static=None, + run_static=None, slab_relax_kwargs={ "opt_swaps": {"fmax": 1.0}, "calc_swaps": {"asap_cutoff": True}, diff --git a/tests/recipes/vasp/test_vasp_recipes.py b/tests/recipes/vasp/test_vasp_recipes.py index 15651a83a0..9bde3ab287 100644 --- a/tests/recipes/vasp/test_vasp_recipes.py +++ b/tests/recipes/vasp/test_vasp_recipes.py @@ -132,7 +132,7 @@ def test_slab_dynamic_jobs(tmpdir): ### --------- Test bulk_to_slabs_flow --------- ### - outputs = bulk_to_slabs_flow(atoms, slab_static=None) + outputs = bulk_to_slabs_flow(atoms, run_static=None) assert len(outputs) == 4 assert outputs[0]["nsites"] == 80 assert outputs[1]["nsites"] == 96 @@ -151,7 +151,7 @@ def test_slab_dynamic_jobs(tmpdir): outputs = bulk_to_slabs_flow( atoms, slab_relax_kwargs={"preset": "SlabSet", "calc_swaps": {"nelmin": 6}}, - slab_static=None, + run_static=None, ) assert len(outputs) == 4 assert outputs[0]["nsites"] == 80 @@ -179,7 +179,7 @@ def test_slab_dynamic_jobs(tmpdir): atoms = outputs[0]["atoms"] adsorbate = molecule("H2") - outputs = slab_to_ads_flow(atoms, adsorbate, slab_static=None) + outputs = slab_to_ads_flow(atoms, adsorbate, run_static=None) assert [output["nsites"] == 82 for output in outputs] assert [output["parameters"]["isif"] == 2 for output in outputs] @@ -192,7 +192,7 @@ def test_slab_dynamic_jobs(tmpdir): atoms, adsorbate, slab_relax_kwargs={"preset": "SlabSet", "calc_swaps": {"nelmin": 6}}, - slab_static=None, + run_static=None, ) assert [output["nsites"] == 82 for output in outputs] diff --git a/tests/redun_tests/test_redun.py b/tests/redun_tests/test_redun.py index 57f715ac2e..a57be236fa 100644 --- a/tests/redun_tests/test_redun.py +++ b/tests/redun_tests/test_redun.py @@ -136,7 +136,7 @@ def test_tutorial2c(tmpdir): @flow def workflow(atoms): relaxed_bulk = relax_job(atoms) - relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, slab_static=None) # (1)! + relaxed_slabs = bulk_to_slabs_flow(relaxed_bulk, run_static=None) # (1)! return relaxed_slabs