Skip to content

research: Evaluate JAX-ReaxFF integration as a q2mm backend #179

Description

@ericchansen

Summary

Evaluate integrating JAX-ReaxFF as a q2mm backend or adopting its architecture for q2mm's own engines. JAX-ReaxFF reports 10–100× GPU speedup for reactive force field fitting using a vmap-batched, JIT-compiled, gradient-based pipeline.

Motivation

GPU benchmark analysis identifies two non-exclusive paths to GPU acceleration:

  1. Restructure q2mm's own objective into an end-to-end JIT-compiled params → loss function (tracked in perf: Restructure JAX objective as end-to-end differentiable loss (JAX-ReaxFF pattern) #176)
  2. Integrate JAX-ReaxFF as a backend, gaining access to a mature GPU-optimised reactive force field engine

This issue tracks option 2. These are not mutually exclusive — JAX-ReaxFF integration could coexist with q2mm's own JIT-compiled loss pipeline.

What JAX-ReaxFF provides

  • Reactive force field (ReaxFF) energy evaluation in pure JAX
  • vmap over all training geometries in a single kernel launch
  • Analytical gradients via jax.grad through the full energy computation
  • Gradient-based L-BFGS optimisation inside JAX's traced computation graph
  • float32 sufficient for their workloads
  • Proven GPU speedups (10–100× over serial implementations)

Sources:

Open questions

  • Should JAX-ReaxFF be a new engine alongside JaxEngine, or should its architecture inform how we restructure q2mm's existing engines?
  • JAX-ReaxFF only needs 1st-order gradients (no Hessians) — would q2mm's frequency fitting (which needs Hessians) still benefit from their architecture?
  • Is ReaxFF force field fitting a use case q2mm should support? Or is the value mainly in learning from their architecture?
  • How would this interact with the cycling loop (GRAD + SIMP)?

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend-specific (OpenMM, Tinker, JAX, etc.)researchInvestigation and feasibility studies

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions