File size: 4,301 Bytes
52c8168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
license: lgpl-3.0
tasks:
  - materials-simulation
  - molecular-dynamics
  - energy-prediction
  - force-prediction
  - training
frameworks:
  - pytorch
language:
  - en
tags:
  - OneScience
  - DeePMD
  - machine-learning-potential
  - molecular-simulation
  - materials-computing
  - DeepMD-kit
  - training
datasets:
  - OneScience-Sugon/DeePMD
---
<p align="center">
  <strong>
    <span style="font-size: 30px;">DeePMD</span>
  </strong>
</p>

# Model Introduction

DeePMD is a Deep Potential Molecular Dynamics model ecosystem for training machine-learning potentials for atomic systems. It provides minimal runnable training entry points based on PyTorch and TensorFlow backends.

Reference implementation: DeepMD-kit

# Model Description

DeePMD uses a deep neural network architecture and atomic-system data to train interatomic potentials for molecular and materials systems and to run molecular dynamics simulations.

# Use Cases

| Use case | Description |
| :---: | :--- |
| DeePMD water training | Train a water potential with configurations such as `demo/water_se_e2_a_pt/input_torch.json` |
| Multi-GPU SLURM jobs | See `demo/water_se_e2_a_pt/submit_4card.sh` and `submit_8card.sh` |
| Environment connectivity check | Run `dp_install.sh` to verify that DeepMD-kit can be installed |
| Custom data migration | Replace the `systems` path in the configuration with your own DeepMD NumPy data |

# Usage

## 1. Using OneCode

Try intelligent, one-click AI4S programming in the OneCode online environment:

[Try intelligent, one-click AI4S programming](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)

## 2. Manual Installation and Usage

**Hardware requirements**

- A GPU or DCU is recommended for training.
- A CPU can be used for installation checks and small-data connectivity tests, but full training will be slow.
- DCU users must install DTK in advance. DTK 25.04.2 or later, or the OneScience-recommended version matching the current cluster, is recommended.

### Download the Model Package

```bash
hf download --model OneScience-Sugon/DeePMD --local-dir ./deepmd
cd deepmd
```

### Install the Runtime Environment

**DCU environment**

```bash
# Activate DTK and conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# uv installation is also supported
pip install onescience[matchem-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai
```

**GPU environment**

```bash
# Activate conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
# uv installation is also supported
pip install onescience[matchem-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai
```

### Install DeepMD-kit

```bash
# The test_pip environment is used by default. To use another conda environment:
# export MATCHEM_CONDA_NAME=your_env
bash dp_install.sh
```

### Training Data

Training data is not bundled with this repository. Using the DeePMD water dataset as an example, download it from Hugging Face to `data/` in the repository root:

```bash
hf download --dataset OneScience-Sugon/DeePMD --local-dir ./data
```

After downloading, the data is located at `data/DeePMD/water/data_0..3/`.

### Training

Single GPU:

```bash
cd demo/water_se_e2_a_pt
dp --pt train input_torch.json
```

Multiple GPUs:

```bash
cd demo/water_se_e2_a_pt
bash submit_4card.sh
```

### Trained Weights

This repository does not currently include trained weights. You can obtain them by following the training procedure above.

# Official OneScience Resources

| Platform | OneScience Main Repository | Skills Repository |
| --- | --- | --- |
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |

# Citation and License

- The DeePMD example code comes from the MatChem examples in the OneScience project and refers to the upstream DeepMD-kit project. See the official upstream repository for the DeepMD-kit license.
- If you use DeePMD training results in research, please cite DeepMD-kit, the relevant OneScience projects, and the datasets used.