DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics

Han WangLinfeng ZhangJiequn HanWeinan E

article2017Computer Physics Communications1,930 citations

Introduces DeePMD-kit, an open-source software package that trains neural network potential energy models from first-principles data and interfaces directly with engines like LAMMPS to enable quantum-accurate molecular dynamics simulations at scale.

Listen

Molecular simulations are vital for modeling materials and chemical processes, yet researchers routinely face a trade-off between computational accuracy and efficiency. High-accuracy quantum mechanical calculations, such as density functional theory, are computationally expensive and limited to small systems and short timescales. Conversely, empirical force fields allow large-scale simulations but often lack physical accuracy and transferability. To overcome these constraints, machine learning methods have emerged to represent potential energy surfaces accurately, but implementing these models into practical simulation workflows has historically required significant engineering effort.

The article demonstrates DeePMD-kit, an open-source software package designed to automate the training of deep learning potential energy models and streamline their deployment in molecular dynamics simulations.

DeePMD-kit bridges the machine learning framework TensorFlow with established molecular simulation software, specifically LAMMPS for classical dynamics and i-PI for path-integral simulations. The package transforms atomic coordinate data into symmetric descriptors using C++ modules integrated directly into TensorFlow. The authors tested and validated the software using a dataset of 40,000 frames from an ab initio liquid water simulation containing 64 molecules, training a deep neural network on 38,000 frames and evaluating it against 2,000 testing frames.

The findings show that DeePMD-kit successfully trained a 5-layer neural network model on a standard desktop CPU in 16 hours. On the held-out test dataset, the model achieved high accuracy, yielding relative errors of 4.3% in energy and 2.9% in atomic forces relative to the data standard deviation. When executed inside LAMMPS for a 200-picosecond molecular dynamics simulation, the trained model accurately reproduced key physical properties, including radial distribution functions and tetrahedral packing order parameters, in close agreement with the original quantum mechanical calculations.

These results indicate that DeePMD-kit significantly lowers the barrier to performing quantum-accurate simulations across large system sizes and extended timelines. By providing standardized data pipelines and native integration with major simulation engines, the package reduces the manual setup and software engineering overhead needed to deploy deep learning models in molecular modeling projects.

Organizations and research teams seeking quantum-level precision at reduced computational cost should consider adopting DeePMD-kit for potential energy surface modeling. Future software improvements outlined in the article will focus on adding parallel CPU multicore and GPU multithreading support for descriptor calculations during simulations.

A primary limitation of the current release is that descriptor evaluations during live molecular dynamics runs operate only in serial mode on CPUs, which constrains real-time simulation throughput. In addition, the predictive accuracy of the model depends heavily on the quality and scope of the underlying quantum mechanical training data.

Cover for DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics

Abstract

Recent developments in many-body potential energy representation via deep learning have brought new hopes to addressing the accuracy-versus-efficiency dilemma in molecular simulations. Here we describe DeePMD-kit, a package written in Python/C++ that has been designed to minimize the effort required to build deep learning based representation of potential energy and force field and to perform molecular dynamics. Potential applications of DeePMD-kit span from finite molecules to extended systems and from metallic systems to chemically bonded systems. DeePMD-kit is interfaced with TensorFlow, one of the most popular deep learning frameworks, making the training process highly automatic and efficient. On the other end, DeePMD-kit is interfaced with high-performance classical molecular dynamics and quantum (path-integral) molecular dynamics packages, i.e., LAMMPS and the i-PI, respectively. Thus, upon training, the potential energy and force field models can be used to perform efficient molecular simulations for different purposes. As an example of the many potential applications of the package, we use DeePMD-kit to learn the interatomic potential energy and forces of a water model using data obtained from density functional theory. We demonstrate that the resulted molecular dynamics model reproduces accurately the structural information contained in the original model.

Table of Contents

  • I Introduction
  • II Theory
  • III Software
  • III.1 Data preparation
  • III.2 Model training
  • III.3 Model testing
  • III.4 Molecular dynamics
  • IV Example
  • V Conclusion and future work
  • VI acknowledgments
  • References
  • A Deriviation of force and virial

