Implement python-side unified support, add example
This commit is contained in:
@ -17,4 +17,4 @@ if not pylib.Py_IsInitialized():
|
||||
raise RuntimeError("This interpreter is not compatible with python-based mliap for LAMMPS.")
|
||||
del sysconfig, ctypes, library, pylib
|
||||
|
||||
from .loader import load_model, activate_mliappy
|
||||
from .loader import load_model, load_unified, activate_mliappy
|
||||
|
||||
@ -80,3 +80,12 @@ def load_model(model):
|
||||
"the pair style. Call lammps.mliap.activate_mliappy(lmp)."
|
||||
) from ie
|
||||
mliap_model_python_couple.load_from_python(model)
|
||||
|
||||
def load_unified(model):
|
||||
try:
|
||||
import mliap_unifiedpy
|
||||
except ImportError as ie:
|
||||
raise ImportError("ML-IAP python module must be activated before loading\n"
|
||||
"the pair style. Call lammps.mliap.activate_mliappy(lmp)."
|
||||
) from ie
|
||||
mliap_unifiedpy.load_from_python(model)
|
||||
|
||||
Reference in New Issue
Block a user