@@ -172,24 +172,27 @@ def test_set_u_params(structure, request) -> None:
172
172
173
173
174
174
@pytest .mark .parametrize (
175
- "bandgap, expected_params" ,
175
+ "bandgap, bandgap_tol, expected_params" ,
176
176
[
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 }),
183
185
],
184
186
)
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
187
189
):
188
190
static_set = MPScanRelaxSet (
189
191
auto_ismear = True ,
190
192
auto_kspacing = True ,
191
193
structure = struct_no_magmoms ,
192
194
bandgap = bandgap ,
195
+ bandgap_tol = bandgap_tol ,
193
196
)
194
197
195
198
incar = static_set .incar
0 commit comments