Knowls

  1. Knowl 1 — DeePMD Potential Energy Decomposition and Local Frame Atomic Descriptors

    model/method

    In the DeePMD method, the total potential energy EE of a system consisting of NN atoms at coordinates {R1,…,RN}\{\mathbf{R}_1, \dots, \mathbf{R}_N\} with Ri∈R3\mathbf{R}_i \in \mathbb{R}^3 is decomposed into a sum of local atomic energy contributions:

    E=∑i=1NEi,Ei=Es(i)(Ri,{Rj∣j∈NRc(i)})E = \sum_{i=1}^N E_i, \quad E_i = E_{s(i)}(\mathbf{R}_i, \{\mathbf{R}_j \mid j \in N_{R_c}(i)\})

    where s(i)s(i) denotes the chemical species of atom ii, and NRc(i)={j∣∣Rij∣=∣Ri−Rj∣≤Rc,j≠i}N_{R_c}(i) = \{j \mid |\mathbf{R}_{ij}| = |\mathbf{R}_i - \mathbf{R}_j| \le R_c, j \ne i\} is the set of neighbor atoms within a cutoff radius RcR_c.

    To preserve translational, rotational, and permutational symmetries:

    1. Translational symmetry is preserved by using relative displacement vectors Rij=Ri−Rj=xij0ex0+yij0ey0+zij0ez0\mathbf{R}_{ij} = \mathbf{R}_i - \mathbf{R}_j = x^0_{ij}\mathbf{e}^0_x + y^0_{ij}\mathbf{e}^0_y + z^0_{ij}\mathbf{e}^0_z in the global laboratory frame {ex0,ey0,ez0}\{\mathbf{e}^0_x, \mathbf{e}^0_y, \mathbf{e}^0_z\}.
    2. Rotational symmetry is preserved by constructing a local coordinate frame {ei1,ei2,ei3}\{\mathbf{e}_{i1}, \mathbf{e}_{i2}, \mathbf{e}_{i3}\} using two reference neighbor atoms a(i),b(i)∈NRc(i)a(i), b(i) \in N_{R_c}(i) chosen according to predefined rules:

    ei1=e(Ria(i))\mathbf{e}_{i1} = \mathbf{e}(\mathbf{R}_{ia(i)})

    ei2=e(Rib(i)−(Rib(i)⋅ei1)ei1)\mathbf{e}_{i2} = \mathbf{e}\left(\mathbf{R}_{ib(i)} - (\mathbf{R}_{ib(i)} \cdot \mathbf{e}_{i1})\mathbf{e}_{i1}\right)

    ei3=ei1×ei2\mathbf{e}_{i3} = \mathbf{e}_{i1} \times \mathbf{e}_{i2}

    where e(R)=R/∣R∣\mathbf{e}(\mathbf{R}) = \mathbf{R}/|\mathbf{R}|. The local coordinates (xij,yij,zij)(x_{ij}, y_{ij}, z_{ij}) are obtained via the rotation matrix R(Ria(i),Rib(i))=[ei1,ei2,ei3]\mathcal{R}(\mathbf{R}_{ia(i)}, \mathbf{R}_{ib(i)}) = [\mathbf{e}_{i1}, \mathbf{e}_{i2}, \mathbf{e}_{i3}]:

    (xij,yij,zij)=(xij0,yij0,zij0)⋅R(Ria(i),Rib(i))(x_{ij}, y_{ij}, z_{ij}) = (x^0_{ij}, y^0_{ij}, z^0_{ij}) \cdot \mathcal{R}(\mathbf{R}_{ia(i)}, \mathbf{R}_{ib(i)})

    1. Atomic descriptors for atom ii given neighbor jj are defined as:

    {Dijα}={{1Rij,xijRij,yijRij,zijRij},full information (α=0,1,2,3){1Rij},radial-only information (α=0)\{D_{ij}^\alpha\} = \begin{cases} \left\{ \frac{1}{R_{ij}}, \frac{x_{ij}}{R_{ij}}, \frac{y_{ij}}{R_{ij}}, \frac{z_{ij}}{R_{ij}} \right\}, & \text{full information } (\alpha = 0,1,2,3) \\ \left\{ \frac{1}{R_{ij}} \right\}, & \text{radial-only information } (\alpha = 0) \end{cases}

    1. Permutational symmetry is enforced by sorting neighbor indices jj in the descriptor vector Di\mathbf{D}_i first by chemical species and then by descending inverse distance 1/Rij1/R_{ij} within each species.
  2. Knowl 2 — Deep Neural Network Architecture for Atomic Potential Energy

    model/method

    The atomic potential energy Es(i)E_{s(i)} for an atom ii of chemical species s(i)s(i) is parameterized as a function of its descriptor vector Di\mathbf{D}_i via a feedforward deep neural network (DNN) Ns(i)\mathcal{N}_{s(i)}:

    Es(i)=Ns(i)(Di)=Ls(i)out∘Ls(i)Nh∘Ls(i)Nh−1∘⋯∘Ls(i)1(Di)E_{s(i)} = \mathcal{N}_{s(i)}(\mathbf{D}_i) = \mathcal{L}_{s(i)}^{\mathrm{out}} \circ \mathcal{L}_{s(i)}^{N_h} \circ \mathcal{L}_{s(i)}^{N_h-1} \circ \dots \circ \mathcal{L}_{s(i)}^1(\mathbf{D}_i)

    where NhN_h is the number of hidden layers, and ∘\circ denotes function composition.

    Each hidden layer p∈{1,…,Nh}p \in \{1, \dots, N_h\} maps the activations dip−1∈RMp−1\mathbf{d}_i^{p-1} \in \mathbb{R}^{M_{p-1}} from layer p−1p-1 (with di0=Di\mathbf{d}_i^0 = \mathbf{D}_i) to dip∈RMp\mathbf{d}_i^p \in \mathbb{R}^{M_p} using a linear transformation followed by an element-wise hyperbolic tangent activation function ϕ(x)=tanh⁡(x)\phi(x) = \tanh(x):

    dip=Ls(i)p(dip−1)=ϕ(Ws(i)pdip−1+bs(i)p)\mathbf{d}_i^p = \mathcal{L}_{s(i)}^p(\mathbf{d}_i^{p-1}) = \phi\left(\mathbf{W}_{s(i)}^p \mathbf{d}_i^{p-1} + \mathbf{b}_{s(i)}^p\right)

    where Ws(i)p∈RMp×Mp−1\mathbf{W}_{s(i)}^p \in \mathbb{R}^{M_p \times M_{p-1}} is the weight matrix and bs(i)p∈RMp\mathbf{b}_{s(i)}^p \in \mathbb{R}^{M_p} is the bias vector.

    The final layer Ls(i)out\mathcal{L}_{s(i)}^{\mathrm{out}} is a linear output mapping:

    Es(i)=Ls(i)out(diNh)=Ws(i)outdiNh+bs(i)outE_{s(i)} = \mathcal{L}_{s(i)}^{\mathrm{out}}(\mathbf{d}_i^{N_h}) = \mathbf{W}_{s(i)}^{\mathrm{out}} \mathbf{d}_i^{N_h} + b_{s(i)}^{\mathrm{out}}

    where Ws(i)out∈R1×MNh\mathbf{W}_{s(i)}^{\mathrm{out}} \in \mathbb{R}^{1 \times M_{N_h}} is the output weight vector and bs(i)out∈Rb_{s(i)}^{\mathrm{out}} \in \mathbb{R} is the output scalar bias.

  3. Knowl 3 — Analytical Interatomic Force Formulation in DeePMD

    equation

    The total interatomic force Fi\mathbf{F}_i acting on atom ii is calculated analytically by taking the negative gradient of the total potential energy E=∑jEj=∑jNs(j)(Dj)E = \sum_j E_j = \sum_j \mathcal{N}_{s(j)}(\mathbf{D}_j) with respect to atomic position Ri\mathbf{R}_i:

    Fi=−∂E∂Ri=−∑j∈N(i),α∂Ns(i)∂Dijα∂Dijα∂Ri−∑j≠i∑k∈N(j),αδi,a(j)∂Ns(j)∂Djkα∂Djkα∂Ri−∑j≠i∑k∈N(j),αδi,b(j)∂Ns(j)∂Djkα∂Djkα∂Ri−∑j≠i∑k∈N~(j),αδi,k∂Ns(j)∂Djkα∂Djkα∂Ri\mathbf{F}_i = -\frac{\partial E}{\partial \mathbf{R}_i} = -\sum_{j \in N(i), \alpha} \frac{\partial \mathcal{N}_{s(i)}}{\partial D_{ij}^\alpha} \frac{\partial D_{ij}^\alpha}{\partial \mathbf{R}_i} - \sum_{j \ne i} \sum_{k \in N(j), \alpha} \delta_{i, a(j)} \frac{\partial \mathcal{N}_{s(j)}}{\partial D_{jk}^\alpha} \frac{\partial D_{jk}^\alpha}{\partial \mathbf{R}_i} - \sum_{j \ne i} \sum_{k \in N(j), \alpha} \delta_{i, b(j)} \frac{\partial \mathcal{N}_{s(j)}}{\partial D_{jk}^\alpha} \frac{\partial D_{jk}^\alpha}{\partial \mathbf{R}_i} - \sum_{j \ne i} \sum_{k \in \tilde{N}(j), \alpha} \delta_{i, k} \frac{\partial \mathcal{N}_{s(j)}}{\partial D_{jk}^\alpha} \frac{\partial D_{jk}^\alpha}{\partial \mathbf{R}_i}

    where:

    • N(j)N(j) is the neighbor index set of atom jj;
    • a(j)a(j) and b(j)b(j) denote the two reference neighbor atoms chosen to define the local frame of atom jj;
    • N~(j)=N(j)∖{a(j),b(j)}\tilde{N}(j) = N(j) \setminus \{a(j), b(j)\} is the neighbor set excluding the local frame axis atoms;
    • δi,k\delta_{i, k} is the Kronecker delta;
    • Ns(j)\mathcal{N}_{s(j)} is the atomic neural network function for chemical species s(j)s(j);
    • DjkαD_{jk}^\alpha is the α\alpha-th descriptor component of neighbor kk in the local coordinate frame of atom jj.

    The four summation terms account respectively for: (1) direct dependence of atom ii's own descriptors on Ri\mathbf{R}_i; (2) indirect dependence when atom ii serves as the first axis atom a(j)a(j) of another atom jj; (3) indirect dependence when atom ii serves as the second axis atom b(j)b(j) of another atom jj; and (4) indirect dependence when atom ii is a non-axis neighbor k∈N~(j)k \in \tilde{N}(j) of atom jj.

  4. Knowl 4 — Analytical Virial Tensor Formulation in DeePMD

    equation

    The virial tensor Ξ\Xi of a system governed by the DeePMD potential is derived from the relation Ξ=−12∑iRi⊗Fi=12∑i≠jRij⊗∂E∂Rij\Xi = -\frac{1}{2} \sum_i \mathbf{R}_i \otimes \mathbf{F}_i = \frac{1}{2} \sum_{i \ne j} \mathbf{R}_{ij} \otimes \frac{\partial E}{\partial \mathbf{R}_{ij}}, yielding the analytical expression:

    Ξ=12∑i≠jRij⊗∑α∂Ns(i)∂Dijα∂Dijα∂Rij+12∑i≠jδj,a(i)Rij⊗∑q,α∂Ns(i)∂Diqα∂Diqα∂Rij+12∑i≠jδj,b(i)Rij⊗∑q,α∂Ns(i)∂Diqα∂Diqα∂Rij\Xi = \frac{1}{2} \sum_{i \ne j} \mathbf{R}_{ij} \otimes \sum_\alpha \frac{\partial \mathcal{N}_{s(i)}}{\partial D_{ij}^\alpha} \frac{\partial D_{ij}^\alpha}{\partial \mathbf{R}_{ij}} + \frac{1}{2} \sum_{i \ne j} \delta_{j, a(i)} \mathbf{R}_{ij} \otimes \sum_{q, \alpha} \frac{\partial \mathcal{N}_{s(i)}}{\partial D_{iq}^\alpha} \frac{\partial D_{iq}^\alpha}{\partial \mathbf{R}_{ij}} + \frac{1}{2} \sum_{i \ne j} \delta_{j, b(i)} \mathbf{R}_{ij} \otimes \sum_{q, \alpha} \frac{\partial \mathcal{N}_{s(i)}}{\partial D_{iq}^\alpha} \frac{\partial D_{iq}^\alpha}{\partial \mathbf{R}_{ij}}

    where Rij=Ri−Rj\mathbf{R}_{ij} = \mathbf{R}_i - \mathbf{R}_j is the interatomic vector, a(i)a(i) and b(i)b(i) are the neighbor atoms defining the local coordinate frame for atom ii, Ns(i)\mathcal{N}_{s(i)} is the neural network evaluating atomic energy EiE_i, and DiqαD_{iq}^\alpha denotes the α\alpha-th component of the descriptor for neighbor atom qq of atom ii.

  5. Knowl 5 — Multi-Task Loss Function and Dynamic Prefactor Weighting Scheme

    model/method

    The trainable neural network parameters {Wsp,bsp}\{\mathbf{W}_s^p, \mathbf{b}_s^p\} are optimized by minimizing a composite loss function L(pe,pf,pξ)L(p_e, p_f, p_\xi) over each training batch:

    L(pe,pf,pξ)=peNΔE2+pf3N∑i=1N∣ΔFi∣2+pξ9N∥ΔΞ∥2L(p_e, p_f, p_\xi) = \frac{p_e}{N} \Delta E^2 + \frac{p_f}{3N} \sum_{i=1}^N |\Delta \mathbf{F}_i|^2 + \frac{p_\xi}{9N} \|\Delta \Xi\|^2

    where NN is the number of atoms in a frame, ΔE2=1Sb∑k=1Sb∣Ek−E(R1k,…,RNk)∣2\Delta E^2 = \frac{1}{S_b} \sum_{k=1}^{S_b} |E^k - E(\mathbf{R}_1^k, \dots, \mathbf{R}_N^k)|^2 is the mean squared error in total potential energy over a batch of SbS_b frames, ∣ΔFi∣2|\Delta \mathbf{F}_i|^2 is the squared error in atomic force vector components, and ∥ΔΞ∥2\|\Delta \Xi\|^2 is the Frobenius squared norm of the error in the 3×33 \times 3 virial tensor.

    To balance optimization across energy, force, and virial targets during training, the weighting prefactors p∈{pe,pf,pξ}p \in \{p_e, p_f, p_\xi\} dynamically vary with the training step tt according to the current learning rate rl(t)r_l(t):

    p(t)=plimit(1−rl(t)rl0)+pstart(rl(t)rl0)p(t) = p^{\mathrm{limit}} \left(1 - \frac{r_l(t)}{r_l^0}\right) + p^{\mathrm{start}} \left(\frac{r_l(t)}{r_l^0}\right)

    where pstartp^{\mathrm{start}} and plimitp^{\mathrm{limit}} are user-defined starting and limiting prefactor values, and the learning rate decays exponentially:

    rl(t)=rl0×drt/dsr_l(t) = r_l^0 \times d_r^{t / d_s}

    where rl0r_l^0 is the initial learning rate, dr<1d_r < 1 is the decay rate, and dsd_s is the decay step interval.

  6. Knowl 6 — DeePMD-kit Software Architecture and Molecular Dynamics Interfaces

    model/method

    DeePMD-kit is organized into three software components:

    1. Core C++ Library and Custom TensorFlow Operators: Implements atomic descriptor computation, local-to-global frame transformations, descriptor derivatives ∂Djkα/∂Ri\partial D_{jk}^\alpha / \partial \mathbf{R}_i, and analytic chain rules for forces and virial tensors as custom C++ operators integrated directly into TensorFlow. The neural network gradient ∂Es(i)/∂Djkα\partial E_{s(i)} / \partial D_{jk}^\alpha is evaluated via TensorFlow's automatic differentiation (tf.gradients).
    2. Python Training and Model Management Pipeline: Provides Python programs dp_train (reads training configurations from a JSON file and minimizes the multi-task loss with the Adam stochastic gradient descent optimizer), dp_frz (exports and freezes model weights and computational graphs into a standalone Protobuf file graph.pb), and dp_test (evaluates model generalization and tests for overfitting on independent datasets).
    3. Molecular Dynamics Engine Interfaces:
      • LAMMPS: Integrated via a custom pair_style deepmd graph.pb pair style in C++, allowing direct evaluation of energies, atomic forces, and virial tensors during classical MD simulations.
      • i-PI: Integrated via a client program dp_ipi communicating with the i-PI server over UNIX domain sockets or TCP/IP sockets to compute potential energy and forces across multiple path-integral replicas in parallel for quantum path-integral molecular dynamics.
  7. Knowl 7 — Cyclic Multi-System Batch Training Procedure

    algorithm

    When training a DeePMD model on heterogeneous datasets containing SsS_s distinct physical systems {Ω1,…,ΩSs}\{\Omega_1, \dots, \Omega_{S_s}\} with differing numbers of atoms or chemical compositions, DeePMD-kit executes training over systems in a cyclic manner without replacement.

    Input: Training systems {Ω1,…,ΩSs\Omega_1, \dots, \Omega_{S_s}}, batch size SbS_b, total optimization steps NstopN_{\text{stop}}
    Output: Trained model parameters {Wsp,bsp\mathbf{W}_s^p, \mathbf{b}_s^p}
    t←0t \leftarrow 0
    while t<Nstopt < N_{\text{stop}} do
        for k←1k \leftarrow 1 to SsS_s do
            nbatches←⌊∣Ωk∣/Sb⌋n_{\text{batches}} \leftarrow \lfloor |\Omega_k| / S_b \rfloor
            Partition Ωk\Omega_k into nbatchesn_{\text{batches}} batches randomly without replacement
            for each batch BB in the partition of Ωk\Omega_k do
                Compute learning rate rl(t)←rl0×drt/dsr_l(t) \leftarrow r_l^0 \times d_r^{t / d_s}
                Compute loss prefactors pe(t),pf(t),pξ(t)p_e(t), p_f(t), p_\xi(t)
                Forward propagate batch BB through custom descriptor and DNN operators
                Evaluate loss L(pe(t),pf(t),pξ(t))L(p_e(t), p_f(t), p_\xi(t)) on BB
                Compute parameter gradients via backpropagation
                Update parameters using Adam optimizer
                t←t+1t \leftarrow t + 1
                if t≥Nstopt \ge N_{\text{stop}} then
                    break
  8. Knowl 8 — DeePMD-kit RAW Data Format Specification

    definition

    DeePMD-kit defines the RAW data protocol to standardize molecular configuration and label inputs across diverse ab initio and simulation packages. Each system folder contains plain text files where each line corresponds to a single simulation frame:

    • coord.raw: Contains 3N3N floating-point numbers per line, representing Cartesian coordinates (x1,y1,z1,…,xN,yN,zN)(x_1, y_1, z_1, \dots, x_N, y_N, z_N) of all atoms in the laboratory frame, in units of A˚\text{\AA}.
    • box.raw: Contains 9 floating-point numbers per line, specifying the 3×33 \times 3 simulation cell box tensor components (hxx,hxy,hxz,hyx,hyy,hyz,hzx,hzy,hzz)(h_{xx}, h_{xy}, h_{xz}, h_{yx}, h_{yy}, h_{yz}, h_{zx}, h_{zy}, h_{zz}).
    • energy.raw: Contains 1 floating-point scalar per line, representing the total system potential energy in units of eV\text{eV}.
    • force.raw: Contains 3N3N floating-point numbers per line, representing the atomic forces (F1x,F1y,F1z,…,FNx,FNy,FNz)(F_{1x}, F_{1y}, F_{1z}, \dots, F_{Nx}, F_{Ny}, F_{Nz}) in units of eV/A˚\text{eV/\AA}.
    • virial.raw: Contains 9 floating-point numbers per line, representing the 9 components of the system virial tensor in units of eV\text{eV}.
    • type.raw: A single line containing NN integers separated by spaces, specifying the chemical species index of each atom in identical order across all frames.

    Missing label files (such as absence of virial data) are handled by setting their respective loss prefactor (pe,pfp_e, p_f, or pξp_\xi) to zero. For computational efficiency during training, RAW text files are converted into NumPy binary array files (.npy) prior to execution.

  9. Knowl 9 — Empirical Accuracy and Structural Property Validation on Bulk Liquid Water

    empirical result

    The DeePMD-kit implementation was evaluated on a periodic bulk liquid water system of 64 molecules (192 atoms, cubic box length 12.4447 A˚12.4447 \ \text{\AA}) using a dataset generated from a 20 ps NVT AIMD trajectory at 330 K with the PBE0+TS exchange-correlation functional (0.5 fs timestep, 40,000 frames total; 38,000 training, 2,000 testing).

    Training Setup:

    • Network architecture: 5 hidden layers with sizes (240,120,60,30,10)(240, 120, 60, 30, 10);
    • Cutoff radius Rc=6.0 A˚R_c = 6.0 \ \text{\AA} (full radial and angular coordinates for the 16 nearest oxygen and 32 nearest hydrogen neighbors; radial-only coordinates for all other neighbors);
    • Optimization: Adam optimizer for 10610^6 steps with batch size 4, initial learning rate rl0=0.001r_l^0 = 0.001, decay rate dr=0.95d_r = 0.95 per ds=5000d_s = 5000 steps;
    • Loss prefactors: pestart=0.02,pelimit=8p_e^{\mathrm{start}} = 0.02, p_e^{\mathrm{limit}} = 8, pfstart=1000,pflimit=1p_f^{\mathrm{start}} = 1000, p_f^{\mathrm{limit}} = 1, and pv=0p_v = 0.
    • Hardware: Intel Core i7-3770 CPU with 32 GB RAM, 4 OpenMP threads; total wall-clock training time was 16 hours.

    Results:

    • Initial random parameters produced testing RMS errors of 3.7×102 eV3.7 \times 10^2 \ \text{eV} for total energy and 8.4×10−1 eV/A˚8.4 \times 10^{-1} \ \text{eV/\AA} for forces.
    • Converged testing RMS errors reached 2.8×10−2 eV2.8 \times 10^{-2} \ \text{eV} for energy and 2.4×10−2 eV/A˚2.4 \times 10^{-2} \ \text{eV/\AA} for force.
    • Relative to the dataset standard deviations (6.5×10−1 eV6.5 \times 10^{-1} \ \text{eV} for energy and 8.1×10−1 eV/A˚8.1 \times 10^{-1} \ \text{eV/\AA} for force), the relative testing errors were 4.3% for energy and 2.9% for force.
    • A 200 ps NVT classical MD simulation in LAMMPS using the trained frozen DeePMD model reproduced the reference PBE0+TS DFT radial distribution functions (gOO(r)g_{\mathrm{OO}}(r), gOH(r)g_{\mathrm{OH}}(r), gHH(r)g_{\mathrm{HH}}(r)) and the tetrahedral packing parameter qq distribution with high fidelity.
  10. Knowl 10 — Hardware and Parallelization Limitations in Descriptor Computation

    limitation

    In the initial release of DeePMD-kit:

    1. CPU-Only Implementation of Descriptors: The C++ operators for constructing atomic chemical environment descriptors are implemented solely on CPU architectures, without GPU execution support.
    2. Serial Molecular Dynamics Evaluation: While descriptor evaluation is parallelized across frames during model training using OpenMP multi-threading, the evaluation of descriptors, energies, forces, and virials during active MD simulations (such as inside the LAMMPS pair style or i-PI client) runs strictly serially on a single core and does not utilize CPU multicore or GPU multithreading parallelism.

Coverage note — None was omitted; all primary contributions of the paper—including the mathematical formulations for descriptors, energies, forces, and virials, the DeePMD-kit software architecture, the RAW data format specification, the cyclic multi-system training algorithm, the empirical validation on liquid water, and the descriptor parallelization limitations—are fully covered.

References

  1. 1.W. Kohn, L. J. Sham, Self-consistent equations including exchange and correlation effects, Physical review 140 (4A) (1965) A1133.
  2. 2.R. Car, M. Parrinello, Unified approach for molecular dynamics and density-functional theory, Physical Review Letters 55 (22) (1985) 2471.
  3. 3.D. Marx, J. Hutter, Ab initio molecular dynamics: basic theory and advanced methods, Cambridge University Press, 2009.
  4. 4.K. Vanommeslaeghe, E. Hatcher, C. Acharya, S. Kundu, S.and Zhong, J. Shim, E. Darian, O. Guvench, P. Lopes, I. Vorobyov, A. Mackerell Jr., Charmm general force field: A force field for drug-like molecules compatible with the charmm all-atom additive biological force fields, Journal of Computational Chemistry 31 (4) (2010) 671–690.
  5. 5.W. Jorgensen, D. Maxwell, J. Tirado-Rives, Development and testing of the opls all-atom force field on conformational energetics and properties of organic liquids, Journal of the American Chemical Society 118 (45) (1996) 11225–11236.
  6. 6.J. Wang, R. M. Wolf, J. W. Caldwell, P. A. Kollman, D. A. Case, Development and testing of a general amber force field, Journal of Computational Chemistry 25 (9) (2004) 1157–1174.
  7. 7.A. P. Thompson, L. P. Swiler, C. R. Trott, S. M. Foiles, G. J. Tucker, Spectral neighbor analysis method for automated generation of quantum-accurate interatomic potentials, Journal of Computational Physics 285 (2015) 316–330.
  8. 8.T. D. Huan, R. Batra, J. Chapman, S. Krishnan, L. Chen, R. Ramprasad, A universal strategy for the creation of machine learning-based atomistic force fields, NPJ Computational Materials 3 (2017) 1.
  9. 9.J. Behler, M. Parrinello, Generalized neural-network representation of high-dimensional potential-energy surfaces, Physical review letters 98 (14) (2007) 146401.
  10. 10.T. Morawietz, A. Singraber, C. Dellago, J. Behler, How van der waals interactions determine the unique properties of water, Proceedings of the National Academy of Sciences (2016) 201602375.
  11. 11.A. P. Bartsk, M. C. Payne, R. Kondor, G. Csqnyi, Gaussian approximation potentials: The accuracy of quantum mechanics, without the electrons, Physical review letters 104 (13) (2010) 136403.
  12. 12.M. Rupp, A. Tkatchenko, K.-R. Mtller, O. A. VonLilienfeld, Fast and accurate modeling of molecular atomization energies with machine learning, Physical Review Letters 108 (5) (2012) 058301.
  13. 13.K. T. Schttt, F. Arbabzadah, S. Chmiela, K. R. Mtller, A. Tkatchenko, Quantum-chemical insights from deep tensor neural networks, Nature Communications 8 (2017) 13890.
  14. 14.S. Chmiela, A. Tkatchenko, H. E. Sauceda, I. Poltavsky, K. T. Schttt, K.-R. Mtller, Machine learning of accurate energy-conserving molecular force fields, Science Advances 3 (5) (2017) e1603015.
  15. 15.J. S. Smith, O. Isayev, A. E. Roitberg, Ani-1: an extensible neural network potential with dft accuracy at force field computational cost, Chemical Science 8 (4) (2017) 3192–3203.
  16. 16.K. Yao, J. E. Herr, D. W. Toth, R. Mcintyre, J. Parkhill, The tensormol-0.1 model chemistry: a neural network augmented with long-range physics, arXiv preprint arXiv:1711.06385.
  17. 17.J. Han, L. Zhang, R. Car, W. E, Deep potential: a general representation of a many-body potential energy surface, Communications in Computational Physics 23 (3) (2018) 629–639. doi:10.4208/cicp.OA-2017-0213.
  18. 18.L. Zhang, J. Han, H. Wang, R. Car, W. E, Deep potential molecular dynamics: a scalable model with the accuracy of quantum mechanics, arXiv preprint arXiv:1707.09571.
  19. 19.Y. LeCun, Y. Bengio, G. Hinton, Deep learning, Nature 521 (7553) (2015) 436–444.
  20. 20.I. Goodfellow, Y. Bengio, A. Courville, Deep learning, MIT press, 2016.
  21. 21.D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. Van Den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, et al., Mastering the game of go with deep neural networks and tree search, Nature 529 (7587) (2016) 484–489.
  22. 22.M. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis, J. Dean, M. Devin, S. Ghemawat, G. Irving, M. Isard, et al., Tensorflow: A system for large-scale machine learning., in: OSDI, Vol. 16, 2016, pp. 265–283.
  23. 23.Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, T. Darrell, Caffe: Convolutional architecture for fast feature embedding, in: Proceedings of the 22nd ACM international conference on Multimedia, ACM, 2014, pp. 675–678.
  24. 24.R. Collobert, K. Kavukcuoglu, C. Farabet, Torch7: A matlab-like environment for machine learning, in: BigLearn, NIPS Workshop, no. EPFL-CONF-192376, 2011.
  25. 25.T. Chen, M. Li, Y. Li, M. Lin, N. Wang, M. Wang, T. Xiao, B. Xu, C. Zhang, Z. Zhang, Mxnet: A flexible and efficient machine learning library for heterogeneous distributed systems, arXiv preprint arXiv:1512.01274.
  26. 26.S. Plimpton, Fast parallel algorithms for short-range molecular dynamics, Journal of Computational Physics 117 (1) (1995) 1–19.
  27. 27.B. Hess, C. Kutzner, D. van der Spoel, E. Lindahl, Gromacs 4: Algorithms for highly efficient, load-balanced, and scalable molecular simulation, J. Chem. Theory Comput 4 (3) (2008) 435–447.
  28. 28.J. Phillips, R. Braun, W. Wang, J. Gumbart, E. Tajkhorshid, E. Villa, C. Chipot, R. Skeel, L. Kale, K. Schulten, Scalable molecular dynamics with namd, Journal of computational chemistry 26 (16) (2005) 1781–1802.
  29. 29.M. Ceriotti, J. More, D. E. Manolopoulos, i-pi: A python interface for ab initio path integral molecular dynamics simulations, Computer Physics Communications 185 (3) (2014) 1019–1026.
  30. 30.A. P. Bartsk, R. Kondor, G. Csqnyi, On representing chemical environments, Physical Review B 87 (18) (2013) 184115.
  31. 31.D. Kingma, J. Ba, Adam: A method for stochastic optimization, arXiv preprint arXiv:1412.6980.
  32. 32.J. R. Errington, P. G. Debenedetti, Relationship between structural order and the anomalies of liquid water, Nature 409 (6818) (2001) 318.
  33. 33.For this example, the raw data and the JSON parameter files for training and MD simulation are provided in the online package. More details on how to use them are explained in the manual.

Citation

MLA
Wang, H., et al. “DeePMD-kit: A Deep Learning Package for Many-body Potential Energy Representation and Molecular Dynamics”. Computer Physics Communications, vol. 228, 2018, pp. 178–84, https://doi.org/10.1016/j.cpc.2018.03.016.
APA
Wang, H., Zhang, L., Han, J., & E, W. (2018). DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics. Computer Physics Communications, 228, 178–184. https://doi.org/10.1016/j.cpc.2018.03.016
Chicago
Wang, H., L. Zhang, J. Han, and W. E. 2018. “DeePMD-kit: A Deep Learning Package for Many-body Potential Energy Representation and Molecular Dynamics”. Computer Physics Communications 228: 178–84. https://doi.org/10.1016/j.cpc.2018.03.016.
Harvard
Wang, H. et al. (2018) “DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics”, Computer Physics Communications, 228, pp. 178–184. Available at: https://doi.org/10.1016/j.cpc.2018.03.016.
Vancouver
1. Wang H, Zhang L, Han J, E W (2018) DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics. Computer Physics Communications 228:178–184

BibTeX

@article{Wang_2018, title={DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics}, volume={228}, ISSN={0010-4655}, url={http://dx.doi.org/10.1016/j.cpc.2018.03.016}, DOI={10.1016/j.cpc.2018.03.016}, journal={Computer Physics Communications}, publisher={Elsevier BV}, author={Wang, Han and Zhang, Linfeng and Han, Jiequn and E, Weinan}, year={2018}, month=July, pages={178–184} }
Metadata:Crossref

Source Code

This paper has an official code repository available. Click below to access the source code.

View Repository

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF