DeePMD

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

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

hf download OneScience-Group/DeePMD 
cd deepmd

Install the Runtime Environment

DCU environment

# 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

# 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

# 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:

hf download OneScience-Group/DeePMD --repo-type dataset

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

Training

Single GPU:

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

Multiple GPUs:

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

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.

中文说明

模型简介

DeePMD 是一套深度势分子动力学模型生态,用于训练原子体系的机器学习势函数(machine learning potential)。它提供了基于 PyTorch 和 TensorFlow 后端的最小可运行训练入口。

参考实现为 DeepMD-kit

模型描述

DeePMD 使用深度神经网络架构和原子体系数据,为分子和材料体系训练原子间势,并进行分子动力学模拟。

使用场景

使用场景 说明
DeePMD 水体系训练 使用 demo/water_se_e2_a_pt/input_torch.json 等配置训练水体系势函数
多 GPU SLURM 作业 参见 demo/water_se_e2_a_pt/submit_4card.sh 和 submit_8card.sh
环境连通性检查 运行 dp_install.sh 验证是否可以安装 DeepMD-kit
自定义数据迁移 将配置中的 systems 路径替换为自己的 DeepMD NumPy 数据路径

使用方法

1. 使用 OneCode

在 OneCode 在线环境中体验智能一键 AI4S 编程。

体验智能一键 AI4S 编程

2. 手动安装与使用

硬件要求

  • 建议使用 GPU 或 DCU 进行训练。
  • 可使用 CPU 检查安装和进行小数据量连通性测试,完整训练的速度会较慢。
  • DCU 用户须提前安装 DTK。建议使用 DTK 25.04.2 或更高版本,或使用 OneScience 推荐且与当前集群匹配的版本。

下载模型包

hf download OneScience-Group/DeePMD 
cd deepmd

安装运行环境

DCU 环境

# 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 环境

# 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

安装 DeepMD-kit

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

训练数据

本仓库未附带训练数据。以 DeePMD 水体系数据集为例,从 Hugging Face 下载到仓库根目录下的 data/。

hf download OneScience-Group/DeePMD --repo-type dataset

下载后,数据位于 data/DeePMD/water/data_0..3/。

训练

单 GPU

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

多 GPU

cd demo/water_se_e2_a_pt
bash submit_4card.sh

训练权重

本仓库当前不包含训练权重。可按上述流程训练获得。

OneScience 官方资源

引用与许可证

  • DeePMD 示例代码来自 OneScience 项目中的 MatChem 示例,并参考了上游 DeepMD-kit 项目。DeepMD-kit 的许可证见其官方上游仓库。
  • 如果在研究中使用 DeePMD 的训练结果,请引用 DeepMD-kit、相关 OneScience 项目和所使用的数据集。
Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train OneScience-Group/DeePMD