diff --git a/tests/auto/test_auto_jobs.py b/tests/auto/test_auto_jobs.py index a2c444c99..093c68a7a 100644 --- a/tests/auto/test_auto_jobs.py +++ b/tests/auto/test_auto_jobs.py @@ -9,6 +9,7 @@ mock.patch.dict(os.environ, {"OMP_NUM_THREADS": 1, "OPENBLAS_OMP_THREADS": 2}) + def test_get_phonon_ml_calculation_jobs(test_dir, clean_dir, memory_jobstore): potential_file_dir = test_dir / "fitting" / "ref_files" / "gap.xml" path_to_struct = test_dir / "fitting" / "ref_files" / "POSCAR" @@ -37,6 +38,9 @@ def test_ml_phonon_maker(test_dir, clean_dir, memory_jobstore): ml_dir=potential_file_dir, min_length=20 ).make(structure=structure) + assert gap_phonon_jobs.jobs[0].name == 'GAP relax' + assert gap_phonon_jobs.jobs[4].name == 'GAP static' + responses = run_locally( gap_phonon_jobs, create_folders=True, ensure_success=True, store=memory_jobstore ) @@ -44,6 +48,9 @@ def test_ml_phonon_maker(test_dir, clean_dir, memory_jobstore): ml_phonon_bs_doc = responses[gap_phonon_jobs.jobs[-1].output.uuid][1].output assert isinstance(ml_phonon_bs_doc, PhononBSDOSDoc) + assert responses[gap_phonon_jobs.jobs[0].output.uuid][1].output.forcefield_name == 'GAP' + assert responses[gap_phonon_jobs.jobs[4].output.uuid][1].output.forcefield_name == 'GAP' + def test_get_iso_atom(vasp_test_dir, mock_vasp, clean_dir, memory_jobstore): structure_list = [ Structure( @@ -110,6 +117,7 @@ def test_get_iso_atom(vasp_test_dir, mock_vasp, clean_dir, memory_jobstore): assert "[Element Li, Element C, Element Mo, Element Na, Element Si, Element Cl, Element K]" == f"{responses[isolated_atom.output.uuid][2].output['species']}" assert "Li" and "C" and "Mo" and "Na" and "Si" and "Cl" and "K" in f"{responses[isolated_atom.output.uuid][2].output['species']}" + def test_dft_task_doc( vasp_test_dir, mock_vasp, test_dir, memory_jobstore, clean_dir ):