diff --git a/doc/getting-started.md b/doc/getting-started.md
index ecde2c8d64..8a6de86d88 100644
--- a/doc/getting-started.md
+++ b/doc/getting-started.md
@@ -313,9 +313,10 @@ kspace_modify gewald 0.45
Please notice that the DeePMD does nothing to the direct space part of the electrostatic interaction, because this part is assumed to be fitted in the DeePMD model (the direct space cut-off is thus the cut-off of the DeePMD model). The splitting parameter `gewald` is modified by the `kspace_modify` command.
### Run path-integral MD with i-PI
-The i-PI works in a client-server model. The i-PI provides the server for integrating the replica positions of atoms, while the DeePMD-kit provides a client named `dp_ipi` that computes the interactions (including energy, force and virial). The server and client communicates via the Unix domain socket or the Internet socket. The client can be started by
+The i-PI works in a client-server model. The i-PI provides the server for integrating the replica positions of atoms, while the DeePMD-kit provides a client named `dp_ipi` that computes the interactions (including energy, force and virial). The server and client communicates via the Unix domain socket or the Internet socket. Installation instructions of i-PI can be found [here](install.md#install-i-pi). The client can be started by
```bash
-$ dp_ipi water.json
+i-pi input.xml &
+dp_ipi water.json
```
It is noted that multiple instances of the client is allow for computing, in parallel, the interactions of multiple replica of the path-integral MD.
@@ -337,6 +338,11 @@ It is noted that multiple instances of the client is allow for computing, in par
```
The option **`use_unix`** is set to `true` to activate the Unix domain socket, otherwise, the Internet socket is used.
+The option **`port`** should be the same as that in input.xml:
+```xml
+31415
+```
+
The option **`graph_file`** provides the file name of the frozen model.
The `dp_ipi` gets the atom names from an [XYZ file](https://en.wikipedia.org/wiki/XYZ_file_format) provided by **`coord_file`** (meanwhile ignores all coordinates in it), and translates the names to atom types by rules provided by **`atom_type`**.
diff --git a/doc/install.md b/doc/install.md
index 7eca440dee..dea55f2e56 100644
--- a/doc/install.md
+++ b/doc/install.md
@@ -2,6 +2,7 @@
- [Easy installation methods](#easy-installation-methods)
- [Install from source code](#install-from-source-code)
+- [Install i-PI](#install-i-pi)
## Easy installation methods
@@ -217,3 +218,15 @@ The DeePMD-kit module can be removed from LAMMPS source code by
make no-user-deepmd
```
+## Install i-PI
+The i-PI works in a client-server model. The i-PI provides the server for integrating the replica positions of atoms, while the DeePMD-kit provides a client named `dp_ipi` that computes the interactions (including energy, force and virial). The server and client communicates via the Unix domain socket or the Internet socket. A full instruction of i-PI can be found [here](http://ipi-code.org/). The source code and a complete installation instructions of i-PI can be found [here](https://github.com/i-pi/i-pi).
+To use i-PI with already existing drivers, install and update using Pip:
+```bash
+pip install -U i-PI
+```
+
+Test with Pytest:
+```bash
+pip install pytest
+pytest --pyargs ipi.tests
+```
diff --git a/examples/water/ipi/conf.xyz b/examples/water/ipi/conf.xyz
new file mode 100755
index 0000000000..33c7470436
--- /dev/null
+++ b/examples/water/ipi/conf.xyz
@@ -0,0 +1,194 @@
+192
+# CELL(abcABC): 12.44470 12.44470 12.44470 90.0 90.0 90.0 positions{angstrom} cell{angstrom}
+O 11.83 2.56 2.18
+O 5.36 6 1.81
+O 12.17 7.34 2.71
+O 3.38 4.28 4.84
+O 4.54 11.73 11.9
+O 7.34 0.18 2.18
+O 5.73 9.9 10.31
+O 5.32 11.19 1.83
+O 9.39 11.14 1.1
+O 12.06 0.64 8.92
+O 5.01 7.72 11.74
+O 3.64 3.19 1.08
+O 11.88 10.9 4.7
+O 3.88 8.05 2.51
+O 9.82 9.16 10.18
+O 11 5.31 5.17
+O 0.97 4.12 0.84
+O 1.24 5.99 4.76
+O 10.1 9.09 3.32
+O 8.39 5.72 10.39
+O 8.06 4.72 1.3
+O 3.23 3.34 8.26
+O 5.02 6.21 7.29
+O 3.94 10.55 3.95
+O 6.25 4.56 4.21
+O 12.18 2.35 11.11
+O 6.76 8.57 4.07
+O 5.87 5.84 9.79
+O 2.18 6.91 6.99
+O 10.89 7.69 6.78
+O 8.03 4.28 6.57
+O 5.29 1.92 11.56
+O 1.53 12.16 3.45
+O 2.04 5.49 9.71
+O 6.66 9.05 1.21
+O 11.75 6.18 11.01
+O 6.11 3.07 7.96
+O 8.22 1.38 9.43
+O 1.31 2.02 7.09
+O 9.48 2.11 5.92
+O 9.33 3.34 10.97
+O 1.31 8.49 0.81
+O 11.25 3.48 7.51
+O 11.7 0.33 0.6
+O 7.63 2.04 0.28
+O 8.86 9.52 7.4
+O 2.01 11.54 6.89
+O 8.02 11.27 4.66
+O 5.82 9.18 7.71
+O 8.11 11.19 11.22
+O 5.94 0.84 5.91
+O 1.88 11.66 0.64
+O 4.66 11.28 6.73
+O 10.32 6.26 0.89
+O 2.01 11.07 10.33
+O 5.36 2.06 3.14
+O 8.56 7.59 12.17
+O 10.51 5.81 8.66
+O 2.37 6.23 12.1
+O 0.3 8.77 10.05
+O 9.47 12.13 7.57
+O 1.41 2.32 4.17
+O 9.69 3.69 3.56
+O 0.75 9.22 7.39
+H 11.09 2.87 2.74
+H 5.51 5.51 2.6
+H 0.24 6.8 3.29
+H 4.28 4.19 4.46
+H 3.63 11.56 11.76
+H 6.53 12.07 1.99
+H 5.37 9.14 10.85
+H 5.74 10.31 1.64
+H 8.71 11.07 0.41
+H 0.27 1.04 8.27
+H 5.46 7.08 11.15
+H 3.84 4.17 1.06
+H 11.55 10.19 4.15
+H 3 8.17 2.14
+H 9.53 10.04 10.56
+H 11.18 4.84 6.05
+H 0.68 3.76 12.44
+H 0.43 5.51 4.88
+H 9.51 9.48 3.94
+H 9.08 5.89 9.68
+H 7.92 3.83 0.8
+H 4.23 3.22 8.21
+H 5.27 5.9 8.19
+H 4.44 10.9 3.14
+H 6.93 4.56 4.89
+H 11.88 1.61 11.75
+H 6.79 8.54 3.09
+H 5.62 4.99 10.13
+H 3.09 6.66 6.98
+H 11.73 8.22 6.86
+H 8.4 3.45 6.18
+H 4.64 2.37 12.16
+H 0.74 11.69 3.86
+H 1.1 5.3 9.72
+H 7.54 9.11 0.83
+H 11.36 6.2 11.9
+H 5.85 2.21 7.53
+H 8.81 2.01 9.89
+H 2.17 2.43 7.46
+H 10.1 2.53 6.55
+H 9.07 4.29 10.91
+H 0.64 8.13 1.45
+H 11.12 4.2 8.14
+H 11.03 12.03 0.58
+H 6.83 1.84 12.19
+H 9.13 10.45 7.25
+H 1.76 12.44 6.8
+H 7.37 11.88 5.08
+H 5.59 8.29 7.44
+H 8.14 12.12 10.86
+H 5.48 0.06 6.32
+H 0.99 11.99 0.41
+H 4.54 10.95 5.79
+H 10.94 6.29 1.65
+H 2.52 10.55 9.76
+H 4.74 2.41 2.42
+H 8.84 8.27 11.56
+H 10.89 6.06 9.58
+H 2.15 5.99 11.18
+H 0.49 9.06 9.13
+H 8.69 12.34 8.15
+H 1.76 1.44 4.07
+H 10.05 4.44 4.1
+H 1.44 8.49 7.32
+H 12.25 3.32 1.68
+H 6.27 6.22 1.56
+H 11.5 7.85 3.14
+H 2.96 3.44 4.61
+H 5.04 11.17 11.3
+H 7.6 12.39 3.03
+H 5.94 9.68 9.37
+H 4.93 11.46 0.96
+H 8.92 11.68 1.69
+H 12.07 1.36 9.54
+H 4.17 7.28 11.8
+H 2.67 3.09 1.05
+H 11.89 10.59 5.56
+H 4.27 7.23 2.16
+H 10.8 9.22 10.18
+H 10.68 6.2 5.44
+H 1.51 4.9 0.53
+H 1.94 5.36 4.61
+H 10.02 9.64 2.47
+H 8.41 6.43 11.04
+H 8.58 4.29 2.01
+H 3.12 4.28 8.41
+H 5.12 5.54 6.6
+H 3.97 9.58 3.89
+H 6.17 3.63 3.9
+H 11.4 2.92 10.99
+H 5.96 8.02 4.26
+H 6.81 5.9 9.83
+H 1.83 6.59 6.16
+H 10.19 8.36 6.88
+H 8.74 4.67 7.12
+H 4.84 1.08 11.38
+H 2.38 11.71 3.7
+H 2.02 6.1 8.92
+H 6.05 8.48 0.61
+H 12.12 7.05 10.81
+H 6.81 3.46 7.31
+H 7.52 1.99 9.1
+H 1.25 2.26 6.18
+H 9.31 1.19 6.35
+H 8.84 2.9 11.69
+H 1.39 9.44 0.85
+H 12.13 3.22 7.5
+H 11.38 0.95 1.34
+H 7.43 1.82 1.24
+H 9.15 9.43 8.28
+H 2.97 11.66 6.88
+H 7.5 10.43 4.47
+H 6.69 9.4 7.47
+H 7.29 10.77 10.93
+H 5.45 1.07 5.12
+H 1.92 11.57 1.62
+H 5.05 10.55 7.26
+H 9.73 5.52 1.11
+H 1.73 11.85 9.82
+H 6.02 1.57 2.67
+H 9.34 7.2 0.21
+H 10.71 6.56 7.97
+H 1.86 7.03 12.37
+H 1.08 9.16 10.59
+H 10.19 12.39 8.15
+H 0.92 2.56 3.28
+H 9.34 3.01 4.17
+H 1.11 10.09 7.21
diff --git a/examples/water/ipi/input.xml b/examples/water/ipi/input.xml
new file mode 100755
index 0000000000..fa2e244772
--- /dev/null
+++ b/examples/water/ipi/input.xml
@@ -0,0 +1,58 @@
+
+
+ 2000000
+
+ 31415
+
+
+ localhost
+ 0.001
+ 31415
+
+
+
+ conf.xyz
+ 300
+
+
+
+
+
+
+ 0.5
+
+
+
+ [ 1.119252684345e-2, 8.975945537096e-6, -2.728650447177e-5, -7.011051989908e-4, 8.414373543550e-3,
+ 1.194065829660e-7, 1.071876106695e-6, -9.439643019253e-6, -1.329262116026e-5, -2.667325152958e-6,
+ 2.161979961890e-4, 9.439643019253e-6, 4.639122293442e-5, 4.329184279724e-6, 8.132076333400e-5,
+ -7.322257663569e-4, 1.329262116026e-5, -4.329184279724e-6, 5.173717780694e-4, 1.590872642196e-5,
+ 8.299189140989e-3, 2.667325152958e-6, -8.132076333400e-5, -1.590872642196e-5, 6.992095202254e-3
+ ]
+
+
+ 1000
+
+
+
+ [ 1.119252684345e-2, 8.975945537096e-6, -2.728650447177e-5, -7.011051989908e-4, 8.414373543550e-3,
+ 1.194065829660e-7, 1.071876106695e-6, -9.439643019253e-6, -1.329262116026e-5, -2.667325152958e-6,
+ 2.161979961890e-4, 9.439643019253e-6, 4.639122293442e-5, 4.329184279724e-6, 8.132076333400e-5,
+ -7.322257663569e-4, 1.329262116026e-5, -4.329184279724e-6, 5.173717780694e-4, 1.590872642196e-5,
+ 8.299189140989e-3, 2.667325152958e-6, -8.132076333400e-5, -1.590872642196e-5, 6.992095202254e-3
+ ]
+
+
+
+
+
+ 300
+ 0.1013
+
+
+