alchemi-toolkit-ops
Skill8 starsChanged 8 months agoMITView on GitHub
Provides NVIDIA ALCHEMI Toolkit-Ops patterns for GPU-accelerated atomistic simulation kernels. Applies to tasks involving neighbor list construction, electrostatic interactions (Ewald, PME, Coulomb, multipole), DFT-D3 dispersion corrections, molecular dynamics, GNN-based molecular property prediction, or high-throughput computational chemistry on NVIDIA GPUs.
- Installs packages
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- validate-skillsSkill
- autoresearch-setupSkill
- bionemoSkill
- biosimspaceSkill
- cuda-quantumSkill
- cutileSkill
- daskSkill
- flashinferSkill
- materials-projectSkill
- mpiSkill
- nemotronSkill
- omniverse-simreadySkill
- physicsnemoSkill
- polarsSkill
- prime-verifiersSkill
- qiskitSkill
- raySkill
- rdkitSkill
- slurmSkill
- tinkerSkill
- tritonSkill
The file
Files
ALCHEMI Toolkit-Ops
Overview
GPU-accelerated library of low-level, high-performance kernels for atomistic simulations, computational chemistry, and graph neural networks. Built on NVIDIA Warp, outputs native PyTorch tensors with full torch.compile compatibility. Covers neighbor list construction, long-range electrostatics (Ewald/PME/multipole), and DFT-D3 dispersion corrections — all with native batch processing for heterogeneous molecular systems.
Quick Pattern
Incorrect — CPU-based neighbor search without batching:
from scipy.spatial import KDTree
tree = KDTree(positions)
pairs = tree.query_pairs(cutoff)Correct — GPU-accelerated neighbor list with auto-dispatch:
import torch
from nvalchemiops.neighborlist import neighbor_list
positions = torch.randn(10000, 3, device="cuda")
cell = torch.eye(3, device="cuda").unsqueeze(0) * 30.0
pbc = torch.tensor([[True, True, True]], device="cuda")
result = neighbor_list(
positions, cutoff=5.0, cell=cell, pbc=pbc,
)
# result.neighbor_matrix: [N, max_neighbors], int32
# result.num_neighbors: [N], int32
# result.neighbor_matrix_shifts: [N, max_neighbors, 3], int32Quick Command
# Install from PyPI
pip install nvalchemi-toolkit-ops
# Install from source
pip install git+https://github.com/NVIDIA/nvalchemi-toolkit-ops.git
# Verify installation
python -c "import nvalchemiops; print(nvalchemiops.__version__)"
# Docker
docker run --gpus all nvidia/cuda:13.0.0-runtime-ubuntu24.04
# Then: pip install nvalchemi-toolkit-opsQuick Reference
Core Modules
| Module | Import | Purpose |
| Neighbor List | nvalchemiops.neighborlist | GPU-accelerated neighbor search |
| Ewald Summation | nvalchemiops.interactions.electrostatics | Long-range electrostatics O(N^2) |
| PME | nvalchemiops.interactions.electrostatics | Particle Mesh Ewald O(N log N) |
| Coulomb | nvalchemiops.interactions.electrostatics.coulomb | Direct Coulomb interactions |
| Multipole | nvalchemiops.interactions.electrostatics | Dipole/quadrupole Ewald/PME |
| DFT-D3 | nvalchemiops.interactions.dispersion.dftd3 | Dispersion corrections (BJ damping) |
| Spherical Harmonics | nvalchemiops.math.spherical_harmonics | Real spherical harmonics |
| GTO | nvalchemiops.math.gto | Gaussian Type Orbital functions |
Neighbor List Algorithms
| Method | Complexity | Auto-Selected When |
"naive" | O(N^2) | Single system, <5000 atoms |
"cell_list" | O(N) | Single system, >=5000 atoms |
"batch_naive" | O(N^2)/system | Batched small systems |
"batch_cell_list" | O(N)/system | Batched large systems |
"naive_dual_cutoff" | O(N^2) | cutoff2 provided |
"batch_naive_dual_cutoff" | O(N^2) | Batched + cutoff2 |
Electrostatics Methods
| Method | Complexity | Best For |
| Ewald Summation | O(N^(3/2)) | Systems <5000 atoms |
| PME | O(N log N) | Large periodic systems |
| Direct Coulomb | O(N * pairs) | Non-periodic or real-space only |
| Multipole Ewald/PME | Extended | Dipoles and quadrupoles |
Output Formats
| Format | Tensors | Best For |
| Neighbor Matrix (dense) | neighbor_matrix [N, max_nb], num_neighbors [N] | torch.compile, uniform density |
| Neighbor List (COO sparse) | neighbor_list [2, pairs], neighbor_ptr | GNNs, variable density |
Hardware Requirements
| Platform | Support | Notes |
| NVIDIA GPU (CC 8.0+) | Full GPU | A100, H100 recommended |
| CUDA Toolkit 12+ | Required for GPU | Driver 570.xx+ |
| CPU (x86/ARM) | Via Warp | Development/testing |
| Apple Silicon | CPU only | macOS support |
When to Apply
Reference these guidelines when:
- Building neighbor lists for molecular simulations or GNNs
- Computing long-range electrostatic interactions (periodic systems)
- Adding DFT-D3(BJ) dispersion corrections to DFT workflows
- Batching heterogeneous molecular systems for GPU throughput
- Integrating atomistic kernels with
torch.compile - Building molecular dynamics simulations with rebuild detection
- Computing multipole electrostatics for ML force fields
- Accelerating computational chemistry pipelines on NVIDIA GPUs
Priority-Ordered Guidelines
| Priority | Category | Impact | Prefix |
| 1 | Neighbor Lists | CRITICAL | neighbor-* |
| 2 | Electrostatics | CRITICAL | electrostatics-* |
| 3 | Dispersion Corrections | HIGH | dispersion-* |
| 4 | Math & Utilities | MEDIUM | math-* |
References
Full documentation with code examples in references/:
| File | Impact | Description |
| neighbor-lists.md | CRITICAL | Auto-dispatch, cell list, rebuild detection, pre-allocation, torch.compile |
| electrostatics.md | CRITICAL | Ewald, PME, Coulomb, multipole, parameter estimation, autograd |
| dispersion-corrections.md | HIGH | DFT-D3(BJ), D3Parameters, functional params, multi-pass kernels |
| math-and-utilities.md | MEDIUM | Spherical harmonics, GTO, batch processing, type converters |
Problem -> Skill Mapping
| Problem | Start With |
| Build neighbor list for molecules | neighbor-lists.md |
| Compute electrostatic energy/forces | electrostatics.md |
| Add dispersion corrections to DFT | dispersion-corrections.md |
| Batch multiple molecular systems | math-and-utilities.md |
| Optimize with torch.compile | neighbor-lists.md |
| Molecular dynamics with skin distance | neighbor-lists.md |
| Compute PME for large periodic system | electrostatics.md |
| Multipole electrostatics for ML | electrostatics.md |
| Compute coordination numbers | dispersion-corrections.md |
| GNN edge construction from atoms | neighbor-lists.md |
| Stress tensor from cell gradients | electrostatics.md |
| Choose Ewald vs PME | electrostatics.md |
Attribution
Based on NVIDIA ALCHEMI Toolkit-Ops documentation and nvalchemi-toolkit-ops repository.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

