Tools

AI-generated text

AI coding agents accelerate atomistic simulations using NVIDIA ALCHEMI Toolkit

NVIDIA’s ALCHEMI Toolkit combined with AI coding agents can generate end-to-end GPU-accelerated atomistic simulation workflows from natural-language prompts.

AI coding agents accelerate atomistic simulations using NVIDIA ALCHEMI Toolkit

Atomistic simulation requires scientific judgement, efficient implementations, and accessible interfaces. NVIDIA’s ALCHEMI Toolkit — introduced earlier this year — provides PyTorch-native, composable building blocks and in-flight batching that reduce the computational implementation barrier for Machine Learning Interatomic Potentials (MLIP). The remaining usability gap in MLIP tooling is addressed by combining the Toolkit with AI coding agents that load API "agent skills" on demand and generate runnable code from natural-language prompts.

End-to-end workflow with coding agents

This work demonstrates an end-to-end ALCHEMI Toolkit workflow driven by a coding agent: what researchers start with, how they prompt the agent, the resulting code and simulation pipeline, and validation on NVIDIA H200 GPUs. The team distilled lessons from a benchmark of 45 generated pipelines across three workflows, five prompt levels, and three samples per level.

System and package requirements

  • Python ≥3.11, <3.14
  • PyTorch ≥2.8
  • CUDA 12 or CUDA 13 with a compatible NVIDIA driver (570+ recommended)
  • OS: Linux (primary), macOS
  • NVIDIA GPU (RTX 20xx or newer), CUDA Compute Capability ≥7.0
  • Minimum 4 GB RAM (16 GB recommended for large systems)

Installation and environment

