Getting set up

Two routes. Pick one before the session starts.

If you are short of time

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.

Route 1: Google Colab

No install. Works on any machine with a browser, including an iPad.

  1. Open a notebook from the notebook list, or from the repository, by clicking its open in colab link.
  2. In the Colab menu choose Runtime → Change runtime type and select T4 GPU. Do this before running anything. If a runtime has already started, restart it after switching (Runtime → Restart session); a running runtime does not move to the GPU on its own. The free T4 makes the exercises roughly ten times faster.
  3. Run the first cell. It installs the packages and downloads the model parameters. This takes about a minute and prints nothing while it works, so it will look stalled. It is not.
  4. Run the rest of the cells in order.
Two things to know about Colab

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.

Route 2: a local install

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.

Will it run on your machine?

PlatformSupportedComputeNotes
Linux, x86-64yesNVIDIA 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, ARM64yesCPU Includes Raspberry Pi-class hardware and ARM cloud instances.
Windows 10 / 11, x86-64yesNVIDIA GPU or CPU The default PyTorch on Windows is CPU-only. See the GPU note below.
macOS, Apple SiliconyesCPU 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, Intelno— AIMNet2 needs PyTorch 2.8 or later, and PyTorch stopped publishing Intel-Mac builds after version 2.2. Use Colab.

Python version

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).

Install

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.

Check that it worked

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.

Before a conference: warm the cache

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.

Which model is which

Choosing a model is a chemical decision, not a performance one.

NameElementsCharge and spinUse it for
aimnet214closed shell the default; notebooks 0–4 and 6
aimnet2-202514closed shell a second opinion at a different level of theory
aimnet2-nse14any charge, any multiplicity radicals and ions; notebooks 5, 7 and 8. The transition-state search in notebook 5 uses it
aimnet2-rxnH C N Oneutral only reaction paths in neutral H, C, N, O systems. Appears in notebook 5 only to show it refusing a charged chloride system
aimnet2-pd14, plus Pdclosed 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.

One naming trap

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.