Two routes. Pick one before the session starts.
Use Google Colab. It needs a browser and a Google account, nothing else, and it gives you a free GPU. The local install is worth doing if you want to keep using AIMNet2 afterwards, and it is the only way to work offline.
No install. Works on any machine with a browser, including an iPad.
Each notebook is a separate machine. Opening notebook 3 does not inherit anything from notebook 2, so the first cell has to run again. That is why every notebook is self-contained.
Your edits are not saved unless you choose File → Save a copy in Drive. Do that first if you want to keep your answers.
About five minutes, plus the PyTorch download: about 3 GB on Linux x86-64, roughly 120 MB of torch plus 150 MB of warp on Windows, and roughly 150 MB on an Apple Silicon Mac.
| Platform | Supported | Compute | Notes |
|---|---|---|---|
| Linux, x86-64 | yes | NVIDIA GPU or CPU | A CUDA-enabled PyTorch is installed automatically. It needs NVIDIA driver 580 or newer; see the Linux tab for older drivers. |
| Linux, ARM64 | yes | CPU | Includes Raspberry Pi-class hardware and ARM cloud instances. |
| Windows 10 / 11, x86-64 | yes | NVIDIA GPU or CPU | The default PyTorch on Windows is CPU-only. See the GPU note below. |
| macOS, Apple Silicon | yes | CPU | M1 and later. AIMNet2 does not use the Metal (MPS) backend, so everything runs on the CPU cores. That is fine for this tutorial. |
| macOS, Intel | no | — | AIMNet2 needs PyTorch 2.8 or later, and PyTorch stopped publishing Intel-Mac builds after version 2.2. Use Colab. |
You need Python 3.11 or later. AIMNet2 declares
requires-python >= 3.11 and will refuse to install on 3.10 or older.
Check with python3 --version (macOS, Linux) or py --version
(Windows; Store Python: python --version).
Pick your platform. Each block creates an isolated environment so nothing lands in your system Python.
Terminal, on an Apple Silicon Mac. If you do not have Python 3.11+, install it
with Homebrew: brew install python@3.12.
# make a folder for the tutorial and a virtual environment inside it
mkdir ~/aimnet2-tutorial && cd ~/aimnet2-tutorial
python3 -m venv .venv
source .venv/bin/activate
# install (about 150 MB)
pip install --upgrade pip
pip install "aimnet[ase]" rdkit py3Dmol sella matplotlib jupyterlab
# get the notebooks
git clone https://github.com/isayevlab/ml4mol2026-aimnet2.git
cd ml4mol2026-aimnet2
jupyter lab
Next time you come back, cd ~/aimnet2-tutorial and
source .venv/bin/activate before jupyter lab.
PowerShell. Install Python from python.org
or the Microsoft Store first, and tick Add python.exe to PATH.
(Store Python does not ship the py launcher: use
python -m venv .venv and python --version.)
# make a folder for the tutorial and a virtual environment inside it
mkdir $HOME\aimnet2-tutorial; cd $HOME\aimnet2-tutorial
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
# install (roughly 120 MB torch plus 150 MB warp)
python -m pip install --upgrade pip
pip install "aimnet[ase]" rdkit py3Dmol sella matplotlib jupyterlab
# get the notebooks
git clone https://github.com/isayevlab/ml4mol2026-aimnet2.git
cd ml4mol2026-aimnet2
jupyter lab
Windows blocks local scripts by default. Allow them for your account once:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
then run .\.venv\Scripts\Activate.ps1 again. In
cmd.exe instead of PowerShell the activation command is
.venv\Scripts\activate.bat.
The PyTorch published on PyPI for Windows is CPU-only; the CUDA build comes from PyTorch's own index. Install it before AIMNet2:
pip install torch --index-url https://download.pytorch.org/whl/cu126
pip install "aimnet[ase]" rdkit py3Dmol sella matplotlib jupyterlab
The cu126 build needs NVIDIA driver 525 or newer; the current
options are listed at
pytorch.org/get-started/locally.
Without this everything still works, just on the CPU.
torch.compile is unavailable on Windows, which has no C++ compiler
or Triton, so the setup cell in every notebook disables it automatically there.
Nothing to do.
# make a folder for the tutorial and a virtual environment inside it
mkdir ~/aimnet2-tutorial && cd ~/aimnet2-tutorial
python3 -m venv .venv
source .venv/bin/activate
# install (about 3 GB on x86-64, because the PyTorch wheel bundles CUDA)
pip install --upgrade pip
pip install "aimnet[ase]" rdkit py3Dmol sella matplotlib jupyterlab
# get the notebooks
git clone https://github.com/isayevlab/ml4mol2026-aimnet2.git
cd ml4mol2026-aimnet2
jupyter lab
On x86-64 Linux the PyPI PyTorch wheel has bundled CUDA 13.0 since torch 2.11,
which needs NVIDIA driver 580 or newer. On an older driver the install succeeds but
torch.cuda.is_available() is silently False. Check the
driver version with nvidia-smi first; if it is below 580, install torch
from the CUDA 12.6 index before the rest:
pip install torch --index-url https://download.pytorch.org/whl/cu126
pip install "aimnet[ase]" rdkit py3Dmol sella matplotlib jupyterlab
On a laptop without an NVIDIA GPU, install the CPU build first instead. It cuts the download from about 3 GB to about 200 MB:
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install "aimnet[ase]" rdkit py3Dmol sella matplotlib jupyterlab
Either way, confirm with:
python -c "import torch; print(torch.cuda.is_available())"
If you already use conda or mamba. Works the same on all three platforms.
conda create -n aimnet2 python=3.12 -y
conda activate aimnet2
pip install "aimnet[ase]" rdkit py3Dmol sella matplotlib jupyterlab
git clone https://github.com/isayevlab/ml4mol2026-aimnet2.git
cd ml4mol2026-aimnet2
jupyter lab
Install the packages with pip even inside conda. AIMNet2 is not on
conda-forge, and mixing the two channels for PyTorch causes more problems than it
solves.
Open notebooks/0_orientation.ipynb and run every cell. It ends with
four checks and prints whether a GPU was found. Or, from a terminal:
python -c "from aimnet.calculators import AIMNet2Calculator as C; C('aimnet2'); print('AIMNet2 works')"
That one line works in bash, zsh and PowerShell alike. It prints a CUDA warning first on any machine without an NVIDIA card, which is expected.
Do this at home, on a network you trust.
Model parameters are downloaded the first time each model is used, not at install
time, and they land in ~/.cache/aimnet
(C:\Users\<you>\.cache\aimnet on Windows). Each file is about
9 MB. The tutorial uses four of them. Fetching them in a lecture theatre on
shared wifi, thirty people at once, is the single most likely way for the session to
stall.
Run this once beforehand and the notebooks will need no network at all:
python -c "
from aimnet.calculators import AIMNet2Calculator
for m in ('aimnet2', 'aimnet2-2025', 'aimnet2-nse', 'aimnet2-rxn'):
AIMNet2Calculator(m); print('cached', m)
"
To keep the cache somewhere else, set AIMNET_CACHE_DIR before
running Python.
Choosing a model is a chemical decision, not a performance one.
| Name | Elements | Charge and spin | Use it for |
|---|---|---|---|
aimnet2 | 14 | closed shell | the default; notebooks 0–4 and 6 |
aimnet2-2025 | 14 | closed shell | a second opinion at a different level of theory |
aimnet2-nse | 14 | any charge, any multiplicity | radicals and ions; notebooks 5, 7 and 8. The transition-state search in notebook 5 uses it |
aimnet2-rxn | H C N O | neutral only | reaction paths in neutral H, C, N, O systems. Appears in notebook 5 only to show it refusing a charged chloride system |
aimnet2-pd | 14, plus Pd | closed shell | palladium. Not a gas-phase model: its energies are not comparable with any other member's |
The fourteen elements are H, B, C, N, O, F, Si, P, S, Cl, As, Se, Br and I. There
is no solvent in any of these models except aimnet2-pd.
The package on PyPI is aimnet, not
aimnet2 or aimnet2calc. The old
isayevlab/AIMNet2 repository is deprecated, and any instructions that
begin by cloning it and running setup.py install are out of date.