Skip to content

Commit 4a56539

Browse files
add bandgap_tol options to vasp.test_sets
1 parent 93d3af2 commit 4a56539

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

tests/vasp/test_sets.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,27 @@ def test_set_u_params(structure, request) -> None:
172172

173173

174174
@pytest.mark.parametrize(
175-
"bandgap, expected_params",
175+
"bandgap, bandgap_tol, expected_params",
176176
[
177-
(0, {"KSPACING": 0.22, "ISMEAR": 2, "SIGMA": 0.2}),
178-
(0.1, {"KSPACING": 0.26969561, "ISMEAR": -5, "SIGMA": 0.05}),
179-
(1, {"KSPACING": 0.30235235, "ISMEAR": -5, "SIGMA": 0.05}),
180-
(2, {"KSPACING": 0.34935513, "ISMEAR": -5, "SIGMA": 0.05}),
181-
(5, {"KSPACING": 0.44, "ISMEAR": -5, "SIGMA": 0.05}),
182-
(10, {"KSPACING": 0.44, "ISMEAR": -5, "SIGMA": 0.05}),
177+
(0, 1.0e-4, {"KSPACING": 0.22, "ISMEAR": 2, "SIGMA": 0.2}),
178+
(0.1, 1.0e-4, {"KSPACING": 0.26969561, "ISMEAR": -5, "SIGMA": 0.05}),
179+
(0.1, 0.1, {"KSPACING": 0.22, "ISMEAR": 2, "SIGMA": 0.2}),
180+
(0.1, 0.2, {"KSPACING": 0.22, "ISMEAR": 2, "SIGMA": 0.2}),
181+
(1, 1.0e-4, {"KSPACING": 0.30235235, "ISMEAR": -5, "SIGMA": 0.05}),
182+
(2, 1.0e-4, {"KSPACING": 0.34935513, "ISMEAR": -5, "SIGMA": 0.05}),
183+
(5, 1.0e-4, {"KSPACING": 0.44, "ISMEAR": -5, "SIGMA": 0.05}),
184+
(10, 1.0e-4, {"KSPACING": 0.44, "ISMEAR": -5, "SIGMA": 0.05}),
183185
],
184186
)
185-
def test_set_kspacing_and_auto_ismear(
186-
struct_no_magmoms, bandgap, expected_params, monkeypatch
187+
def test_set_kspacing_bandgap_tol_and_auto_ismear(
188+
struct_no_magmoms, bandgap, bandgap_tol, expected_params, monkeypatch
187189
):
188190
static_set = MPScanRelaxSet(
189191
auto_ismear=True,
190192
auto_kspacing=True,
191193
structure=struct_no_magmoms,
192194
bandgap=bandgap,
195+
bandgap_tol=bandgap_tol,
193196
)
194197

195198
incar = static_set.incar

0 commit comments

Comments
 (0)