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

@ -86,7 +86,6 @@ class LinearModel():
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()

View File

@ -106,3 +106,5 @@ lammps.mliap.load_model(model)
# run the simulation with the mliap pair style
lmp.commands_string(after_loading)
lmp.close()
lmp.finalize()

View File

@ -106,3 +106,5 @@ lammps.mliap.load_model_kokkos(model)
# run the simulation with the mliap pair style
lmp.commands_string(after_loading)
lmp.close()
lmp.finalize()

View File

@ -63,3 +63,5 @@ lammps.mliap.load_unified(unified)
# Run the simulation with the mliap unified pair style
# Use pre-loaded model by specifying model filename as "EXISTS"
lmp.commands_string(after_loading)
lmp.close()
lmp.finalize()