From e9754f7ae6fed262c48a8cefeb21ac239d6969d4 Mon Sep 17 00:00:00 2001 From: Andrew Rosen Date: Thu, 22 Feb 2024 19:31:08 -0500 Subject: [PATCH 1/6] Add more MP VASP tests --- .../recipes/vasp_recipes/mocked/test_vasp_recipes.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py index db1784a481..1502904710 100644 --- a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py +++ b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py @@ -707,3 +707,15 @@ def test_mp_gga_relax_flow(): "pp": "pbe", "setups": {"Ni": "_pv", "O": ""}, } + + +def test_mp_gga_relax_flow_custom(): + atoms = bulk("Ni") * (2, 1, 1) + atoms[0].symbol = "O" + output = mp_metagga_relax_flow( + mp_gga_relax_flow( + atoms["static"]["atoms"], job_params={"relax_job": {"nsw": 0}} + ), + job_params={"relax_job": {"nsw": 0}}, + ) + assert output["relax"]["parameters"]["nsw"] == 0 From 0709d69c6c9c9947d236e7b1ac16b802a6ee6b80 Mon Sep 17 00:00:00 2001 From: "Andrew S. Rosen" Date: Thu, 22 Feb 2024 19:31:52 -0500 Subject: [PATCH 2/6] Update test_vasp_recipes.py --- tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py index 1502904710..6092615f0b 100644 --- a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py +++ b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py @@ -709,7 +709,7 @@ def test_mp_gga_relax_flow(): } -def test_mp_gga_relax_flow_custom(): +def test_mp_relax_flow_custom(): atoms = bulk("Ni") * (2, 1, 1) atoms[0].symbol = "O" output = mp_metagga_relax_flow( From 3bbbc172c2687906dac86b49679233a6a47e5762 Mon Sep 17 00:00:00 2001 From: "Andrew S. Rosen" Date: Thu, 22 Feb 2024 19:37:48 -0500 Subject: [PATCH 3/6] Update test_vasp_recipes.py --- tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py index 6092615f0b..85fffb43d3 100644 --- a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py +++ b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py @@ -714,8 +714,8 @@ def test_mp_relax_flow_custom(): atoms[0].symbol = "O" output = mp_metagga_relax_flow( mp_gga_relax_flow( - atoms["static"]["atoms"], job_params={"relax_job": {"nsw": 0}} - ), + atoms, job_params={"relax_job": {"nsw": 0}} + )["static"]["atoms"], job_params={"relax_job": {"nsw": 0}}, ) assert output["relax"]["parameters"]["nsw"] == 0 From 8761a4c9d6d85bb65a5cc39539a74330359e3ec5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 00:38:02 +0000 Subject: [PATCH 4/6] style: format code with Black, isort and Prettier This commit fixes the style issues introduced in 3bbbc17 according to the output from Black, isort and Prettier. Details: https://github.com/Quantum-Accelerators/quacc/pull/1746 --- tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py index 85fffb43d3..d941cc77c1 100644 --- a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py +++ b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py @@ -713,9 +713,9 @@ def test_mp_relax_flow_custom(): atoms = bulk("Ni") * (2, 1, 1) atoms[0].symbol = "O" output = mp_metagga_relax_flow( - mp_gga_relax_flow( - atoms, job_params={"relax_job": {"nsw": 0}} - )["static"]["atoms"], + mp_gga_relax_flow(atoms, job_params={"relax_job": {"nsw": 0}})["static"][ + "atoms" + ], job_params={"relax_job": {"nsw": 0}}, ) assert output["relax"]["parameters"]["nsw"] == 0 From 7bb10be847aaf7b3c03bf5dbbab00452e55552c0 Mon Sep 17 00:00:00 2001 From: Andrew Rosen Date: Thu, 22 Feb 2024 19:44:16 -0500 Subject: [PATCH 5/6] fix --- tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py index 1502904710..356b0e9803 100644 --- a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py +++ b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py @@ -714,8 +714,8 @@ def test_mp_gga_relax_flow_custom(): atoms[0].symbol = "O" output = mp_metagga_relax_flow( mp_gga_relax_flow( - atoms["static"]["atoms"], job_params={"relax_job": {"nsw": 0}} + atoms["static"]["atoms"], job_params={"mp_gga_relax_job": {"nsw": 0}} ), - job_params={"relax_job": {"nsw": 0}}, + job_params={"mp_metagga_relax_job": {"nsw": 0}}, ) assert output["relax"]["parameters"]["nsw"] == 0 From 334451f25772b4975229a0cda656e7d8642db6c5 Mon Sep 17 00:00:00 2001 From: Andrew Rosen Date: Thu, 22 Feb 2024 19:52:52 -0500 Subject: [PATCH 6/6] fix --- tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py index 504caa19b8..66d73195f0 100644 --- a/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py +++ b/tests/core/recipes/vasp_recipes/mocked/test_vasp_recipes.py @@ -718,4 +718,4 @@ def test_mp_relax_flow_custom(): ], job_params={"mp_metagga_relax_job": {"nsw": 0}}, ) - assert output["relax"]["parameters"]["nsw"] == 0 + assert output["relax"]["relax2"]["parameters"]["nsw"] == 0