Rename mliap_unifiedpy.pyx to mliap_unified_couple.pyx, fix references
This commit is contained in:
@ -57,7 +57,7 @@ class DynamicLoader(importlib.abc.Loader):
|
||||
def activate_mliappy(lmp):
|
||||
try:
|
||||
library = lmp.lib
|
||||
module_names = ["mliap_model_python_couple", "mliap_unifiedpy"]
|
||||
module_names = ["mliap_model_python_couple", "mliap_unified_couple"]
|
||||
api_version = library.lammps_PYTHON_API_VERSION()
|
||||
|
||||
for module_name in module_names:
|
||||
@ -83,9 +83,9 @@ def load_model(model):
|
||||
|
||||
def load_unified(model):
|
||||
try:
|
||||
import mliap_unifiedpy
|
||||
import mliap_unified_couple
|
||||
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)
|
||||
mliap_unified_couple.load_from_python(model)
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include "memory.h"
|
||||
#include "lmppython.h"
|
||||
#include "mliap_data.h"
|
||||
#include "mliap_unifiedpy.h"
|
||||
#include "mliap_unified_couple.h"
|
||||
#include "pair_mliap.h"
|
||||
#include "python_compat.h"
|
||||
#include "utils.h"
|
||||
@ -169,7 +169,7 @@ MLIAPBuildUnified_t LAMMPS_NS::build_unified(char *unified_fname, MLIAPData *dat
|
||||
lmp->error->all(FLERR, "Could not initialize embedded Python");
|
||||
}
|
||||
|
||||
PyObject *unified_module = PyImport_ImportModule("mliap_unifiedpy");
|
||||
PyObject *unified_module = PyImport_ImportModule("mliap_unified_couple");
|
||||
|
||||
if (PyErr_Occurred()) {
|
||||
PyErr_Print();
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
// We could get around this with cython --capi-reexport-cincludes
|
||||
// However, that exposes -too many- headers.
|
||||
#include "mliap_model_python_couple.h"
|
||||
#include "mliap_unifiedpy.h"
|
||||
#include "mliap_unified_couple.h"
|
||||
#endif
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
@ -69,7 +69,7 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp)
|
||||
int err = PyImport_AppendInittab("mliap_model_python_couple", PyInit_mliap_model_python_couple);
|
||||
if (err) error->all(FLERR, "Could not register MLIAPPY embedded python module.");
|
||||
|
||||
err = PyImport_AppendInittab("mliap_unifiedpy", PyInit_mliap_unifiedpy);
|
||||
err = PyImport_AppendInittab("mliap_unified_couple", PyInit_mliap_unified_couple);
|
||||
if (err) error->all(FLERR, "Could not register MLIAPPY unified embedded python module.");
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user