High-performance open-source deep-learning framework for exploring, building and deploying AI atomic simulation workflows.
Project description
NVIDIA ALCHEMI Toolkit
High-performance deep-learning framework for atomic simulations
NVIDIA ALCHEMI Toolkit is a GPU-first Python framework for building, running, and deploying AI-driven atomic simulation workflows. It provides a unified interface for machine-learned interatomic potentials (MLIPs), batched molecular dynamics, and composable multi-stage simulation pipelines: all designed for high throughput on NVIDIA GPUs.
Key Features
- Bring your own model — wrap any MLIP (MACE, AIMNet2, or your own) with
a standard
BaseModelMixinthat handles input/output adaptation, capability negotiation, and runtime control viaModelConfig - Graph-structured data —
AtomicDataandBatchprovide Pydantic-backed, GPU-resident graph representations with built-in serialization to Zarr - Composable dynamics — subclass
BaseDynamicsfor custom integrators; compose stages with+(single-GPUFusedStage) or|(multi-GPUDistributedPipeline) - Pluggable hook system — nine insertion points per step for logging, safety checks, enhanced sampling, profiling, and convergence detection
- Inflight batching —
SizeAwareSamplerreplaces graduated samples on the fly, maximizing GPU utilization across long-running pipelines - High-performance primitives — built on
nvalchemi-toolkit-opsfor GPU-optimized neighbor lists, dispersion, and electrostatics via NVIDIAwarp-lang - Agents as first-class citizens; includes core
SKILLS.mdlibrary that teach agents how to usenvalchemiefficiently in agentic workflows. Simply copy the.claude/skillsfolder contents to your project repository or home directory depending on use case and agent platform (e.g. Claude Code, Cursor, OpenCode).
Example Snippets
Build atomic data and run a batched forward pass
import torch
from nvalchemi.data import AtomicData, Batch
from nvalchemi.models.demo import DemoModel, DemoModelWrapper
# Create two molecules
mol_a = AtomicData(
positions=torch.randn(4, 3),
atomic_numbers=torch.tensor([6, 6, 1, 1], dtype=torch.long),
)
mol_b = AtomicData(
positions=torch.randn(3, 3),
atomic_numbers=torch.tensor([8, 1, 1], dtype=torch.long),
)
# Batch for GPU-efficient inference
batch = Batch.from_data_list([mol_a, mol_b])
# Wrap a model and run
model = DemoModelWrapper(DemoModel())
outputs = model(batch)
print(outputs["energy"].shape) # [2, 1] — one energy per system
print(outputs["forces"].shape) # [7, 3] — one force vector per atom
Geometry optimization with convergence detection
from nvalchemi.dynamics import DemoDynamics, ConvergenceHook
from nvalchemi.dynamics.hooks import LoggingHook, NaNDetectorHook
dynamics = DemoDynamics(
model=model,
n_steps=10_000,
dt=0.5,
convergence_hook=ConvergenceHook.from_fmax(0.05),
hooks=[LoggingHook(frequency=100), NaNDetectorHook()],
)
with dynamics:
result = dynamics.run(batch)
Multi-stage pipeline: relax then MD (single GPU)
from nvalchemi.dynamics import DemoDynamics
optimizer = DemoDynamics(model=model, dt=0.5)
md = DemoDynamics(model=model, dt=1.0)
# + fuses stages: one forward pass, masked updates per sub-stage
fused = optimizer + md
with fused:
fused.run(batch)
Distributed pipeline across GPUs
# Launch with: torchrun --nproc_per_node=2 my_pipeline.py
from nvalchemi.dynamics import DemoDynamics
optimizer = DemoDynamics(model=model, dt=0.5)
md = DemoDynamics(model=model, dt=1.0)
# | distributes stages: one dynamics per GPU rank
pipeline = optimizer | md
with pipeline:
pipeline.run()
Installation
The quickest way to install:
pip install nvalchemi-toolkit
For development:
git clone https://github.com/NVIDIA/nvalchemi-toolkit.git
cd nvalchemi-toolkit
uv sync --all-extras
Optional extras:
pip install nvalchemi-toolkit[mace] # MACE model support
See the Installation Guide for detailed setup instructions.
Contributions & Disclaimers
NVIDIA ALCHEMI Toolkit is in public beta. During this phase, the API is subject to change. Feature requests, bug reports, and general feedback are welcome via GitHub Issues.
License
Apache 2.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nvalchemi_toolkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nvalchemi_toolkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 332.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa5e0daecbd2be425f1e9840eb5cbc7652f3232831489c51df80f4b9b16e4f7c
|
|
| MD5 |
fec3b5f95b63b4a90a5d582a0a9d9762
|
|
| BLAKE2b-256 |
408e74e7f828f60e2baddf9482f3bd7bfa2af996b8242c6cfd4c32dcc1f5b393
|