Source-linked AI summary
GPUMD: A package for constructing accurate machine-learned potentials and performing highly efficient atomistic simulations
Zheyong Fan, Yanzhou Wang, Penghua Ying, Keke Song, Junjie Wang, Yong Wang, Zezhu Zeng, Ke Xu, Eric Lindgren, J. Magnus Rahm, Alexander J. Gabourie, Jiahui Liu, Haikuan Dong, Jianyang Wu, Yue Chen, Zheng Zhong, Jian Sun, Paul Erhart, Yanjing Su, Tapio Ala-Nissila
TL;DR
Machine-learned potentials remain much slower than empirical potentials, limiting efficient large-scale atomistic simulation. This paper advances GPU-implemented NEP models with improved descriptors and latent-space active learning, achieving above-average accuracy and more than one order of magnitude faster execution than other MLPs.
Problem
Most machine-learned potentials remain two to three orders of magnitude slower than empirical potentials, while training-data preparation is computationally burdensome.
Method
The paper improves NEP descriptors with learned radial basis combinations and four- and five-body angular terms, alongside GPU implementation and latent-space active learning.
Results
NEP achieves above-average accuracy across diverse materials while running more than one order of magnitude faster and using similarly less memory than other MLPs.
Takeaways & Limitations
GPUMD makes accurate, efficient large-scale atomistic simulations accessible to a wider research community using commonly available GPU resources.
Abstract
from arXiv · showhide
We present our latest advancements of machine-learned potentials (MLPs) based on the neuroevolution potential (NEP) framework introduced in [Fan et al., Phys. Rev. B 104, 104309 (2021)] and their implementation in the open-source package GPUMD. We increase the accuracy of NEP models both by improving the radial functions in the atomic-environment descriptor using a linear combination of Chebyshev basis functions and by extending the angular descriptor with some four-body and five-body contributions as in the atomic cluster expansion approach. We also detail our efficient implementation of the NEP approach in graphics processing units as well as our workflow for the construction of NEP models, and we demonstrate their application in large-scale atomistic simulations. By comparing to state-of-the-art MLPs, we show that the NEP approach not only achieves above-average accuracy but also is far more computationally efficient. These results demonstrate that the GPUMD package is a promising tool for solving challenging problems requiring highly accurate, large-scale atomistic simulations. To enable the construction of MLPs using a minimal training set, we propose an active-learning scheme based on the latent space of a pre-trained NEP model. Finally, we introduce three separate Python packages, GPYUMD, CALORINE, and PYNEP, which enable the integration of GPUMD into Python workflows.
I. INTRODUCTION … B. Radial descriptor components
The paper presents NEP3 and its GPUMD implementation as an accurate, highly efficient framework for large-scale atomistic simulations. It refines the NEP model through improved descriptors, GPU implementation, active learning, and Python integration.
- I. INTRODUCTION: Most existing MLP implementations achieve about 1 × 10^3 atom step/s on one typical CPU core, two to three orders slower than Tersoff.This motivates further acceleration of machine-learned potentials despite their advantage over quantum-mechanical methods.
- I. INTRODUCTION: NEP achieves about 1 × 10^7 atom step/s using a single V100 GPU, about ten times faster than the empirical Tersoff potential.The approach optimizes both the potential formulation and its implementation rather than relying on massive parallel resources.
- I. INTRODUCTION: The latest NEP developments improve radial functions with combined basis functions and add angular components with high-order correlations without reducing efficiency.The improved radial functions distinguish atom types better and increase accuracy in multicomponent systems.
- I. INTRODUCTION: GPUMD comparisons across alloys, molecular, elemental, and phase-diverse systems show NEP combines above-average accuracy with computational speed far superior to other MLPs.Using a single GPU such as an A100, GPUMD can simulate up to 10 million atoms on nanosecond time scales.
- II. THEORETICAL FORMULATIONS OF THE NEP APPROACH: The paper introduces NEP3 as a further refinement of the NEP framework and discusses its differences from NEP1 and NEP2.NEP1 was the original model, while NEP2 was its improved version.
- A. The neural-network model: NEP models site energy Ui as a function of a descriptor vector and use a feedforward neural network with a single hidden layer of Nneu neurons.The descriptor contains Ndes components, and the network has (Ndes + 2)Nneu + 1 parameters.
- B. Radial descriptor components: Radial descriptor components sum distance-dependent functions over neighbors within a cutoff, using coefficients that depend on central and neighboring atom types.The neighbor summation makes these components invariant under permutation of atoms of the same type.
- B. Radial descriptor components: In NEP3, each radial function is a linear combination of NRbas + 1 basis functions involving first-kind Chebyshev polynomials and a cutoff function.Unlike NEP1’s fixed coefficients, NEP2 and NEP3 use trainable coefficients; NEP3 further improves multicomponent accuracy over NEP2.
C. Angular descriptor components · D. Explicit expressions for the angular descriptor components
The angular descriptor is extended from 3-body terms to include 4-body and 5-body ACE-like contributions in NEP3, while explicit algebraic expressions enable efficient GPU evaluation. The construction balances descriptor accuracy and computational speed through selective angular orders, precomputed coefficients, and cutoff choices.
- C. Angular descriptor components: Angular descriptors use Legendre-polynomial functions of bond angles, with radial functions that may have distinct angular cutoffs and basis sizes.The radial functions retain the form of Eq. (3), but their cutoff distance and basis size can differ from those of radial descriptor components.
- C. Angular descriptor components: A relatively large radial cutoff combined with a relatively small angular cutoff provides an efficient way to represent longer-ranged interactions while controlling computational cost.The rationale is that interaction strength decreases with distance and order; larger radial cutoffs can incorporate interactions such as vdW and screened Coulomb interactions, though not genuinely long-ranged interactions.
- C. Angular descriptor components: NEP3 adds ACE-like 4-body and 5-body angular descriptor components to the 3-body angular terms used in earlier NEP models.The 4-body terms satisfy 1 ≤ l1 ≤ l2 ≤ l3 ≤ l4 ≤ l_max, while the 5-body terms satisfy 1 ≤ l1 ≤ l2 ≤ l3 ≤ l4 ≤ l5 ≤ l_max.
- C. Angular descriptor components: Only angular terms through fifth order are retained to balance accuracy and speed.The text notes that higher-order terms are possible, but the implementation considers terms only up to fifth order.
- D. Explicit expressions for the angular descriptor components: The explicit NEP3 angular expressions are derived to reduce the number of terms required for efficient GPU implementation.The angular components are complicated, and deriving explicit expressions is described as crucial for reducing computational work.
- D. Explicit expressions for the angular descriptor components: The implementation evaluates 3-body terms through l3_max = 4, restricts 4-body terms to l1 = l2 = l3 with l4_max = 3, and restricts 5-body terms to l1 = l2 = l3 = l4 = 1.These restrictions define the cases explicitly treated in the presented expressions.
- D. Explicit expressions for the angular descriptor components: Precomputed coefficients and analytical Wigner 3j expressions are used to obtain high computational performance.The coefficients are pre-computed, and the text identifies this as crucial for performance.
- D. Explicit expressions for the angular descriptor components: The NEP3 descriptor vector combines radial, 3-body, 4-body, and 5-body component counts determined by their respective maximum basis orders.The section enumerates the descriptor-vector length after including both 4-body and 5-body components.
E. Force, virial, and heat current expressions
This section derives explicit partial-force expressions for efficient GPU implementation, then constructs total forces, per-atom virials, and heat currents. The resulting heat-current formulations support Green–Kubo and HNEMD calculations and generally apply to local interatomic potentials.
- Force expressions: Analytical functions make explicit partial-derivative expressions straightforward to derive for efficient GPU force implementation.The derivation specifically provides an explicit expression for the partial force.
- Force expressions: The total force combines partial forces between atoms and obeys Newton’s third law, Fij = −Fji.The force on each atom is obtained by summing contributions from neighboring atoms.
- Virial and heat current: Contracting the per-atom virial with velocity vi yields the per-atom heat current, whose system-wide value is their sum.The total heat current is defined by summing all per-atom contributions.
- Heat-current applications: Both heat-current forms are valid for Green–Kubo calculations, while Eq. (26) is more convenient for HNEMD and spectral decomposition.Equation (26) avoids involving neighboring-atom velocities vj for a given atom i.
- Validity and applicability: The heat-current expressions apply to all interatomic potentials implemented in gpumd and generally extend to multi-body cluster potentials under locality assumptions.Their validity was numerically confirmed through energy conservation, and Eq. (27) has been used in an on-the-fly MLP.
F. Loss function and training algorithm
NEP parameters are optimized with separable natural evolution strategy (SNES) by minimizing a weighted loss comprising energy, force, and virial RMSEs plus L1/L2 regularization. SNES updates a search distribution through natural-gradient evolution and requires no analytical properties of the loss function.
- Optimization algorithm: SNES optimizes NEP’s free parameters using derivative-free, real-valued evolutionary optimization.It updates a search distribution consisting of a mean and variance for each trainable parameter across a population of solutions.
- Optimization formulation: The loss is formulated as a real-valued optimization problem over parameter vector z, with z∗ denoting an optimal parameter set.The parameter vector’s dimension is the total number of parameters, Npar.
- Loss function: The total loss is a weighted sum of energy, force, and virial RMSE terms together with L1 and L2 regularization.The corresponding weights λe, λf, λv, λ1, and λ2 are tunable hyper-parameters.
- Loss function: Energy and virial use eV/atom, while force components use eV/˚A when calculating the loss.Energy, force, and virial losses compare current NEP predictions with target values using RMSEs.
G. GPU implementation
The NEP approach is implemented in gpumd as a CUDA C++ package for Nvidia GPUs, using a highly parallel GPU strategy with one thread assigned per atom. NEP energy, force, and virial evaluation requires four CUDA kernels and uses mixed precision to balance accuracy and efficiency.
- gpumd is an open-source, general-purpose molecular-dynamics package fully implemented on Nvidia GPUs with CUDA C++.
- The CUDA implementation uses only a few kernels to achieve high parallelism and arithmetic intensity, assigning one CUDA thread to each atom.
- Four CUDA kernels are required to evaluate NEP-related energy, force, and virial quantities.
- The kernels compute descriptors and site energies, radial forces and virials, angular partial forces, and angular forces and virials.
- Inputs and outputs for positions, energies, forces, and virials use double precision, while internal kernel calculations are mostly single precision.This mixed-precision approach is intended to balance accuracy and efficiency.
H. Training and using NEPs … III. PERFORMANCE OF NEP MODELS
This block presents GPUMD as a CUDA-based package for training and using NEP models in atomistic simulations, specifies the required training and simulation inputs, and describes its broader simulation capabilities. The supplied passages establish the workflow and implementation details but provide no specific performance results.
- 1. Overview of the GPUMD package: GPUMD trains and uses NEPs through the nep and gpumd executables on Linux or Windows with CUDA and a CUDA-enabled GPU.After compilation, nep trains NEPs and gpumd uses them for simulations.
- 1. Overview of the GPUMD package: GPUMD has evolved from simple pairwise CUDA potentials into a general-purpose package supporting empirical many-body, machine-learned force-constant, and NEP potentials.The package includes Tersoff, Tersoff-like, Stillinger-Weber, EAM, hiphive-derived force-constant, and multiple NEP versions.
- 1. Overview of the GPUMD package: GPUMD supports NVE, NVT, and NPT ensembles with multiple thermostat and barostat options.NVT options include Berendsen, Nosé-Hoover chain, Bussi-Donadio-Parrinello, and Langevin thermostats; NPT includes Berendsen and stochastic cell-rescaling barostats.
- 1. Overview of the GPUMD package: The package primarily supports thermal-transport simulations using Green-Kubo equilibrium MD, multi-thermostat non-equilibrium MD, and HNEMD with homogeneous driving.Its efficiency also enables high-throughput thermal-transport simulations and applications to diverse low-dimensional and van der Waals materials.
- 2. Training a NEP model: Training a NEP requires train.in, test.in, and nep.in, which provide reference datasets and model or training-process settings.The training and testing files share a format but assign structures to different roles.
- 2. Training a NEP model: The nep.in file specifies NEP versions, atom types, cutoffs, descriptor parameters, loss weights, neural-network size, batch size, and SNES population and generation counts.The documented versions are NEP2 and NEP3.
- 2. Training a NEP model: During training, the nep executable continuously updates predicted energies, forces, virials, loss terms, the potential file, and a restart file.These outputs are generated for both training and testing datasets where applicable.
- 3. Using a NEP: The nep.txt potential file can be passed directly to gpumd, while run.in specifies the atomistic simulation process.The paper points to later examples for using run.in.
A. NEP3 vs NEP2 … 2. Azobenzene molecule
The paper evaluates NEP3’s improved radial functions and higher-body descriptors across alloy, silicon, and azobenzene benchmarks. NEP3 improves accuracy while retaining strong computational efficiency, outperforming or approaching other MLPs at substantially lower evaluation cost.
- A. NEP3 vs NEP2: NEP training and testing RMSEs closely follow one another, indicating very good interpolation capability.Training RMSE oscillations arise from mini-batches with batch size 1,000.
- 1. A general-purpose silicon data set: For silicon, adding 4-body and 5-body descriptor components increases NEP accuracy, while NEP accuracy depends less strongly on angular correlation order than ACE accuracy.The comparison uses force RMSE versus computational cost for NEP and a recursive ACE implementation.
- B. Comparison of NEP3 with other MLPs: Across the silicon and azobenzene comparisons, NEP combines compact descriptors and nonlinear neural-network regression with competitive accuracy and lower computational cost than linear-ACE approaches.The azobenzene comparison includes ANI, GAP, sGDML, and a linear-regression-based ACE potential.
- 2. Azobenzene molecule: The azobenzene benchmark uses 1,000 training and 1,000 testing structures randomly selected from a 500 K molecular-dynamics trajectory.The split contains 1,000 target energies and 72,000 target force components in the training data.
- 2. Azobenzene molecule: For azobenzene, increasing nR_max rapidly raises both NEP accuracy and computational cost.The models use l3b_max = 1 and vary radial-function hyperparameters.
- 2. Azobenzene molecule: At nR_max = 10, NEP accuracy lies between ANI and GAP, while evaluation is more than one order faster than ANI and more than two orders faster than GAP.At comparable accuracy, NEP models are also several times faster than linear-ACE potentials.
3. Carbon data set … A. Lattice constant
The paper evaluates NEP against other machine-learned potentials on a diverse carbon data set, finding above-average accuracy and superior computational performance. It then introduces latent-space active learning to reduce training data requirements and demonstrates NEP-based carbon simulations, including an accurate diamond lattice constant.
- 3. Carbon data set: The carbon benchmark uses 4,080 training structures and 450 similar test structures spanning crystals, liquids, amorphous phases, surfaces, and dimers.NEP is compared with DP, GAP, MTP, and REANN for accuracy, speed, and memory usage.
- 3. Carbon data set: MTP and REANN provide the best energy and force accuracy, while NEP accuracy is close to theirs and GAP and DP perform worst.For available virial data, NEP achieves the highest accuracy; virial results are unavailable for GAP and REANN.
- 3. Carbon data set: NEP delivers superior computational speed and memory efficiency in diamond molecular-dynamics simulations, supporting large-scale and long-time atomistic applications.Speed is measured from atom-step throughput, while memory efficiency is assessed through the maximum atom count on one Tesla V100 GPU.
- IV. ACTIVE LEARNING BASED ON THE LATENT SPACE: Active learning targets minimal training sets because quantum-mechanical calculations are time consuming and new samples should improve model accuracy and generalization.The proposed query strategy uses the latent space of a pre-trained NEP model.
- IV. ACTIVE LEARNING BASED ON THE LATENT SPACE: The NEP latent space is Nneu-dimensional, and principal-component analysis provides an effective lower-dimensional representation for comparing structures.Latent-space vectors are computed with a pre-trained NEP model trained on a small initial data set; the first two principal components explain more than 70%.
- IV. ACTIVE LEARNING BASED ON THE LATENT SPACE: A selected active-learning set of 786 structures comprises all 30 dimers, all 356 crystals, and 400 bulk amorphous/liquid structures.The resulting NEP model uses the same hyperparameters as the NEP (4.2 ˚A) model.
- V. EXAMPLES FOR APPLICATIONS OF NEP MODELS: NEP models are applied to atomistic simulations, using the NEP (4.2 ˚A) model unless otherwise stated, with full and active-learning models compared against DFT references.The comparison covers energy, force, and virial values for the 450-structure test set.
- A. Lattice constant: The zero-temperature diamond lattice constant predicted by NEP is 3.530 ˚A, very close to the DFT-LDA reference.The value is obtained from a cohesive-energy curve calculation.
B. Elastic constants … A. The gpyumd package
The examples demonstrate GPUMD’s accuracy and scalability across elastic, mechanical, structural, vibrational, and thermal simulations, while its Python interface supports setup, validation, and output processing. Together, these sections show workflows for challenging atomistic calculations and Python-based integration.
- B. Elastic constants: NEP elastic constants C11, C12, and C44 agree within 4% of reference DFT-LDA values, whereas GAP’s C12 is about 24% smaller.The components are calculated from energy-strain relations using ±1% strain values.
- C. Tensile loading of diamond: A periodic 8,000-atom diamond supercell is equilibrated at 300 K before 5 ns of tensile deformation at 1 × 108/s to 50% strain.The simulation uses NPT equilibration followed by Bussi-Donadio-Parrinello and Bernetti-Bussi controls during production.
- D. Quenching: A 64,000-atom diamond supercell undergoes melt-quench-anneal processing from 9.000 K through 5.000 K and 1.000 K, followed by relaxation at 1.000 K and 300 K.The system has a mass density of 3.0 g/cm3 and uses a Langevin thermostat.
- E. Density of states and heat capacity of amorphous carbon: Amorphous-carbon vibrational density of states is obtained from the velocity autocorrelation function and used to calculate quantum-corrected heat capacity.The VDOS and VACF are normalized to 3N, and x = ℏω/kBT relates vibrational to thermal energy.
- F. Thermal conductivity of amorphous carbon: 5.1 ± 0.1 W/(m K) is the classical thermal conductivity of amorphous carbon at 300 K, while the quantum-corrected value is 3.2 ± 0.1 W/(m K).The sample has a mass density of 3.0 g/cm3, and statistical error is reported as the standard error.
- VI. INTERFACE TO OTHER CODES: GPUMD is complemented by Python packages, including gpyumd, which provides interfaces for preparing inputs, running simulations, and processing outputs.The broader package ecosystem is introduced as an interface to other codes.
- A. The gpyumd package: The gpyumd package extends ASE’s Atoms through GpumdAtoms and offers input generation, consistency checks, simulation construction, and convenient output loading.It supports xyz.in, basis.in, and kpoints.in workflows, validates groups, atom types, and ordering, and provides functions such as load_thermo() and load_hac().
B. The calorine package … Conflict of Interest
The paper extends GPUMD into Python workflows through calorine and pynep, while summarizing NEP advances, integrations, applications, limitations, data availability, and conflicts of interest. Calorine provides ASE- and GPUMD-facing interfaces, whereas pynep supports property calculation and active-learning structure selection.
- B. The calorine package: Calorine integrates GPUMD into Python workflows and extends ASE with an NEP calculator for energies, forces, and stresses.It writes and reads GPUMD input and output files, simplifying calculations over predefined structures and access to ASE relaxation schemes.
- 2. Interface to GPUMD: Calorine’s PyBind11 interface exposes NEP descriptors and a CPU-only ASE calculator for systems without a GPU.The interface provides access to GPUMD NEP data structures and can calculate descriptors for an ASE Atoms object.
- C. The pynep package: Pynep facilitates active learning with a pretrained NEP model by calculating energies, forces, stresses, descriptors, and latent descriptors for ASE Atoms objects.Available descriptors and latent descriptors can be used with sampling methods such as farthest-point sampling to select structures.
- VII. SUMMARY AND CONCLUSIONS: The paper introduces improved radial and angular NEP descriptors, with linear-combination radial functions and 4-body and 5-body angular contributions improving model accuracy.The angular extensions follow the atomic cluster expansion approach.
- VII. SUMMARY AND CONCLUSIONS: Typical NEP models are more than one order of magnitude faster than other MLPs and similarly more memory efficient, while achieving above-average accuracy.The summary attributes this efficiency to several design factors, including a descriptor dimension usually smaller than 100.
- VII. SUMMARY AND CONCLUSIONS: GPUMD can run standalone or integrate with ASE through gpyumd, calorine, and pynep, and trained NEP models can directly drive atomistic simulations of varied materials properties.SNES simplifies implementation and avoids dependence on third-party machine-learning libraries.
- Data availability: A limitation is that GPUMD remains less feature-rich than comparable packages such as LAMMPS, although its open-source GPU framework is attracting developers who are rapidly adding features.Training and testing results are available through Zenodo, and GPUMD example input and output files are included in the package.
- Conflict of Interest: The authors report no conflicts of interest.
Appendix A: Some derivations on the heat current expressions · Appendix B: Algorithms
Appendix A derives how the general heat-current formulation reduces to the three-body expressions of Boone et al. Appendix B specifies the quantities and algorithmic framework used to evaluate NEP energies, forces, and virials in gpumd.
- Appendix A: Some derivations on the heat current expressions: The appendix establishes that multi-body heat-current expressions from Ref. 67 are special cases of the general formulation, illustrating the result for a three-body potential.The three-body site potential is treated as an average over the triplets containing atom i.
- Appendix A: Some derivations on the heat current expressions: Using the chain rule, the general heat-current equation is rewritten in terms of derivatives of the triplet site potentials.The derivation proceeds by rewriting Eq. (27) and substituting the three-body site-potential decomposition.
- Appendix A: Some derivations on the heat current expressions: The derivation defines the force on atom j from triplet ijl and applies analogous expressions for the other triplet permutations.The index restriction j cannot equal i but may equal k or l is explicitly noted.
- Appendix A: Some derivations on the heat current expressions: After relabeling dummy indices, the resulting three-body heat-current expression is shown to correspond to Eq. (18d) of Ref. 67.The final form combines interatomic position vectors, triplet forces, and atomic velocities.
- Appendix B: Algorithms: Appendix B presents complete algorithms for evaluating NEP energies, forces, and virials as implemented in gpumd.It begins by listing the quantities required by the implementation.
- Appendix B: Algorithms: The algorithmic inputs include the total atom count, radial and angular neighbor counts, neighbor indices, and atom positions.Radial and angular descriptors use separate neighbor counts and index arrays.
- Appendix B: Algorithms: The listed output and derivative quantities include site energies, descriptor derivatives, partial forces, atomic forces, and atomic virials.These quantities define the variables used in the NEP evaluation procedures.
1. Application of the neural network … 4. Partial forces from the angular descriptor components
GPUMD applies a single-hidden-layer feedforward neural network on GPUs to obtain per-atom energies and descriptor derivatives, then uses staged CUDA kernels to compute forces and virials efficiently. The implementation separates radial and angular force calculations because their derivative symmetries and computational costs differ.
- 1. Application of the neural network: A single hidden layer achieves high NEP accuracy, while additional layers reduce computational performance without corresponding accuracy gains.The single-layer design also allows many variables to remain CUDA registers rather than more expensive global or local memory.
- 1. Application of the neural network: The CUDA neural-network function maps descriptor vector qi to site energy Ui and computes the derivative of Ui with respect to descriptor components.Its inputs include descriptor dimension, hidden-neuron count, weights, biases, and qi; outputs are energy and energy_derivative.
- 1. Application of the neural network: Because NEP training uses an evolutionary algorithm, GPUMD need not differentiate the loss with respect to neural-network parameters.This avoids parameter derivatives required by conventional gradient descent and simplifies the neural-network implementation.
- 2. Energy and derivative of energy with respect to descriptor: In the first CUDA kernel, each atom thread computes the complete descriptor vector qi and obtains Ui and ∂Ui/∂qi for subsequent force and virial kernels.The descriptor-energy derivatives are passed conceptually to the next two CUDA kernels.
- 3. Force and virial from the radial descriptor components: The second CUDA kernel computes radial partial forces for both ∂Ui/∂rij and ∂Uj/∂rji, then accumulates atom-i force Fi and virial Wi.The two radial derivatives differ only slightly, making their joint calculation efficient; the algorithm resembles that for EAM potentials.
- 4. Partial forces from the angular descriptor components: For angular descriptors, the third CUDA kernel computes ∂Ui/∂rij for all atom pairs within the angular cutoff and stores the partial forces in global memory.The derivatives ∂Ui/∂rij and ∂Uj/∂rji differ substantially, motivating a two-kernel approach.
- 4. Partial forces from the angular descriptor components: The angular-force kernel evaluates descriptor components and saves intermediate summations and neural-network outputs to global memory for later use.The supplied algorithm fragments specify calculating angular components, storing Sn,k, and saving the resulting energy-related quantities.
5. Force and virial from the angular partial forces · 12 end
The implementation uses CUDA kernels to compute angular partial forces and then accumulate atomic forces and virials. The workflow assigns atoms to threads, reads positions, applies minimum-image displacement, evaluates and stores partial forces, and performs the final accumulation.
- 5. Force and virial from the angular partial forces: The accumulation kernel loads the related partial forces ∂Ui/∂rij and ∂Uj/∂rji, connected by exchanging atom indices i and j.It then uses these quantities to accumulate the force Fi and virial Wi on atom i.
- 5. Force and virial from the angular partial forces: Forces are accumulated according to Eqs. (22) and (23), while virials are accumulated according to Eq. (24).This CUDA kernel is described as a general kernel used in GPUMD.
- 5. Force and virial from the angular partial forces: CUDA kernel Algorithm 3 evaluates angular partial forces ∂Ui/∂rij for every atom i and its neighbors j.The angular contribution comprises the last three terms on the right-hand side of Eq. (21).
- 5. Force and virial from the angular partial forces: Each atom i is assigned to CUDA thread i, subject to the condition i < N.This initializes parallel processing over the atoms.
- 5. Force and virial from the angular partial forces: The kernel reads positions ri and rj from global memory and computes rij using the minimum-image convention.These operations provide the displacement needed for evaluating the angular partial force.
- 5. Force and virial from the angular partial forces: After evaluating ∂Ui/∂rij, the kernel saves each partial force to global memory for later use.The stored values are subsequently consumed by the force-and-virial accumulation kernel.