Example Requests
OpenFold3 NIM provides the following endpoint:
/biology/openfold/openfold3/predict: Predicts the 3D structure of a biomolecular complex from input sequences, including proteins, DNA, RNA, and ligands.
Using the OpenFold3 NIM
This section provides real examples of requests that should run when the NIM is correctly configured.
Note: We recommend interacting with this endpoint using the Python requests module or similar HTTP client libraries for proper handling of complex JSON structures.
Predict Structure
The endpoint accepts requests where the data is formatted as specified in the OpenAPI Specification.
Request Structure
A request consists of:
request_id(optional): Identifier for the entire request.inputs(required): List containing a single input specification. There can be at most one item in the list.
Each input contains:
input_id(optional, recommended): Unique identifier for this structure prediction (for example, “my_protein_001”)molecules(required): List of molecules to predict as a complex (minimum 1 molecule)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 has a required field:
type: Must be"protein","dna","rna", or"ligand"
Each molecule can have the following optional field:
id: Molecule / chain identifier(s) - single string or list of strings (1-4 alphanumeric characters each)- Use a list of distinct identifiers if the input is composed of multiple molecules with the same sequence, CCD code, or SMILES string.
The following field is available and required for proteins, DNA, and RNA:
sequence: The amino acid or nucleotide sequence (1-4096 characters)
The following field is available for protein and RNA sequences (see MSA Requirements):
msa: Single-chain multiple sequence alignment, refered to asmain MSAin ColabFold
The following field is available for protein sequences (see MSA Requirements):
paired_msa: Single-chain MSA, where the rows have been re-ordered in concert with the rows in the MSAs for other chains
The following field is available for protein sequences to provide structural guidance:
structural_templates: List of structural templates in CIF format to guide structure prediction
The following fields are available for Ligands: Only use either ccd-codes or smiles
ccd_codes: Chemical Component Dictionary code (for example, “ATP”, “CL”)smiles: SMILES string representation (for example, “CC(=O)OC1=CC=CC=C1C(=O)O”)
MSA Structure
The msa field is a nested dictionary with the following structure:
MSA Requirements:
- For each protein sequence, either the
msaorpaired_msafield is required. If your intent is to provide an MSA with 0 hits, then provide either anmsaorpaired_msainput containing only the query sequence. - For each RNA sequence, the
msais required. If your intent is to provide an MSA with 0 hits, then provide anmsainput containing only the query sequence. - The first sequence in either the
msaorpaired_msamust exactly match the input protein or RNA sequence
Recommended Workflow
To predict the structure of a biomolecular complex:
-
Prepare the protein and RNA MSAs:
- Run MSA tools for the distinct protein sequences in the complex, for example
- ColabFold
- Note: If your input is composed of multiple non-identical protein sequences,
and you select a mode that uses pairing, you will have to post-process the
pair.a3mfile before inputting to the OpenFold3 NIM request. First filter null characters, then split by protein chain.
- Note: If your input is composed of multiple non-identical protein sequences,
and you select a mode that uses pairing, you will have to post-process the
- OpenFold3 script
- Note: Has a colabfold mode, which for inputs with multiple non-identical protein sequences, writes the output of pairing separately for each chain.
- HHBlits
- ColabFold
- Run MSA tools for the distinct RNA sequences in the complex
- Convert results to A3M or CSV format
- Ensure the first sequence in each MSA exactly matches your input sequence
- Run MSA tools for the distinct protein sequences in the complex, for example
-
Prepare the input sequences:
- Proteins: Standard single-letter amino acid codes
- DNA: Use A, T, C, G
- RNA: Use A, U, C, G
- Ligands: Find CCD codes from PDB or provide SMILES strings
-
Structure Your request:
- Create a
moleculeslist with all components of your complex - Add MSAs to each protein molecule and to each RNA molecule
- Optionally assign molecule/chain IDs
- Set
diffusion_samples> 1 if you want multiple predictions
- Create a
-
Submit the request and retrieve the structures:
- POST the request to
/biology/openfold/openfold3/predict - Parse the response to extract predicted structures
- Structures are returned in ranked order (best first)
- POST the request to
Response Structure
The response contains:
request_id: Echo of the request IDoutputs: List with a single output object containing:input_id: Echo of the input IDstructures_with_scores: List of predicted structures in ranked order (best first)structure: The predicted structure in CIF or PDB format (as a string).format: The format,ciforpdb.confidence_score: The ‘sample_ranking_score’ i.e. confidence score.complex_plddt_score: Average pLDDT score for the complex.complex_pde_score: Average PDE score for the complex.ptm_score: Predicted TM score for the complex.iptm_score: Predicted TM score for the interfaces.
Additional Examples
Protein-Only Structure Prediction
For predicting a simple protein structure without ligands:
Protein-DNA Complex
For modeling protein-DNA interactions, see below. 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:
Protein with Structural Templates
For template-guided protein structure prediction using experimental or predicted structures:
Field Reference
The following sections describes the request-level, input-level, molecule-level, and AlignmentFileRecord fields, and the important validation rules.
Request-Level Fields
Input-Level Fields
Molecule Fields
AlignmentFileRecord Fields
StructuralTemplate Fields
Important Validation Rules
Ensure you follow the rules when indicating values for the fields below:
- Protein MSAs: The first sequence in the MSA must exactly match the input protein 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
MSA Format Requirements
For proteins, the MSA is required and must meet these criteria:
- The first sequence in the MSA must exactly match the input protein sequence
- Gaps are represented by
-characters - In A3M format, lowercase letters represent insertions relative to the query sequence
- Both A3M and CSV formats are supported
A3M Format Example:
CSV Format Example: