Quickstart for MSA Search
This quickstart walks you through starting the MSA Search NIM container and running your first MSA, paired MSA, and structural template search requests.
Prerequisites
Before you begin, ensure you have completed the setup described in Prerequisites and the Support Matrix, including:
- Compatible hardware and software (see Support Matrix)
- Python 3 with the
requestsmodule (for running examples) jq(for the template search shell example)
Start the NIM Container
To start the NIM container, complete the following steps:
-
Create a local cache directory for the NIM.
The container runs as UID/GID 1000 (
nvs), and the directory must be writable by that user. If your account is a different UID, the followingchownassigns the cache to1000. Leave the container user unchanged so the service can create/opt/nim/workspace. Refer to Volumes. -
Start the NIM container.
The first time you start the container, it will download approximately 1.4 TB of database files to the local cache. This process can take several hours depending on your internet connection speed. Subsequent starts will use the cached data.
-
Confirm the service is ready to respond to inference requests.
MSA Search Examples
The following examples demonstrate how to use the MSA Search NIM to perform multiple sequence alignment on protein sequences.
For comprehensive descriptions of all available API parameters, refer to the API Reference. For information on assessing model performance, refer to Benchmarking.
Python Client Example
The following example shows how to search for similar sequences and generate a multiple sequence alignment. To run the example, complete the following steps:
-
Save the following Python example to a file named
nim_client.py. -
Execute the example.
The example will display the alignment results for each database, showing the format and a preview of the alignment content.
Shell Client Example
You can also use curl to send requests directly:
Paired MSA Search for Protein Complexes
The MSA Search NIM also supports paired MSA search for protein complexes (multimers). Paired search finds homologous sequences for each chain and pairs them by species, preserving co-evolutionary signals essential for accurate complex structure prediction.
Python Client Example for Paired Search
To perform a paired MSA search for a two-chain protein complex, complete the following steps:
-
Save the following Python example to a file named
nim_client_paired.py. -
Execute the example.
Shell Client Example for Paired Search
You can also use curl to send paired MSA requests:
The response contains alignments_by_chain with paired alignments for each chain (for example, “A”, “B”), where each chain has the same number of sequences paired by species.
Structural Template Search
The MSA Search NIM supports structural template search for finding homologous protein structures. Template search queries PDB databases to find proteins with similar structures and retrieves the corresponding mmCIF structure files.
Python Client Example for Template Search
To run a structural template search, complete the following steps:
-
Save the following Python example to a file named
nim_client_template_search.py. -
Execute the example.
Shell Client Example for Template Search
Search for a template:
The response includes:
search_hits: Template hits in M8 format organized by databasestructures: Retrieved mmCIF structure files for the top hitsalignments: MSA alignments (same as standard MSA search)
For detailed API parameters, refer to the API Reference.
RNA MSA Search
The MSA Search NIM supports RNA MSA search for nucleotide sequence homologs. By default, the NIM is configured for protein databases. To start the NIM in RNA search mode, select the databases:rna model profile (refer to Task-Specific Profiles and Custom Databases for details).
Start the NIM in RNA Mode
If the protein NIM container is still running from the earlier example, stop it first (press Ctrl+C or run docker stop on the container) to free port 8000.
The RNA databases (RNAcentral) are approximately 94 GB. The first start downloads them to the local cache.
Python Client Example (RNA)
To run the RNA MSA search example, complete the following steps:
-
Save the following Python example to a file named
nim_client_rna.py. -
Execute the example.
Shell Client Example (RNA)
Stop the Container
The docker run preceding command uses -it --rm, so press Ctrl+C in the terminal running the container to stop it and remove it.
Next Steps
- Benchmarking - View benchmarking results and learn how to run your own performance tests
- Configuration - Configure environment variables, GPU selection, and volume mounting
- Task-Specific Profiles and Custom Databases - Reduce storage requirements with profiles or use custom databases
- Scaling - Learn about scaling strategies for production deployments
- API Reference - Reference the comprehensive API documentation with all available parameters