Tutorials

Use accurate and flexible primitives from NVIDIA cuPotential to accelerate molecular dynamics simulations.

NVIDIA cuPotential provides GPU primitives and an OpenMM plugin for molecular dynamics, replacing nonbonded force, Langevin integrator, and Monte Carlo barostat components to accelerate long-range electrostatics and dispersion. It targets solvated, rectangular periodic boxes with Particle Mesh Ewald, while LJPME, triclinic boxes, and certain parameter offsets remain unsupported. The guide covers environment setup, CUDA 13.1 prerequisites, build steps, and benchmark samples using DHFR, BACE, and ApoA1 under NVT and NPT conditions.

Use accurate and flexible primitives from NVIDIA cuPotential to accelerate molecular dynamics simulations.

Key Takeaways

  • NVIDIA cuPotential accelerates long-range molecular dynamics calculations on GPUs through modular C API primitives and an OpenMM plugin that allows mostly drop-in integration.
  • The OpenMM plugin replaces core components such as nonbonded force, Langevin integrator, and Monte Carlo barostat, currently targeting solvated uniform-density systems in rectangular periodic boxes with Particle Mesh Ewald.
  • Supported workflows exclude LJPME, triclinic boxes, and certain OpenMM parameter offsets, so developers need to check the plugin README before adapting existing simulations.
  • The supplied sample evaluates DHFR, BACE, and ApoA1 under NVT and NPT conditions, using AMBER14/TIP3P, mixed precision, a 4 fs timestep, and constrained hydrogen bonds.
  • NVIDIA reports significant end-to-end speedups across multiple GPU architectures, with newer RTX PRO Blackwell systems achieving over 3x and many other GPUs reaching around 2x or more for selected benchmarks.

Meta description: Learn how NVIDIA cuPotential accelerates molecular dynamics in OpenMM with GPU kernels, new splitting and spreading methods, and accuracy benchmarks.

Use accurate and flexible primitives from NVIDIA cuPotential to accelerate molecular dynamics simulations.

Tags: NVIDIA cuPotential, OpenMM, molecular dynamics, GPU acceleration, Particle Mesh Ewald

![Abstract illustration of molecular dynamics particles and GPU acceleration](nvidia-cupotential-md-illustration.png)

NVIDIA cuPotential is a focused library designed for molecular dynamics developers who need to accelerate long-range calculations on GPUs while keeping existing OpenMM workflows mostly intact. Molecular dynamics simulations compute many atom-pair interactions, which made them early GPU candidates, but evolving hardware has made kernel optimization and cross-platform compatibility harder. In classical force field simulations, long-range electrostatics and dispersion under periodic boundary conditions are still the major computational and engineering bottleneck. NVIDIA says cuPotential addresses this with modular primitives exposed through a C API, letting developers select components from multiple layers of the stack to accelerate workloads, including direct-space and reciprocal-space utilities such as cutoff-based interaction evaluators and charge spreading functions. The package also ships a plugin specifically for OpenMM, a popular engine in the developer ecosystem, with the goal of drop-in replacement with minimal user-code changes.

What the OpenMM plugin replaces

The plugin provides replacements for OpenMM's nonbonded force, Langevin integrator, and Monte Carlo barostat. To use it, developers replace the system's OpenMM nonbonded force before creating the simulation context, then use the cuPotential integrator and, optionally, the cuPotential barostat. For constant-pressure runs, the sample uses nv.MonteCarloBarostat. NVIDIA also introduces two examples for developers who need control over parameter representation and updates.

The current plugin is scoped to solvated, approximately uniform-density systems in rectangular periodic boxes, common in biomolecular simulations. It accepts Particle Mesh Ewald source forces, but LJPME, triclinic boxes, and OpenMM particle or exception parameter offsets are not supported; developers should consult the plugin README before adapting an existing simulation.

Build and test the runtime in four steps

  1. Prepare the host and environment. Use Linux x86-64 with a supported NVIDIA GPU and an installed NVIDIA driver compatible with CUDA 13.1. Install Conda or Micromamba, initialize the shell, and clone the cuPotential repository from the NVIDIA/cuPotential GitHub repo. The conda environment supplies the CUDA toolkit and compilers, so a separate system-wide CUDA toolkit installation is not required; the GPU driver must already be present on the host. Create and activate the environment, then install the Python build dependencies. The cuda-toolkit package supplies the CUDA compiler and development tools; setting cuda-version alone does not install those tools.
  1. Point the build helper to the active environment. In plugins/openmm/run_build, replace the environment path with the active environment path. Both Conda and Micromamba set CONDA_PREFIX when an environment is activated.
  1. Build and install. From the cuPotential repository root, with the environment active, run the build helper. It compiles the cuPotential runtime if it is not already present, then builds the OpenMM plugin. The final installation command also installs the wheel's declared pip CUDA dependencies.
  1. Run the supplied sample. The sample evaluates DHFR (Dihydrofolate reductase), BACE (Beta-secretase 1), and ApoA1 (Apolipoprotein A1) under constant-volume (NVT) and constant-pressure (NPT) conditions. DHFR and ApoA1 come from the OpenMM benchmark suite, while BACE comes from the OpenFE benchmark set. The sample uses the AMBER14/TIP3P force field, a 0.9 nm nonbonded interaction cutoff length, a 5 x 10⁻⁴ electrostatic accuracy target, and mixed precision. Its 4 fs timestep is paired with constrained hydrogen bonds, rigid water, and hydrogen mass repartitioning to 1.5 amu.

