Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/atomate2/common/jobs/magnetism.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def run_ordering_calculations(
structure = relax_job.output.structure
parent_uuid = relax_job.output.uuid
static_job_kwargs["prev_dir"] = relax_job.output.dir_name
else:
structure = struct

static_job = static_maker.make(structure, **static_job_kwargs)
static_job.append_name(" " + name)
Expand Down
10 changes: 7 additions & 3 deletions tests/vasp/flows/test_magnetism.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from atomate2.common.schemas.magnetism import MagneticOrderingsDocument


def test_magnetic_orderings(mock_vasp, clean_dir, test_dir):
@pytest.mark.parametrize("set_relax_maker_to_none", [False, True])
def test_magnetic_orderings(mock_vasp, clean_dir, test_dir, set_relax_maker_to_none: bool):
structure = Structure.from_file(
test_dir
/ "vasp"
Expand Down Expand Up @@ -38,8 +39,11 @@ def test_magnetic_orderings(mock_vasp, clean_dir, test_dir):
}

mock_vasp(ref_paths, fake_run_vasp_kwargs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might have the issue with POSCAR because the tests include test data for relaxations - if set_relax_maker_to_none is True, then the test data for the relaxes shouldn't be there (I think, just a hunch)


flow = MagneticOrderingsMaker().make(structure)

if set_relax_maker_to_none:
flow = MagneticOrderingsMaker(relax_maker=None).make(structure)
else:
flow = MagneticOrderingsMaker().make(structure)

responses = run_locally(flow, create_folders=True, ensure_success=True)

Expand Down