update MLIAP readme files

This commit is contained in:
Axel Kohlmeyer
2020-12-09 10:28:40 -05:00
parent 50a9ac92a7
commit f7e0fbf064
2 changed files with 14 additions and 11 deletions

View File

@ -17,8 +17,8 @@ From that point you can run the example lmp -in in.mliap.pytorch.Ta06A -echo bot
2: Running models from python with LAMMPS in library mode: mliap_pytorch_Ta06A.py
Before testing this, ensure that the first example (using LAMMPS executable) works.
Also, not all python installations support this mode of operation.
It requires that the Python interpreter be initialized.
Also, not all python installations support this mode of operation.
It requires that the Python interpreter be initialized.
To check this for your Python library,
run the Py_IsInitialized() method.
If the return value is True, you should be able to run the example,

View File

@ -32,14 +32,17 @@ potentials, see the examples in FitSNAP https://github.com/FitSNAP/FitSNAP>.
*Additional instructions for compiling PyTorch energy models*
The *MLIAPPY* extension written by Nick Lubbers (LANL)
provides a coupling to PyTorch energy models.
provides a coupling to PyTorch energy models. This should be automatically
enabled by default if the prerequisite software is installed. It can be
enforced during CMake configuration by setting the variable
MLIAP_ENABLE_PYTHON=yes or for conventional build by adding -DMLIAP_PYTHON
to the LMP_INC variable in your makefile and running the cythonize script
on the .pyx file(s) copied to the src folder.
Before compiling LAMMPS with either make or cmake, you have
to run cythonize to create the coupling source files
in the src/MLIAP directory e.g.
This requires to also install the PYTHON package and have the cython
(https://cython.org) software installed. During configuration/compilation
the cythonize script will be used to convert the provided .pyx file(s)
to C++ code. Please do not run the cythonize script in the src/MLIAP folder.
If you have done so by accident, you need to delete the generated .cpp and .h
file(s) in the src/MLIAP folder or there may be problems during compilation.
cd src/MLIAP
cythonize mliap_model_python_couple.pyx
After that, install the MLIAP package with make or cmake
and build LAMMPS.