Skip to content

Commit

Permalink
Use internal Library
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Apr 23, 2024
1 parent 1672015 commit f0ab410
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_ase_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ase.build import bulk
import numpy as np

from pylammpsmpi import LammpsASELibrary
from pylammpsmpi import LammpsASELibrary, LammpsLibrary


class TestLammpsASELibrary(unittest.TestCase):
Expand All @@ -15,7 +15,7 @@ def setUpClass(cls):
comm=None,
logger=None,
log_file=None,
library=None,
library=LammpsLibrary(cores=2, mode='local'),
diable_log_file=True,
)

Expand All @@ -41,6 +41,6 @@ def test_static(self):
self.lmp.interactive_lib_command("pair_coeff 1 1 1.0 1.0 4.04")
self.lmp.interactive_lib_command("run 0")
self.assertTrue(np.all(np.isclose(self.lmp.interactive_cells_getter(), structure.cell.array)))
self.assertEqual(self.lmp.interactive_energy_pot_getter(), -0.04342932384411344)
self.assertEqual(self.lmp.interactive_energy_tot_getter(), -0.04342932384411344)
self.assertEqual(float(self.lmp.interactive_energy_pot_getter()), -0.04342932384411341)
self.assertEqual(float(self.lmp.interactive_energy_tot_getter()), -0.04342932384411341)
self.assertTrue(np.isclose(np.sum(self.lmp.interactive_forces_getter()), 0.0))

0 comments on commit f0ab410

Please sign in to comment.