Skip to navigation

Custom Models

View as Markdown

The default launch flow downloads the MACE-MPA-0 medium checkpoint from Hugging Face at container startup. For the default setup, follow the Quickstart Guide.

For runtime tuning examples such as cell optimization and DFT-D3 dispersion, refer to Tuning Parameters.

Use Custom or Downloaded Models

You can use the default MACE-MPA-0 checkpoint or provide a supported MACE, AIMNet2, or TensorNet model by downloading it and mounting the model file or directory into the container. Choose the model type below for download hints and the exact arguments to pass when launching the container.

MACE models are for periodic systems only (pbc: true). The default MACE-MPA-0 medium checkpoint is downloaded from Hugging Face at container startup. User-provided checkpoints from the MACE-MP model family are supported, including checkpoints trained from that model family. To use a different supported MACE checkpoint, do the following:

Downloading a MACE model

Refer to the MACE foundation model GitHub releases for download links. For example:

curl -LO https://github.com/ACEsuit/mace-foundations/releases/download/mace_mpa_0/mace-mpa-0-medium.model
export ALCHEMI_MODEL_PATH=mace-mpa-0-medium.model

Launching the container with MACE

Run the following commands to launch the container:

export ALCHEMI_MODEL_PATH=/path/to/mace.model
export NGC_API_KEY=<Your NGC API Key>
docker run --rm -ti --name alchemi-bgr --gpus=all \
-e NGC_API_KEY \
-p 8000:8000 --shm-size=8g \
-v "${ALCHEMI_MODEL_PATH}:/opt/nim/.cache/mace.model:ro" \
-e ALCHEMI_NIM_DISABLE_MODEL_DOWNLOAD=true \
-e ALCHEMI_NIM_MODEL_TYPE="mace" \
-e ALCHEMI_NIM_MODEL_PATH=/opt/nim/.cache/mace.model \
nvcr.io/nim/nvidia/alchemi-bgr:1.1.0

Example Configurations

This section is a quick reference for common model configurations. For tuning-focused launch examples, refer to Tuning Parameters.

MACE for Periodic Materials (Default)

Run the following commands:

export NGC_API_KEY=<Your NGC API Key>
docker run --rm -ti --name alchemi-bgr --gpus=all \
-e NGC_API_KEY \
-p 8000:8000 --shm-size=8g \
nvcr.io/nim/nvidia/alchemi-bgr:1.1.0

AIMNet2 for Organic Molecular Systems

Run the following commands:

export ALCHEMI_MODEL_PATH=/path/to/aimnet-model.pt
docker run --rm -ti --name alchemi-bgr --gpus=all \
-e NGC_API_KEY \
-p 8000:8000 --shm-size=8g \
-v "${ALCHEMI_MODEL_PATH}:/opt/nim/.cache/aimnet.pt:ro" \
-e ALCHEMI_NIM_DISABLE_MODEL_DOWNLOAD=true \
-e ALCHEMI_NIM_MODEL_TYPE="aimnet2" \
-e ALCHEMI_NIM_MODEL_PATH="/opt/nim/.cache/aimnet.pt" \
-e ALCHEMI_NIM_PBC=false \
nvcr.io/nim/nvidia/alchemi-bgr:1.1.0