Skip to content

Commit

Permalink
test passing bandgap_tol to MPMetaGGARelaxSetGenerator in tests/vasp/…
Browse files Browse the repository at this point in the history
…flows/test_mp.py

doesn't actually test bandgap_tol has any effect, just that it can be passed
  • Loading branch information
janosh committed Oct 14, 2023
1 parent a329639 commit 1b176d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tests/vasp/flows/test_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
MPMetaGGARelaxMaker,
MPPreRelaxMaker,
)
from atomate2.vasp.sets.mp import MPMetaGGARelaxSetGenerator

if TYPE_CHECKING:
from jobflow import Maker
Expand Down Expand Up @@ -69,7 +70,13 @@ def test_mp_meta_gga_double_relax_static(mock_vasp, clean_dir, vasp_test_dir):
mock_vasp(ref_paths, fake_run_vasp_kwargs)

# generate flow
flow = MPMetaGGADoubleRelaxStaticMaker().make(si_struct)
flow = MPMetaGGADoubleRelaxStaticMaker(
relax_maker2=MPMetaGGARelaxMaker(
# TODO better test for bandgap_tol, isn't actually run by mock_vasp
# this just tests it can be passed without error
input_set_generator=MPMetaGGARelaxSetGenerator(bandgap_tol=0.1)
)
).make(si_struct)

# ensure flow runs successfully
responses = run_locally(flow, create_folders=True, ensure_success=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/vasp/jobs/test_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_mp_pre_relax_maker_default_values():
assert actual == expected, f"{key=}, {actual=}, {expected=}"


def test_mp_relax_maker_default_values():
def test_mp_meta_gga_relax_maker_default_values():
maker = MPMetaGGARelaxMaker()
assert maker.name == "MP meta-GGA relax"
assert {*maker.input_set_generator.config_dict} >= {"INCAR", "POTCAR"}
Expand Down

0 comments on commit 1b176d1

Please sign in to comment.