DeePMD-kit v2: A software package for deep potential models

Jinzhe Zeng, Duo Zhang, Denghui Lu, Pinghui Mo, Zeyu Li, Yixiao Chen, Marián Rynik, Liang Huang, Ziyao Li, Shaochen Shi, Yingze Wang, Haotian Ye, Ping Tuo, Jiabin Yang, Ye Ding, Yifan Li, Davide Tisi, Qiyu Zeng, Han Bao, Yu Xia, Jiameng Huang, Koki Muraoka, Yibo Wang, Junhan Chang, Fengbo Yuan, Sigbjørn Løland Bore, Chun Cai, Yin‐Nian Lin, Bo Wang, Jiayan Xu, Jiaxin Zhu, Chenxing Luo, Yuzhi Zhang, Rhys E. A. Goodall, Wenshuo Liang, Anurag Kumar Singh, Sikai Yao, Jingchao Zhang, Renata M. Wentzcovitch, Jiequn Han, Jie Liu, Weile Jia, Darrin M. York, E Weinan, Roberto Car, Linfeng Zhang, Handong Wang

Abstract

DeePMD-kit is a powerful open-source software package that facilitates molecular dynamics simulations using machine learning potentials (MLP) known as Deep Potential (DP) models. This package, which was released in 2017, has been widely used in the fields of physics, chemistry, biology, and material science for studying atomistic systems. The current version of DeePMD-kit offers numerous advanced features such as DeepPot-SE, attention-based and hybrid descriptors, the ability to fit tensile properties, type embedding, model deviation, Deep Potential - Range Correction (DPRc), Deep Potential Long Range (DPLR), GPU support for customized operators, model compression, non-von Neumann molecular dynamics (NVNMD), and improved usability, including documentation, compiled binary packages, graphical user interfaces (GUI), and application programming interfaces (API). This article presents an overview of the current major version of the DeePMD-kit package, highlighting its features and technical details. Additionally, the article benchmarks the accuracy and efficiency of different models and discusses ongoing developments.

Introduction

In molecular dynamics (MD), researchers have long faced a trade-off between speed and accuracy. Classical force fields are efficient enough to simulate millions of atoms but often lack the fidelity to describe complex chemical reactions. Conversely, ab initio methods like Density Functional Theory (DFT) provide high accuracy but are computationally prohibitive for large systems. Machine Learning Potentials (MLPs) bridge this gap by learning the potential energy surface from quantum data. DeePMD-kit v2 addresses the limitations of early MLPs—such as handling many chemical elements and long-range interactions—by providing a robust, modular, and high-performance framework for "Deep Potential" (DP) models.

Methods

DeePMD-kit v2 utilizes a modular architecture implemented within a TensorFlow framework. The model is fundamentally divided into two stages: inference and training.

The modular architecture of the DeePMD-kit TensorFlow graph, illustrating the separation between inference and training components.

Core Components

  1. Descriptors: These transform raw atomic coordinates into representations that respect physical symmetries (rotation and translation). Version 2 introduces Attention-based descriptors (DPA-1), which utilize self-attention mechanisms to capture complex relationships in multi-element systems.
  2. Fitting Networks: These map descriptors to physical properties such as energy, force, and virials.

Advanced Features

  • Type Embedding: To manage systems with many elements, v2 uses type embedding to share parameters across chemical species, preventing parameter explosion.
  • Long-Range Interactions: Modules like DPLR (Deep Potential Long Range) and DPRc (Range Correction) explicitly handle electrostatics and QM/MM corrections.
  • Model Compression: Neural networks can be compressed into tabulated look-up tables, providing a 1x to 10x speedup during inference.
  • Hardware Acceleration: Support for NVNMD (Non-von Neumann Molecular Dynamics) allows the software to utilize specialized hardware like FPGAs to bypass traditional memory bottlenecks.

Results and Benchmarks

The software was benchmarked across diverse datasets, including water, copper, high-entropy alloys (HEA), and the Open Catalyst 2020 (OC2M) dataset.

  • Accuracy: DP models achieved Root Mean Square Errors (RMSE) comparable to underlying DFT data. In water simulations, energy RMSE was as low as ~0.7 meV/atom.
  • Efficiency: Using single-precision (FP32) instead of double-precision (FP64) provided up to a 2x speedup with negligible accuracy loss.
  • Scalability: The package demonstrated excellent performance across NVIDIA and AMD GPUs, as well as multi-node CPU clusters. Attention-based models specifically showed superior accuracy on complex multi-element datasets like HEA and OC2M.

Discussion and Future Work

While DeePMD-kit v2 represents a significant leap forward, challenges remain. Attention-based descriptors, while accurate, are more computationally expensive than their simpler counterparts. Future development aims to expand model compression to these attention-based models and broaden the chemical species support for specialized hardware like NVNMD. Additionally, the integrated "model deviation" feature enables active learning, allowing the software to identify configurations where it is uncertain and requires more DFT data, streamlining the model improvement process.

Summary updated

BibTeX
@article{zeng2023deepmd,
  author = {Jinzhe Zeng and Duo Zhang and Denghui Lu and Pinghui Mo and Zeyu Li and Yixiao Chen and Marián Rynik and Liang Huang and Ziyao Li and Shaochen Shi and Yingze Wang and Haotian Ye and Ping Tuo and Jiabin Yang and Ye Ding and Yifan Li and Davide Tisi and Qiyu Zeng and Han Bao and Yu Xia and Jiameng Huang and Koki Muraoka and Yibo Wang and Junhan Chang and Fengbo Yuan and Sigbjørn Løland Bore and Chun Cai and Yin‐Nian Lin and Bo Wang and Jiayan Xu and Jiaxin Zhu and Chenxing Luo and Yuzhi Zhang and Rhys E. A. Goodall and Wenshuo Liang and Anurag Kumar Singh and Sikai Yao and Jingchao Zhang and Renata M. Wentzcovitch and Jiequn Han and Jie Liu and Weile Jia and Darrin M. York and E Weinan and Roberto Car and Linfeng Zhang and Handong Wang},
  title = {{DeePMD-kit v2: A software package for deep potential models}},
  journal = {The Journal of Chemical Physics},
  year = {2023},
  doi = {10.1063/5.0155600},
}
Figure