diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 8b11ede347..34a75b66dc 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -738,12 +738,12 @@ be installed on your system. MLIAP package --------------------------- -Building the MLIAP package requires also enabling the SNAP package. -There will be an error message if this requirement is not satisfied. -Using the *mliappy* model also requires enabling the PYTHON package -**and** requires you have the `cython `_ software -installed and a working ``cythonize`` command. This requires Python -version 3.6 or later. +Building the MLIAP package requires including the :ref:`SNAP ` +package. There will be an error message if this requirement is not satisfied. +Using the *mliappy* model also requires enabling the :ref:`PYTHON ` +package **and** requires you have the `cython `_ software +installed and with it a working ``cythonize`` command. This feature requires +compiling LAMMPS with Python version 3.6 or later. .. tabs:: @@ -755,7 +755,11 @@ version 3.6 or later. Without this setting, CMake will check whether it can find a suitable Python version and the ``cythonize`` command and choose - the default accordingly. + the default accordingly. During the build procedure the provided + .pyx file(s) will be automatically translated to C++ code and compiled. + Please do **not** run ``cythonize`` manually in the ``src/MLIAP`` folder, + as that can lead to compilation errors if PYTHON support is not included. + If you did by accident, please remove the generated .cpp and .h files. .. tab:: Traditional make @@ -764,6 +768,14 @@ version 3.6 or later. the ``cythonize`` command in case the corresponding .pyx file was modified. You may need to need to modify ``lib/python/Makefile.lammps`` if the LAMMPS build fails. + To manually enforce building MLIAP with Python support, you can add + ``-DMLIAP_PYTHON`` to the ``LMP_INC`` variable in your machine makefile. + You may have to manually run the cythonize command on .pyx file(s) + in the ``src`` folder, if this is not automatically done during + installing the MLIAP package. Please do **not** run ``cythonize`` + in the ``src/MLIAP`` folder, as that can lead to compilation errors + if PYTHON support is not included. + If you did by accident, please remove the generated .cpp and .h files. ---------- diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index 3fb906addf..e044adfcb3 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -668,8 +668,9 @@ A general interface for machine-learning interatomic potentials, including PyTor To use this package, also the :ref:`SNAP package ` package needs to be installed. To make the *mliappy* model available, also the -:ref:`PYTHON package ` package needs to be installed and the version of -python must be 3.5 or later. +:ref:`PYTHON package ` package needs to be installed, the version of +Python must be 3.6 or later, and the `cython `_ software +must be installed. **Author:** Aidan Thompson (Sandia), Nicholas Lubbers (LANL). @@ -682,9 +683,10 @@ python must be 3.5 or later. * examples/mliap (see README) When built with the *mliappy* model this package includes an extension for -coupling with python models, including PyTorch. -In this case, the python interpreter linked to LAMMPS will need cython and numpy installed. -The examples build models with PyTorch, which would thus need to be installed. +coupling with Python models, including PyTorch. In this case, the Python +interpreter linked to LAMMPS will need the ``cython`` and ``numpy`` modules +installed. The provided examples build models with PyTorch, which would +therefore also needs to be installed to run those examples. ----------