Change return type of lammps.get_natoms to int

Closes PR #2370
This commit is contained in:
Richard Berger
2020-09-17 10:57:49 -04:00
parent 12582edfb7
commit 5dacfc47ca
3 changed files with 18 additions and 18 deletions

View File

@ -25,7 +25,7 @@ class PythonNumpy(unittest.TestCase):
self.lmp.command("create_atoms 1 single 1.0 1.0 1.0")
self.lmp.command("create_atoms 1 single 1.0 1.0 1.5")
self.lmp.command("compute coordsum all reduce sum x y z")
natoms = int(self.lmp.get_natoms())
natoms = self.lmp.get_natoms()
self.assertEqual(natoms,2)
values = self.lmp.numpy.extract_compute("coordsum", LMP_STYLE_GLOBAL, LMP_TYPE_VECTOR)
self.assertEqual(len(values), 3)
@ -43,7 +43,7 @@ class PythonNumpy(unittest.TestCase):
self.lmp.command("create_atoms 1 single 1.0 1.0 1.0")
self.lmp.command("create_atoms 1 single 1.0 1.0 1.5")
self.lmp.command("compute ke all ke/atom")
natoms = int(self.lmp.get_natoms())
natoms = self.lmp.get_natoms()
self.assertEqual(natoms,2)
values = self.lmp.numpy.extract_compute("ke", LMP_STYLE_ATOM, LMP_TYPE_VECTOR)
self.assertEqual(len(values), 2)