Skip to content

Commit

Permalink
chore: update doc lammps isntallation
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Mar 1, 2024
1 parent 54efc03 commit 5628e86
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
17 changes: 15 additions & 2 deletions doc/install/install-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,23 @@ If you specify `-DUSE_TF_PYTHON_LIBS=FALSE`, you need to give the location where

I assume you have installed the PyTorch (either Python or C++ interface) to `$torch_root`, then execute CMake
```bash
cmake -DENABLE_PYTORCH=TRUE -DCMAKE_PREFIX_PATH=$torch_root -DCMAKE_INSTALL_PREFIX=$deepmd_root ..
cmake -DENABLE_PYTORCH=TRUE -DCMAKE_PREFIX_PATH=$torch_root -DCMAKE_INSTALL_PREFIX=$deepmd_source_dir ..
```
:::

Alternatively, one can use the installation scripts provided by DeepMD-kit by executing the following commands:
```bash
export CMAKE_PREFIX_PATH=$libtorch_root
```
and if use GPU, add
```bash
export DP_VARIANT=cuda
```
then

```bash
$deepmd_source_dir/source/install/build_cc.sh
```
:::
::::

One may add the following arguments to `cmake`:
Expand Down
8 changes: 7 additions & 1 deletion doc/install/install-lammps.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ There are two ways to install LAMMPS: the built-in mode and the plugin mode. The
## Install LAMMPS's DeePMD-kit module (built-in mode)
Before following this section, [DeePMD-kit C++ interface](install-from-source.md) should have be installed.

DeePMD-kit provides a module for running MD simulations with LAMMPS. Now make the DeePMD-kit module for LAMMPS.
DeePMD-kit provides an easy installation script, one can simply run the following command to isntall LAMMPS:

```bash
$deepmd_source_dir/source/install/build_lammps.sh
```

Alternatively, manual installation is also supported. DeePMD-kit provides a module for running MD simulations with LAMMPS. Now make the DeePMD-kit module for LAMMPS.

```bash
cd $deepmd_source_dir/source/build
Expand Down

0 comments on commit 5628e86

Please sign in to comment.