The sample measures accuracy and performance separately. For electrostatics, it compares both implementations with a double-precision reference, using twice the cutoff length for the short-range part and twice the mesh resolution in each dimension for the long-range part, with the Ewald splitting parameter held fixed. For truncated Lennard-Jones interactions, it uses a double-precision reference at the same cutoff, preserving the interaction model being tested. For throughput, each implementation runs 500 warm-up steps followed by 3,000 timed steps. The cuPotential configuration uses its own force, integrator, and, for constant-pressure runs, its barostat, so the reported speedup describes that integrated configuration.

Reported speedups and accuracy improvements

When cuPotential is integrated into OpenMM through the built-in plugin, NVIDIA reports significant performance gains across a wide range of GPU architectures for systems from 24,000 to 400,000 atoms: DHFR, TYK2 (Tyrosine Kinase 2 from OpenFE benchmarks), BACE, ApoA1, Water with 100,000 atoms, and cellulose. The reported speedups are measured under constant-pressure conditions. Newer GPUs, including NVIDIA RTX PRO 6000 Blackwell Workstation Edition and NVIDIA RTX PRO 6000 Blackwell Server Edition, achieve over 3x end-to-end speedups in selected benchmarks. Other tested GPUs (NVIDIA B200, H100, A100, L40S, A10, L4 and T4) also benefit, with gains often around 2x or more. NVIDIA notes that the numbers come from standard, non-alchemical systems.

Ewald splitting, specifically Particle Mesh Ewald, has been the de facto method in molecular dynamics for the past 30 years. Newer techniques such as the u-series, midtown splines and prolates have been proposed but not widely adopted because of high technical requirements and sophistication. NVIDIA says its team has been collaborating with D. E. Shaw Research and the Flatiron Institute to develop C2 continuous splitting and spreading functions that are broadly applicable, highly accurate, and performant.

The error analyses compare cuPotential with Ewald and u-series across grid resolutions and cutoff distances, using a 100,000-atom water system under constant-pressure conditions and statistics computed over 25 frames. Ewald alpha-parameters were tuned to asymptotically reach the desired force tolerance. NVIDIA says its approach can reduce the real-space cutoff and/or reciprocal-space grid size without losing accuracy relative to the near-exact regime, defined as the L2 force root-mean-square error at default settings specified by OpenMM. The u-series was not optimized for force error but for ensemble error; the parameters were chosen to attain the desired force error for consistency with OpenMM.

Beyond electrostatics, splitting and spreading kernels for lattice dispersion interactions can help model highly nonpolar and membrane systems more accurately, because conventional homogeneous analytical corrections can cause severe simulation artifacts. NVIDIA reports that cuPotential improves dispersion energy accuracy by several thousand fold versus conventional methods while maintaining comparable force errors at significantly reduced computational cost. The u-series is omitted from that comparison because the original D. E. Shaw Research paper covered only electrostatics. NVIDIA also notes that reducing cutoff to 6A still poses enormous challenges due to complexities introduced by NBFix and combining rules.

For long-time simulations, energy drift is a validation step that shows whether numerical leakage is minimized. Because many error sources exist, NVIDIA emphasizes that the library itself should not be the dominant cause. Compared with standard OpenMM using a smooth switching function for truncated Lennard-Jones interactions, the sample can isolate the cutoff truncation effect attributed to the residual in direct space under kernel splitting. NVIDIA says cuPotential reduces drift by several hundred fold compared with default Particle Mesh Ewald settings, far exceeding typical biomolecular simulation requirements. The drift trace covers 10 ns for a 10,000-molecule rigid water system, using a 9 Å cutoff for cuPotential and standard OpenMM and a 20 Å cutoff for converged Particle Mesh Ewald. The runs used 2 fs timesteps and 300 K simulation temperature. Energy drift is estimated as ΔE = E(t) – E(20ps), normalized over 60,000 degrees of freedom.

Developers can get started by visiting the NVIDIA/cuPotential GitHub repo, which includes additional examples, benchmarks, and code to integrate accelerated primitives into their own molecular dynamics simulations. NVIDIA thanks collaborators at D. E. Shaw Research and the Flatiron Institute's Center for Computational Mathematics for scientific and mathematical contributions, discussions, and guidance on the error analysis behind the new splitting and spreading methods. The practical value is narrow but meaningful: if your workload is an OpenMM molecular dynamics simulation with supported GPU hardware, rectangular periodic boxes, and Particle Mesh Ewald forces, cuPotential offers a tested path to GPU acceleration while keeping accuracy and drift checks close to the simulation code.

Common mistakes

  • Treating the plugin as a universal OpenMM replacement. It targets solvated, approximately uniform-density systems in rectangular periodic boxes and accepts Particle Mesh Ewald source forces; LJPME, triclinic boxes, and OpenMM particle or exception parameter offsets are not supported.
  • Creating the simulation context before replacing the nonbonded force. The cuPotential path replaces the system's OpenMM nonbonded force first, then uses the cuPotential integrator and optionally the cuPotential barostat.
  • Reading speedups as pure kernel gains. The reported throughput uses cuPotential's own force, integrator, and barostat for constant-pressure runs, so the number describes the integrated configuration on standard, non-alchemical systems.
  • Skipping accuracy and drift validation. The supplied sample uses double-precision references, fixed Ewald splitting parameters, 500 warm-up steps, and 3,000 timed steps, plus energy drift comparisons over 10 ns.
  • Misconfiguring the build environment. A host NVIDIA driver compatible with CUDA 13.1 is required, while a separate system-wide CUDA toolkit is not; the cuda-toolkit package installs the compilers, and setting cuda-version alone does not.

Comments (0)

  1. No comments yet. Be the first to share what worked for you.

Leave a comment

Comments are reviewed before they appear. Your email address is not published.