close and finalize LAMMPS instance in MLIAP example python scripts

This commit is contained in:
Axel Kohlmeyer
2023-04-06 12:58:30 -04:00
parent ebcb443237
commit 4c403e5b71
4 changed files with 26 additions and 20 deletions

View File

@ -85,8 +85,7 @@ class LinearModel():
def __call__(self,elems,bispectrum,beta,energy):
energy[:] = bispectrum @ self.weights + self.bias
beta[:] = self.weights
mymodel = LinearModel("Ta06A.mliap.model")
import lammps
@ -98,4 +97,5 @@ lammps.mliap.activate_mliappy(lmp)
lmp.commands_string(before_loading)
lammps.mliap.load_model(mymodel)
lmp.commands_string(after_loading)
lmp.close()
lmp.finalize()