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
- [Run path-integral MD with i-PI](#run-path-integral-md-with-i-pi)
35
+
- [Use deep potential with ASE](#use-deep-potential-with-ase)
32
36
-[Troubleshooting](#troubleshooting)
33
37
34
38
# About DeePMD-kit
@@ -83,11 +87,29 @@ In addition to building up potential energy models, DeePMD-kit can also be used
83
87
84
88
Please follow our [github](https://github.com/deepmodeling/deepmd-kit) webpage to see the latest released version and development version.
85
89
86
-
## Install the python interface
90
+
## Easy installation methods
91
+
There various easy methods to install DeePMD-kit. Choose one that you prefer. If you want to build by yourself, jump to the next two sections.
92
+
93
+
### With Docker
94
+
A docker for installing the DeePMD-kit on CentOS 7 is available [here](https://github.com/frankhan91/deepmd-kit_docker).
95
+
96
+
### With conda
97
+
DeePMD-kit is avaiable with [conda](https://github.com/conda/conda). Install [Anaconda](https://www.anaconda.com/distribution/#download-section) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) first.
A docker for installing the DeePMD-kit on CentOS 7 is available [here](https://github.com/frankhan91/deepmd-kit_docker). We are currently working on installation methods using the `conda` package management system and `pip` tools. Hope these will come out soon.
104
+
To install the GPU version containing [CUDA 10.0](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver):
If one downloads the .zip file from the github, then the default folder of source code would be `deepmd-kit-master` rather than `deepmd-kit`. For convenience, you may want to record the location of source to a variable, saying `deepmd_source_dir` by
127
157
```bash
@@ -483,7 +513,7 @@ Running an MD simulation with LAMMPS is simpler. In the LAMMPS input file, one n
483
513
pair_style deepmd graph.pb
484
514
pair_coeff
485
515
```
486
-
where `graph.pb` is the file name of the frozen model. The `pair_coeff` should be left blank. It should be noted that LAMMPS counts atom types starting from 1, therefore, all LAMMPS atom type will be firstly subtracted by 1, and then passed into the DeePMD-kit engine to compute the interactions. A detailed documentation of this pair style is [here](doc/lammps-pair-style-deepmd.md).
516
+
where `graph.pb` is the file name of the frozen model. The `pair_coeff` should be left blank. It should be noted that LAMMPS counts atom types starting from 1, therefore, all LAMMPS atom type will be firstly subtracted by 1, and then passed into the DeePMD-kit engine to compute the interactions. [A detailed documentation of this pair style is available.](doc/lammps-pair-style-deepmd.md).
487
517
488
518
### Long-range interaction
489
519
The reciprocal space part of the long-range interaction can be calculated by LAMMPS command `kspace_style`. To use it with DeePMD-kit, one writes
@@ -524,6 +554,30 @@ The option **`graph_file`** provides the file name of the frozen model.
524
554
525
555
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`**.
526
556
557
+
## Use deep potential with ASE
558
+
559
+
Deep potential can be set up as a calculator with ASE to obtain potential energies and forces.
560
+
```python
561
+
from ase import Atoms
562
+
from deepmd.calculator importDP
563
+
564
+
water = Atoms('H2O',
565
+
positions=[(0.7601, 1.9270, 1),
566
+
(1.9575, 1, 1),
567
+
(1., 1., 1.)],
568
+
cell=[100, 100, 100],
569
+
calculator=DP(model="frozen_model.pb"))
570
+
print(water.get_potential_energy())
571
+
print(water.get_forces())
572
+
```
573
+
574
+
Optimization is also available:
575
+
```python
576
+
from ase.optimize importBFGS
577
+
dyn = BFGS(water)
578
+
dyn.run(fmax=1e-6)
579
+
print(water.get_positions())
580
+
```
527
581
528
582
# Troubleshooting
529
583
In consequence of various differences of computers or systems, problems may occur. Some common circumstances are listed as follows.
@@ -533,11 +587,7 @@ If other unexpected problems occur, you're welcome to contact us for help.
533
587
534
588
When the version of DeePMD-kit used to training model is different from the that of DeePMD-kit running MDs, one has the problem of model compatability.
535
589
536
-
DeePMD-kit guarantees that the codes with the same major and minor revisions are compatible. That is to say v0.12.5 is compatible to v0.12.0, but is not compatible to v0.11.0. When way of fixing it is to restart the training with the new revisions and a slightly increased `stop_batch`, say 1,000,000 to 1,001,000 if the `save_freq` was set to 1,000. Typically one runs
537
-
```bash
538
-
dp train --restart model.ckpt revised_input.json
539
-
```
540
-
and freeze the new model.
590
+
DeePMD-kit guarantees that the codes with the same major and minor revisions are compatible. That is to say v0.12.5 is compatible to v0.12.0, but is not compatible to v0.11.0 nor v1.0.0.
541
591
542
592
## Installation: inadequate versions of gcc/g++
543
593
Sometimes you may use a gcc/g++ of version <4.9. If you have a gcc/g++ of version > 4.9, say, 7.2.0, you may choose to use it by doing
Copy file name to clipboardExpand all lines: doc/lammps-pair-style-deepmd.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,13 @@ This pair style takes the deep potential defined in a model file that usually ha
35
35
36
36
The model deviation evalulate the consistency of the force predictions from multiple models. By default, only the maximal, minimal and averge model deviations are output. If the key `atomic` is set, then the model deviation of force prediction of each atom will be output.
37
37
38
-
By default, the model deviation is output in absolute value. If the keyword `relative` is set, then the relative model deviation will be output, which is defined by
38
+
By default, the model deviation is output in absolute value. If the keyword `relative` is set, then the relative model deviation will be output. The relative model deviation of the force on atom `i` is defined by
39
39
```math
40
-
|Df|
41
-
Ef = -------------
42
-
|f| + level
40
+
|Df_i|
41
+
Ef_i = -------------
42
+
|f_i| + level
43
43
```
44
-
where `Df` is the model deviation of a force, `|f|` is the norm of the force and `level` is provided as the parameter of the keyword `relative`.
44
+
where `Df_i` is the absolute model deviation of the force on atom `i`, `|f_i|` is the norm of the the force and `level` is provided as the parameter of the keyword `relative`.
45
45
46
46
47
47
## Restrictions
@@ -50,6 +50,8 @@ where `Df` is the model deviation of a force, `|f|` is the norm of the force and
50
50
51
51
- The `atom_style` of the system should be `atomic`.
52
52
53
+
- When using the `atomic` key word of `deepmd` is set, one should not use this pair style with MPI parallelization.
0 commit comments