Configuration Alternatives at Runtime
This section provides a guide on how to run the OpenFold3 NIM with different settings for
- port number for http requests
- backend
- template processing
These instructions assume
- You have installed and set up Prerequisite Software (Docker, NGC CLI, NGC registry access).
- You have pulled the container as described in Getting Started
Start the OpenFold3 NIM
To start the NIM:
The meaning of the following docker run options are given below
- The
-poption sets the port for the NIM. - The
-eoptions define the environment variables, which are passed into the NIM’s container at runtime. - The
--rmoption removes the container and associated file system usage when it exits / terminates.
Using an Alternative Port for OpenFold3 NIM Requests
If you have other HTTP servers running (for example, other NIMs), you may need to make the 8000 port available by using another port for your NIM. To use an alternative port:
- Change the exposed port by setting the
-poption. - Set the
NIM_HTTP_API_PORTenvironment variable to the new port.
The following is an example of setting the NIM to run on port 6626:
Backend Optimization Options
By default, the NIM will run in TensorRT mode for supported GPUs. You can override the default backend optimization by setting the NIM_OPTIMIZED_BACKEND environment variable.
The following backend options are available:
trt(default): TensorRT with cuEquivariance kernels for optimized performance on supported GPUstorch: PyTorch with cuEquivariance kernels for GPU memory-management and accelerationtorch_baseline: PyTorch with DeepSpeed kernels for GPU memory-managment and acceleration
Running with PyTorch+cuEquivariance
The following is an example of setting the NIM to run with PyTorch+cuEquivariance:
Running with PyTorch+DeepSpeed
The following is an example of setting the NIM to run with PyTorch+DeepSpeed:
Template Configuration Options
Configuring Template Chain Selection Threshold
When using structural templates, the NIM validates that template chains have sufficient similarity to your query sequence. You can control the minimum score threshold using the CIF_DIRECT_MIN_SCORE environment variable.
Score Calculation:
The variables are:
sequence_identity: Fraction of aligned residues that match between template and queryquery_coverage: Fraction of the query sequence covered by the alignment
Default Value: 0.1 (10% identity × coverage)
How It Works:
- With
chain_idspecified: The specified chain in the input CIF string, is validated against the threshold. If the score is below the threshold, the template is rejected. - Without
chain_id(automatic selection): All chains in the input CIF string are evaluated. The best matching chain is selected only if its score meets the threshold. If no chain meets the threshold, then no chain from the input CIF string is used.
The chain_id parameter is specified in the inference request payload when providing structural templates. For example, in the templates field of your API request, you can include "chain_id": "A" to specify which chain from the input CIF string should be used for alignment validation.
Configuration Example:
Guidance:
- Lower values (0.05-0.15): More permissive, includes template sequence with very few residues in common with the query sequence.
- Default value (0.1): Balanced approach for most use cases.
- Higher values (0.2-0.4): More restrictive, includes only template sequences with many residues in common with the query sequence.