> This page is for NVIDIA NIM for Batched Geometry Relaxation, version 1.1.0 (Latest) (default).
> 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.

# Tuning Parameters

Use the [Quickstart Guide](/nim/alchemi/alchemi-bgr/quickstart-guide) to launch the default NIM. For model-specific setup, refer to [Custom Models](/nim/alchemi/alchemi-bgr/custom-models).

## Configuration Options

For the complete configuration reference and all environment variables, refer to
[Configuration](/nim/alchemi/alchemi-bgr/configuration) and
[Environment Variables](/nim/alchemi/alchemi-bgr/environment-variables).

## Example Configurations

The following examples highlight runtime options that affect optimization
behavior.

### TensorNet With Cell Optimization

Run the following commands:

```bash
export ALCHEMI_MODEL_PATH=/path/to/model-dir
```

```bash
docker run --rm -ti --name alchemi-bgr --gpus=all \
    -p 8000:8000 --shm-size=8g \
    -v "${ALCHEMI_MODEL_PATH}:/opt/nim/.cache/TensorNet:ro" \
    -e ALCHEMI_NIM_DISABLE_MODEL_DOWNLOAD=true \
    -e ALCHEMI_NIM_MODEL_TYPE="tensornet" \
    -e ALCHEMI_NIM_MODEL_PATH="/opt/nim/.cache/TensorNet" \
    -e ALCHEMI_NIM_BGR_CELLOPT=true \
    -e ALCHEMI_NIM_BGR_OPTTOL_PRESSURE=0.1 \
    nvcr.io/nim/nvidia/alchemi-bgr:1.1.0
```


### MACE With DFT-D3 Dispersion

Run the following commands:

```bash
export NGC_API_KEY=<Your NGC API Key>
```

```bash
docker run --rm -ti --name alchemi-bgr --gpus=all \
    -e NGC_API_KEY \
    -p 8000:8000 --shm-size=8g \
    -e ALCHEMI_NIM_DFTD3_ENABLED=true \
    -e ALCHEMI_NIM_DFTD3_PARAM='{"s8": 0.7875, "a1": 0.4289, "a2": 4.4407}' \
    nvcr.io/nim/nvidia/alchemi-bgr:1.1.0
```


## Per-Request Parameters

Individual requests can override global configuration parameters as shown in the following example:

```python
import requests

package = {
    'atoms': [{
        'coord': [0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
        'numbers': [1, 1],
        'cell': [10, 0, 0, 0, 10, 0, 0, 0, 10],
    }],
    # Override global settings for this request
    'opttol': 0.001,        # Tighter force convergence
    'cellopt': True,        # Enable cell optimization
    'opttol_pressure': 0.1  # Tighter pressure convergence
}

result = requests.post("http://localhost:8000/v1/infer", json=package)
print(result.json())
```