Skip to navigation

Custom Models

View as Markdown

The default launch flow uses the bundled MACE-MPA-0 model. 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

The bundled MACE model (auto-downloaded with an NGC API key) can be used, or you can provide MACE, AIMNet2, or TensorNet models by downloading them 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 model is bundled and auto-downloaded when NGC_API_KEY is set. To use a different MACE model (for example, a custom-trained model), 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 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.0.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.0.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 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.0.0