cleanup and compilation for python off

This commit is contained in:
Axel Kohlmeyer
2020-12-07 17:47:21 -05:00
parent 280c19cf32
commit 3eb22e2406
6 changed files with 25 additions and 28 deletions

View File

@ -505,7 +505,7 @@ class lammps(object):
self.FIX_EXTERNAL_CALLBACK_FUNC = CFUNCTYPE(None, py_object, self.c_bigint, c_int, POINTER(self.c_tagint), POINTER(POINTER(c_double)), POINTER(POINTER(c_double)))
self.lib.lammps_set_fix_external_callback.argtypes = [c_void_p, c_char_p, self.FIX_EXTERNAL_CALLBACK_FUNC, py_object]
self.lib.lammps_set_fix_external_callback.restype = None
self.mliappy = MLIAPPY(self)
# -------------------------------------------------------------------------
@ -2931,12 +2931,12 @@ class MLIAPPY():
def __init__(self,lammps):
self._module = None
self.lammps = lammps
@property
def module(self):
if self._module:
return self._module
try:
# Begin Importlib magic to find the embedded python module
# This is needed because the filename for liblammps does not
@ -2959,10 +2959,10 @@ class MLIAPPY():
# End Importlib magic to find the embedded python module
except:
raise ImportError("Could not load MLIAPPY coupling module")
def activate(self):
self.module
def load_model(self,model):
self.module.load_from_python(model)