use alternate method to create triclinic box for unit test

This commit is contained in:
Axel Kohlmeyer
2022-01-18 09:09:37 -05:00
parent 1c8f427e8a
commit 389c35a2d3

View File

@ -356,18 +356,16 @@ create_atoms 1 single &
def test_extract_box_triclinic(self):
self.lmp.command("boundary p p p")
self.lmp.command("region box block 0 2 0 2 0 2")
self.lmp.command("region box prism 0 2 0 2 0 2 0.1 0.2 0.3")
self.lmp.command("create_box 1 box")
self.lmp.command("change_box all triclinic")
self.lmp.command("change_box all xy final 0.1 yz final 0.2 xz final 0.3")
boxlo, boxhi, xy, yz, xz, periodicity, box_change = self.lmp.extract_box()
self.assertEqual(boxlo, [0.0, 0.0, 0.0])
self.assertEqual(boxhi, [2.0, 2.0, 2.0])
self.assertEqual(xy, 0.1)
self.assertEqual(yz, 0.2)
self.assertEqual(xz, 0.3)
self.assertEqual(xz, 0.2)
self.assertEqual(yz, 0.3)
self.assertEqual(periodicity, [1, 1, 1])
self.assertEqual(box_change, 0)