Skip to content

Commit b3680ef

Browse files
add FAQ
1 parent 09a850c commit b3680ef

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# LAMMPS pair style for NequIP
22

3-
This pair style allows you to use NequIP models in LAMMPS simulations.
3+
This pair style allows you to use NequIP models from the [`nequip`](https://github.com/mir-group/nequip) framework in LAMMPS simulations. For more details on NequIP and the Python code, please visit the [`nequip`](https://github.com/mir-group/nequip) repository.
44

5-
*Note: MPI is not supported due to the message-passing nature of the network.*
5+
*Please Note: MPI is not supported due to the message-passing nature of the network. For MPI support with large numbers of atoms, please consider our [Allegro model](https://github.com/mir-group/allegro) and corresponding [`pair_allegro`](https://github.com/mir-group/pair_allegro) LAMMPS plugin.*
6+
7+
`pair_nequip` authors: **Anders Johansson**, Albert Musaelian, Lixin Sun.
68

79
## Pre-requisites
810

@@ -14,7 +16,7 @@ This pair style allows you to use NequIP models in LAMMPS simulations.
1416
pair_style nequip
1517
pair_coeff * * deployed.pth <type name 1> <type name 2> ...
1618
```
17-
where `deployed.pth` is the filename of your trained model.
19+
where `deployed.pth` is the filename of your trained, **deployed** model.
1820

1921
The names after the model path `deployed.pth` indicate, in order, the names of the NequIP model's atom types to use for LAMMPS atom types 1, 2, and so on. The number of names given must be equal to the number of atom types in the LAMMPS configuration (not the NequIP model!).
2022
The given names must be consistent with the names specified in the NequIP training YAML in `chemical_symbol_to_type` or `type_names`.
@@ -91,3 +93,19 @@ if using plain Python and `pip`.
9193
make -j$(nproc)
9294
```
9395
This gives `lammps/build/lmp`, which can be run as usual with `/path/to/lmp -in in.script`. If you specify `-DCMAKE_INSTALL_PREFIX=/somewhere/in/$PATH` (the default is `$HOME/.local`), you can do `make install` and just run `lmp -in in.script`.
96+
97+
## FAQ
98+
99+
1. Q: My simulation is immediately or bizzarely unstable
100+
101+
A: Please ensure that your mapping from LAMMPS atom types to NequIP atom types, specified in the `pair_coeff` line, is correct.
102+
2. Q: I get the following error:
103+
```
104+
instance of 'c10::Error'
105+
what(): PytorchStreamReader failed locating file constants.pkl: file not found
106+
```
107+
108+
A: Make sure you remembered to deploy (compile) your model using `nequip-deploy`, and that the path to the model given with `pair_coeff` points to a deployed model `.pth` file, **not** a file containing only weights like `best_model.pth`.
109+
3. Q: The output pressures and stresses seem wrong / my NPT simulation is broken
110+
111+
A: NPT/stress support in LAMMPS for `pair_nequip` is in-progress on the `stress` branch and is not yet finished.

0 commit comments

Comments
 (0)