File: deepmd.md

package info (click to toggle)
cp2k 2025.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 366,832 kB
  • sloc: fortran: 955,049; f90: 21,676; ansic: 18,058; python: 13,378; sh: 12,179; xml: 2,173; makefile: 964; pascal: 845; perl: 492; lisp: 272; cpp: 137; csh: 16
file content (47 lines) | stat: -rw-r--r-- 2,032 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# DeePMD-kit

DeePMD-kit is a package written in Python/C++, designed to minimize the effort required to build
deep learning-based models of interatomic potential energy and force field and to perform molecular
dynamics (MD). This brings new hopes to addressing the accuracy-versus-efficiency dilemma in
molecular simulations. Applications of DeePMD-kit span from finite molecules to extended systems and
from metallic systems to chemically bonded systems.

## Input Section

Inference in CP2K is performed through the
[DEEPMD](#CP2K_INPUT.FORCE_EVAL.MM.FORCEFIELD.NONBONDED.DEEPMD) section. As an example, the relevant
section for DeePMD-kit is:

```none
&DEEPMD
  ATOMS W
  ATOMS_DEEPMD_TYPE 0
  POT_FILE_NAME DeePMD/W.pb
&END DEEPMD
```

where the `W.pb` refers to the DeePMD model that was deployed using DeePMD-kit. An example for the
full input file can be found and on the regtests, see
[DeePMD_W.inp](https://github.com/cp2k/cp2k/blob/master/tests/Fist/regtest-deepmd/DeePMD_W.inp)

### Input details

The tag [ATOMS](#CP2K_INPUT.FORCE_EVAL.MM.FORCEFIELD.NONBONDED.DEEPMD.ATOMS) expects a list of
elements/kinds and
[ATOMS_DEEPMD_TYPE](#CP2K_INPUT.FORCE_EVAL.MM.FORCEFIELD.NONBONDED.DEEPMD.ATOMS_DEEPMD_TYPE) expects
a list of their index that is consistent with the `type_map` in DeePMD-kit parameters. If this is
not done unphysical results will be obtained. Spotting such issues is quite straightforward as the
energy is significantly wrong.

## Compiling CP2K with Libdeepmd_c

Running with DeePMD-kit requires compiling CP2K with the libdeepmd_c library. For the CP2K binaries,
please install the toolchain using the flag `--with-deepmd`, which would download libdeepmd_c from
DeePMD-kit Github release and compile. GPU support is enabled when CUDA envrionment exists.

## Further Resources

For additional references on Deep Potential and DeePMD-kit see:

- DeepMD paper [](#Wang2018), [](#Zeng2023) and code <https://github.com/deepmodeling/deepmd-kit>
- [DeepModeling documentations](https://docs.deepmodeling.com/)