Example Requests
Use the OpenFold3 NIM
OpenFold3 NIM predicts 3D structures of biomolecular complexes including proteins, DNA, RNA, and ligands. The NIM supports multiple prediction modes: protein-only structure prediction, protein-DNA/RNA complexes, protein-ligand interactions, and template-guided predictions.
Try It Out
The following example shows a basic protein structure prediction. This script predicts the structure of a small protein and saves the result.
Save this script as predict.py and run it:
Try Out Other Prediction Use Cases
The following examples show how to customize the data field for different prediction scenarios. To try them, replace the data dictionary in the script above with these examples.
Protein-DNA Complex
Use this example for modeling protein-DNA interactions. For double-stranded DNA (dsDNA), both complementary strands must be entered as separate molecules.
Protein-Ligand With SMILES
For modeling protein-ligand interactions using SMILES notation:
Protein-Ligand With CCD Code
For modeling protein-ligand interactions using Chemical Component Dictionary codes:
Protein With Structural Templates
For template-guided protein structure prediction using experimental or predicted structures:
Structural templates can significantly improve prediction accuracy. For detailed information on template processing, selection strategies, and best practices, refer to Template Processing.
Multi-Chain Protein Complex With MSAs
For predicting complex biomolecular assemblies with multiple protein chains and detailed MSAs:
Understand the API
This section provides detailed information about the OpenFold3 NIM API structure, requirements, and validation rules.
Endpoint
/biology/openfold/openfold3/predict: Predicts the 3D structure of a biomolecular complex from input sequences
Request Structure
A complete request consists of:
Request-Level Fields:
request_id(optional): Identifier for the entire request (max 128 characters)inputs(required): List containing exactly one input specification
Input-Level Fields:
input_id(optional): Unique identifier for this structure prediction (max 128 characters, default: “input_id_0”)molecules(required): List of molecules to predict as a complex (minimum 1)diffusion_samples(optional): Number of independent structures to generate (1-5, default: 1)output_format(optional): Output format -"cif"(default) or"pdb"
Molecule Specification
Each molecule in the molecules list requires:
Common Fields:
type(required): Must be"protein","dna","rna", or"ligand"id(optional): Chain identifier(s) - single string or list of strings (1-4 alphanumeric characters each)
For Proteins, DNA, RNA:
sequence(required): Amino acid or nucleotide sequence (1-4096 characters)- Proteins: Standard single-letter amino acid codes
- DNA: A, T, C, G
- RNA: A, U, C, G
For Proteins (MSA required):
msa(conditional): Single-chain multiple sequence alignment (required unlesspaired_msaprovided)paired_msa(optional): Joint MSA for modeling chain-chain interactionsstructural_templates(optional): List of structural templates in CIF format
For RNA (MSA required):
msa(required): Single-chain multiple sequence alignment
For Ligands (one required):
ccd_codes(conditional): Chemical Component Dictionary code (for example, “ATP”, “CL”)smiles(conditional): SMILES string (for example, “CC(=O)OC1=CC=CC=C1C(=O)O”)
For proteins, either msa or paired_msa is required. If you want to provide an MSA with 0 hits, include an MSA containing only the query sequence.
MSA Structure
The msa and paired_msa fields use a nested dictionary structure:
MSA Requirements:
- First sequence must exactly match the input protein/RNA sequence (without gaps)
- Format names must be lowercase:
"a3m"or"csv" - Maximum 3 MSA databases per protein
- Gaps represented by
-characters - A3M format: lowercase letters represent insertions relative to query
A3M Format Example:
CSV Format Example:
Structural Templates
For template-guided predictions, each template requires:
structure(required): CIF file contents as stringformat(required): Must be"cif"name(optional): Template identifierchain_id(optional): Specific chain to use from multi-chain CIF (1-10 alphanumeric characters)
Prepare MSAs
For production use, generate MSAs using sequence homology search tools:
Recommended Tools:
- ColabFold - Fast MSA generation
- For multi-chain inputs with pairing, post-process the
pair.a3mfile by filtering null characters and splitting by chain
- For multi-chain inputs with pairing, post-process the
- OpenFold3 MSA script - Includes colabfold mode with automatic chain splitting
- HHBlits - Traditional MSA generation
Workflow:
- Run MSA tools for each distinct protein/RNA sequence
- Convert results to A3M or CSV format
- Ensure first sequence matches your input sequence exactly
- For multi-chain complexes, optionally generate paired MSAs
Response Structure
The response contains:
request_id: Echo of the request IDoutputs: List with a single output object:input_id: Echo of the input IDstructures_with_scores: List of predicted structures (ranked, best first):structure: Predicted structure in CIF or PDB format (string)format: Output format ("cif"or"pdb")confidence_score: Sample ranking scorecomplex_plddt_score: Average pLDDT score for the complexcomplex_pde_score: Average PDE score for the complexptm_score: Predicted TM score for the complexiptm_score: Predicted TM score for interfaces
runtime_metrics(optional): Performance metrics
Field Reference Tables
Request-Level Fields
Input-Level Fields
Molecule Fields
AlignmentFileRecord Fields
StructuralTemplate Fields
Important Validation Rules
Ensure you follow these rules when specifying field values:
- Protein MSAs: The first sequence in the MSA must exactly match the input protein sequence (without gaps)
- RNA MSAs: The first sequence in the MSA must exactly match the input RNA sequence (without gaps)
- Chain IDs: Must be 1-4 alphanumeric characters. PDB output format only supports single-character IDs
- MSA Format Names: Must be lowercase (
"a3m", not"A3M") - Ligand Specification: Must provide either
ccd_codesorsmiles, not both - Sequence Length: Maximum 4096 characters per molecule
- Database Limit: Maximum 3 MSA databases per protein
- Structural Templates: Only allowed for protein molecules and must be in CIF format