Skip to content

Commit

Permalink
Merge pull request #197 from pyiron/triclinic
Browse files Browse the repository at this point in the history
Test ASE triclinic cell
  • Loading branch information
jan-janssen committed Apr 23, 2024
2 parents 601a52f + e737c99 commit d6a4531
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_ase_interface.py
Expand Up @@ -44,7 +44,7 @@ def test_static(self):
lmp.close()

def test_static_with_statement(self):
structure = bulk("Al", cubic=True).repeat([2, 2, 2])
structure = bulk("Al").repeat([2, 2, 2])
with LammpsASELibrary(
working_directory=None,
cores=1,
Expand All @@ -69,11 +69,10 @@ def test_static_with_statement(self):
lmp.interactive_lib_command("pair_style lj/cut 6.0")
lmp.interactive_lib_command("pair_coeff 1 1 1.0 1.0 4.04")
lmp.interactive_lib_command("run 0")
self.assertTrue(np.all(np.isclose(lmp.interactive_cells_getter(), structure.cell.array)))
self.assertTrue(np.isclose(lmp.interactive_energy_pot_getter(), -0.04342932384411341))
self.assertTrue(np.isclose(lmp.interactive_energy_tot_getter(), -0.04342932384411341))
self.assertTrue(np.isclose(lmp.interactive_energy_pot_getter(), -0.3083820387630098))
self.assertTrue(np.isclose(lmp.interactive_energy_tot_getter(), -0.3083820387630098))
self.assertTrue(np.isclose(np.sum(lmp.interactive_forces_getter()), 0.0))
self.assertTrue(np.isclose(lmp.interactive_volume_getter(), 531.4409999999999))
self.assertTrue(np.isclose(lmp.interactive_volume_getter(), 132.86024999999998))
self.assertTrue(np.all(lmp.interactive_indices_getter() == [1] * len(structure)))
self.assertEqual(lmp.interactive_steps_getter(), 0)
self.assertEqual(lmp.interactive_temperatures_getter(), 0)

0 comments on commit d6a4531

Please sign in to comment.