Skip to content
Open
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
26 changes: 26 additions & 0 deletions testsuite/MDAnalysisTests/coordinates/test_lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,3 +990,29 @@ def test_box(self, u_dump, u_data, reference_box):
)

assert_allclose(u_data.dimensions, reference_box, rtol=1e-5, atol=0)


def test_missing_requested_coordinate_convention(tmpdir):
f = tmpdir.join("bad_lammps.dump")
f.write(
"ITEM: TIMESTEP\n"
"0\n"
"ITEM: NUMBER OF ATOMS\n"
"1\n"
"ITEM: BOX BOUNDS pp pp pp\n"
"0.0 10.0\n"
"0.0 10.0\n"
"0.0 10.0\n"
"ITEM: ATOMS id type xs ys zs\n"
"1 1 0.5 0.5 0.5\n"
)

with pytest.raises(
ValueError,
match=r"No coordinates following convention unwrapped found in timestep",
):
mda.Universe(
str(f),
format="LAMMPSDUMP",
lammps_coordinate_convention="unwrapped",
)
Loading