Scaling Neural-Network-Based Molecular Dynamics with Long-Range Electrostatic Interactions to 51 Nanoseconds per Day

Jianxiong Li, Beining Zhang, Mingzhen Li, Siyu Hu, Jinzhe Zeng, Lijun Liu, Guojun Yuan, Zhan Wang, Guangming Tan, Weile JiaarXiv 2025 · DOI

Abstract

Neural-Network-Based Molecular Dynamics (NNMD) provides a path to ab initio accuracy for large-scale systems, yet the inclusion of long-range electrostatic interactions remains a major computational hurdle. This work presents a series of optimizations for the Deep Potential Long-Range (DPLR) model on the Fugaku supercomputer. By implementing a hardware-offloaded 3D FFT (utofu-FFT), an asymmetric core-allocation strategy for overlapping short- and long-range calculations, and a global ring-based load balancer, we achieved a 37-fold performance increase. Our results demonstrate a record simulation speed of 51 nanoseconds per day (ns/day) for a standard water benchmark, enabling high-fidelity simulations of complex chemical and biological systems at unprecedented scales.

Introduction

Molecular Dynamics (MD) simulations are indispensable tools for investigating phenomena such as protein folding, electrolyte behavior, and phase transitions. While traditional NNMD methods offer quantum-mechanical accuracy at a fraction of the cost, they often rely on local truncation of interactions. To accurately model complex systems, long-range electrostatic interactions must be included. The Deep Potential Long-Range (DPLR) model addresses this by utilizing the Particle-Particle Particle-Mesh (PPPM) method. However, on large-scale supercomputers, the 3D Fast Fourier Transforms (FFTs) required by PPPM create massive communication bottlenecks and load imbalances that severely limit simulation throughput.

The DPLR Framework and Challenges

The DPLR model decomposes the total energy into short-range and long-range components. As illustrated in Figure 1, the system processes local atomic environments through Deep Potential (DP) and Deep Wannier (DW) networks to calculate short-range forces and dipole moments, while the PPPM module handles the reciprocal-space long-range interactions.

Overview of the DPLR model architecture, including short-range (DP/DW) and long-range (PPPM) components.

The primary challenge in scaling this framework lies in the 3D FFT, which requires extensive data shuffling across thousands of nodes. Furthermore, the uneven distribution of atoms across processors often leads to significant load imbalances, where some cores remain idle while others are oversubscribed.

Optimization Strategies

To overcome these bottlenecks, three primary optimizations were tailored for the Fugaku supercomputer’s A64FX architecture and TofuD interconnect.

Hardware-Offloaded FFT (utofu-FFT)

Rather than relying on standard software libraries, we developed utofu-FFT, which leverages Fugaku’s "Barrier Gates"—hardware units within the network interface capable of performing reductions during data transit. As shown in Figure 3, this method utilizes a ring-topology reduction chain. To maximize network throughput, we implemented a custom data quantization scheme that scales fp32 values to int32 and packs them into uint64 containers, effectively treating the network as a distributed arithmetic unit.

The utofu-FFT implementation featuring (a) node ring topology, (b) reduction chains, and (c) the data quantization scheme.

Asymmetric Overlap and Load Balancing

Fugaku nodes consist of 48 cores. We implemented an asymmetric strategy where exactly one core per node is dedicated to long-range PPPM/FFT tasks, while the remaining 47 cores perform the computationally intensive neural network inference for short-range forces. This allows the long-range calculation time to be "hidden" behind the short-range work. Additionally, a ring-based load balancing algorithm was introduced to redistribute atoms globally with minimal communication overhead, ensuring a uniform workload across all MPI ranks.

Experimental Results

The study utilized liquid water systems to benchmark performance. For a small-scale system of 564 atoms, the optimizations achieved a peak simulation speed of 51 ns/day on 12 nodes. In large-scale tests involving 403,200 atoms, the system maintained a high throughput of 32.5 ns/day across 8,400 nodes, demonstrating excellent weak scaling.

Overall, these optimizations delivered a 37x speedup over the baseline DPLR implementation. The utofu-FFT method specifically outperformed standard high-performance libraries like heFFTe by up to 2x, proving that hardware-level communication offloading is critical for next-generation MD simulations.

Conclusion

This work demonstrates that treating the supercomputer interconnect as a coprocessor can bypass traditional MPI overheads in NNMD. While the utofu-FFT implementation is currently specific to the TofuD architecture, the principles of asymmetric task overlap and precision-controlled quantization provide a roadmap for scaling complex molecular simulations on other heterogeneous high-performance computing platforms. Future work will focus on addressing the scaling ceiling observed at extreme node counts where long-range computation begins to outpace short-range inference.

Summary updated

BibTeX
@misc{li2025scaling,
  author = {Jianxiong Li and Beining Zhang and Mingzhen Li and Siyu Hu and Jinzhe Zeng and Lijun Liu and Guojun Yuan and Zhan Wang and Guangming Tan and Weile Jia},
  title = {{Scaling Neural-Network-Based Molecular Dynamics with Long-Range Electrostatic Interactions to 51 Nanoseconds per Day}},
  year = {2025},
  eprint = {2504.15508},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.15508},
}
Figure