> This page is for NVIDIA NIM for Batched Geometry Relaxation, version 1.0.0.
> For other versions, use one of these documentation indexes:
> - 1.1.0 (Latest) (default): https://docs.nvidia.com/nim/alchemi/alchemi-bgr/1.1.0/llms.txt
> - 1.0.0: https://docs.nvidia.com/nim/alchemi/alchemi-bgr/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/alchemi/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nim/alchemi/_mcp/server.

# Environment Variables

Configure NIM for BGR behavior at container startup using the
following environment variables.

## Required Variables

The following variable is required to download models from NGC:

| Variable | Required | Default | Description |
|---|---|---|---|
| `NGC_API_KEY` | Yes (for MACE auto-download) | -- | NGC authentication key. Required for the container to download the bundled MACE model from NGC. |

## Configuration Variables

Use the following variables to configure the NIM:

| Variable | Type | Default | Description |
|---|---|---|---|
| `ALCHEMI_NIM_MODEL_TYPE` | string | `"mace"` | Model type: `mace`, `aimnet2`, or `tensornet`. |
| `ALCHEMI_NIM_MODEL_PATH` | string | null | Path to the model file or directory inside the container. |
| `ALCHEMI_NIM_PBC` | bool | true | Periodic boundary conditions mode. |
| `ALCHEMI_NIM_BATCH_SIZE` | int | null | Fixed batch size (`null` enables automatic estimation at startup). |
| `ALCHEMI_NIM_BGR_OPTTOL` | float | 0.005 | Force tolerance (eV/Å). Can be overridden per request. |
| `ALCHEMI_NIM_BGR_MAX_STEPS` | int | 2000 | Maximum optimization steps. Can be overridden per request. |
| `ALCHEMI_NIM_BGR_CELLOPT` | bool | false | Enable cell optimization. Can be overridden per request. |
| `ALCHEMI_NIM_BGR_OPTTOL_PRESSURE` | float | 0.5 | Pressure tolerance (kBar) for cell optimization. Can be overridden per request. |
| `ALCHEMI_NIM_BGR_OPTIMIZER_PRESET` | string | `"materials"` | Optimizer preset: `materials` or `molecules`. |
| `ALCHEMI_NIM_DFT3_ENABLED` | bool | false | Enable DFT-D3(BJ) dispersion correction. |
| `ALCHEMI_NIM_DFT3_PARAM` | string (JSON) | null | JSON string containing custom DFT-D3(BJ) parameters (for example, `{"s8": 0.3908, "a1": 0.5660, "a2": 3.1280}`). Refer to the [ALCHEMI Toolkit-Ops documentation](https://nvidia.github.io/nvalchemi-toolkit-ops/index.html) for details. |

## Container Runtime Variables

Use the following variables to configure the container runtime:

| Variable | Required | Default | Description |
|---|---|---|---|
| `NIM_HTTP_API_PORT` | No | `8000` | HTTP port for the inference API. |
| `NIM_DISABLE_MODEL_DOWNLOAD` | No | false | Whether to automatically download the default MACE model from NGC. |

For launch examples, refer to [Quickstart Guide](/nim/alchemi/alchemi-bgr/1.0.0/quickstart-guide),
[Custom Models](/nim/alchemi/alchemi-bgr/1.0.0/custom-models), and
[Tuning Parameters](/nim/alchemi/alchemi-bgr/1.0.0/tuning-parameters).

## Related Topics

- [Configuration](/nim/alchemi/alchemi-bgr/1.0.0/configuration) for configuration options, per-request overrides, and model configuration
- [Supported Models](/nim/alchemi/alchemi-bgr/1.0.0/overview#supported-models) for model sourcing
- [Quickstart Guide](/nim/alchemi/alchemi-bgr/1.0.0/quickstart-guide) for initial launch steps