update docs for MLIAP some more

This commit is contained in:
Axel Kohlmeyer
2020-12-09 10:28:27 -05:00
parent ddcd5a3c2e
commit 50a9ac92a7
2 changed files with 26 additions and 12 deletions

View File

@ -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 <https://ctyhon.org>`_ software
installed and a working ``cythonize`` command. This requires Python
version 3.6 or later.
Building the MLIAP package requires including the :ref:`SNAP <PKG-SNAP>`
package. There will be an error message if this requirement is not satisfied.
Using the *mliappy* model also requires enabling the :ref:`PYTHON <PKG-PYTHON>`
package **and** requires you have the `cython <https://ctyhon.org>`_ 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.
----------

View File

@ -668,8 +668,9 @@ A general interface for machine-learning interatomic potentials, including PyTor
To use this package, also the :ref:`SNAP package <PKG-SNAP>` package needs
to be installed. To make the *mliappy* model available, also the
:ref:`PYTHON package <PKG-PYTHON>` package needs to be installed and the version of
python must be 3.5 or later.
:ref:`PYTHON package <PKG-PYTHON>` package needs to be installed, the version of
Python must be 3.6 or later, and the `cython <https://cython.org/>`_ 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.
----------