A runnable Python environment with the ALCHEMI Toolkit installed yields the most reliable generated code; letting the agent execute its generated scripts eliminates many mechanical errors. The benchmark used the following steps in essence:

  1. Create a local venv and install the toolkit (example: uv venv with Python 3.12, then uv pip install "nvalchemi-toolkit[mace,ase]==0.2.0", add CUDA extra if needed).
  2. Download agent skills matching the toolkit release tag (for example .claude/skills#v0.2.0).
  3. Install and start a coding agent (the benchmark used Claude Code). Allow the agent to run code in the project directory so it can load relevant skills and self-correct mechanical issues.

If an autorunnable shell is not available, a local source checkout is an acceptable fallback; pip install without shell or source was the weakest configuration in earlier tests.

Prompting best practices (benchmark-derived)

Five prompt levels were evaluated (Sketch, Goal, Recipe, Spec, Contract). Key lessons:

  • Always name the material, method, and scale; add a CLI contract for unattended runs. Naming these items yielded the best results. Full CLI contracts increased token cost (≈4×) and code size (≈2.3×) compared to Sketch prompts but produced fully reusable interfaces.
  • Specify material, phase, and reference convention explicitly. Under-specification yielded clear physics failures (e.g., an agent returning an argon demo for a lithium transport prompt). Protocol details matter: missing thermostat instructions changed dynamics and suppressed diffusion by 3–5×.
  • Specify constraints, not internal implementations. Describe what the script must accomplish and let skills provide API patterns; naming internals without full interfaces increases fragility.
  • Ask explicitly for self-assessment and premise-checks. Agents did not challenge physically ill-posed tasks unless prompted to validate plausibility, provide uncertainty estimates, and recover independent known results.

Three workflows and benchmark overview

Workflows tested: silicon equation of state (EOS), oxygen adsorption on Cu(111), and lithium self-diffusion (MD). All 45 scripts used batched GPU execution. Deterministic checks covered property and API-pattern coverage and reusability; execution on NVIDIA H200 GPUs provided ground truth.

Bulk silicon EOS

  • Task: compute the energy–volume curve for diamond-cubic silicon, extract the lattice constant a0 and bulk modulus B0 via Birch–Murnaghan fit.
  • Implementation: 50–60 strained volumes relaxed concurrently as one GPU batch, then fitted.
  • Results: all five production representative scripts agreed to the last digit: a0 = 5.4661 Å and B0 = 88.15 GPa, within the established all-electron PBE reference window. Differences to NIST experimental lattice constants and McSkimin’s experimental bulk modulus align with known PBE offsets. Prompt specificity affected code structure and cost but not the physics.

Oxygen adsorption on Cu(111)

  • Task: rank adsorption sites for atomic oxygen on Cu(111).
  • Implementation: freeze bottom slab layers, relax 24+ candidate configurations across four high-symmetry sites as one GPU batch, compute E_ads = E_slab+ads − E_clean_slab − E_O.
  • Results: every production representative found the fcc hollow most stable, E_ads(fcc) = −4.799 ± 0.004 eV across prompt levels, ordering fcc ≥ bridge > hcp >> top. Literature references report −4.31 eV at 0.25 monolayer and microcalorimetry values from −4.46 to −4.60 eV; coverage and model differences can explain stronger binding in these calculations.

Lithium self-diffusion (MD)

  • Task: estimate the self-diffusion coefficient D of liquid lithium.
  • Implementation: build bcc lithium supercell, melt and equilibrate above the 454 K melting point, run three temperatures × three seeds (nine replicas) as a single batched GPU system, extract D from MSD slope (Einstein relation).
  • Representative production results for NVE vs Langevin runs (values in cm^2/s):
    • L2 (Goal, Langevin): 600 K 0.80×10^-4, 800 K 1.03×10^-4, 1000 K 1.55×10^-4
    • L3 (Recipe, NVE): 600 K 2.91×10^-4, 800 K 5.38×10^-4, 1000 K 7.22×10^-4
    • L5 (Contract, NVE): 600 K 3.62×10^-4, 800 K 4.32×10^-4, 1000 K 6.49×10^-4
  • Observation: Langevin production dynamics suppressed transport by 3–5× relative to NVE; prompt level L4 was excluded because its generated script failed energy conservation.

Benchmark technical metadata

  • Coding agent: Claude (claude-opus-4-8)
  • Effort level: High
  • MLIP checkpoint: MACE-MPA-0 (medium-mpa-0)
  • Toolkit version: 0.2.0

Generation cost and script size increased with prompt specificity. For example, Sketch prompts used ~2.4M total tokens and produced ~498 LOC, while Contract prompts used ~10M tokens and produced ~1,168 LOC.

Key findings and limitations

  • Prompt specificity buys code structure: property coverage was 1.00 at all levels, but API-pattern coverage and interface reusability increased with more detailed prompts (full reusability only at the Contract level).
  • Agents default to familiar examples and pretraining priors; they used FIRE in 38 of 45 scripts and never used FIRE2 despite its documentation presence.
  • Execution on target GPUs revealed failures that CPU-only self-tests did not. A runnable shell reduced import errors, but GPU-path failures still occurred and more elaborate prompts exercised these paths more often.
  • Scientific judgement remains essential: agents did not challenge physically ill-posed requests, and without web access could not check plausibility. Agents pick plausible timesteps and thermostats but do not judge their suitability for the material or timescale.
  • MLIP models are not universally accurate: MACE-MPA-0 accuracy varies outside its training distribution; each new chemistry requires independent DFT or experimental validation.
  • Always compare numerical results with independent references: statistically consistent outputs can still be physically biased (e.g., thermostat-induced suppression).

Ecosystem adoption

Several companies are adopting related approaches. In May 2026 Matlantis released a public Skills library on GitHub and announced a Claude Code integration for its universal simulator; Dassault Systèmes – BIOVIA uses NVIDIA ALCHEMI NIM in the MARIE virtual companion to broaden access to simulation capabilities.

How to get started

See the NVIDIA/nvalchemi-toolkit GitHub repository and NVIDIA ALCHEMI Toolkit documentation for agent skills and over 30 example workflows across basic to distributed use cases.

Acknowledgements

Thanks to Nikita Fedik, Susumu Ohno (Matlantis Corporation), and James Wescott (Dassault Systèmes – BIOVIA) for contributions to the post.