You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# LAMMPS pair style for NequIP
2
2
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.
4
4
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.
6
8
7
9
## Pre-requisites
8
10
@@ -14,7 +16,7 @@ This pair style allows you to use NequIP models in LAMMPS simulations.
14
16
pair_style nequip
15
17
pair_coeff * * deployed.pth <type name 1> <type name 2> ...
16
18
```
17
-
where `deployed.pth` is the filename of your trained model.
19
+
where `deployed.pth` is the filename of your trained, **deployed** model.
18
20
19
21
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!).
20
22
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`.
91
93
make -j$(nproc)
92
94
```
93
95
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