Example Requests
OpenFold2 NIM provides the following endpoint:
biology/openfold/openfold2/predict-structure-from-msa-and-template: Perform structure prediction from an input MSA and templates.
Usage
Below, we give real examples of requests that should run when the NIM is correctly configured.
Note: We do not recommend submitting requests to this endpoint using the tool, curl, as its inputs have characters that require careful escaping in bash. We recommend interacting with this endpoint using the Python request module.
Predict Structure
The endpoint accepts requests where the data is formatted as in the OpenApI Specification
Here is an example request using the Python requests module.
- The field
sequenceis required. - The field
input_idis optional but recommended. It serves as a unique identifier for tracking requests and correlating responses. Use formats like"7WBN_A"(PDB ID + chain) or custom names like"my_protein_001". - The field
alignmentsis optional, but omission can result in inaccurate structures. If included, the MSA content must be ina3mformat. - The field
selected_modelsis optional, but included here to reduce runtime, since the default specifies 5 models. - Use one of the following options if you want to include templates:
-
Set
use_templates=True, and populate the fieldtemplateswith the content of anhhrfile, or severalhhrfiles, which contain(s) HHSearch results. With these settings, template structures will be read from the database of structure files contained in the ngc model artifact. Template features will not be used ifuse_templates=False. -
Set
use_templates=True, and populate the fieldexplicit_templatesfield with the content of one or more structure files in mmCIF format. Template features will not be used ifuse_templates=False.
-
The following workflow is recommended when predicting structures for a given protein sequence.
- Use other tools to produce multiple-sequence-alignments, and to
put them in the
a3mformat. - Use other tools, and potentially the MSA results from step 1, to generate one of the following:
- The template search results in an
hhrfile - The structural templates in mmCIF format that you can supply using the
mmcif_templatesfield
- The template search results in an
- Load the
a3mfiles andhhrormmciffiles, in a Python script, and format the request as specified in the Open API specifications, included at the end of this documentation.- structural templates in mmCIF format that you can supply via the
explicit_templatesfield.
- structural templates in mmCIF format that you can supply via the
- Load the
a3mfiles andhhrfiles, in a Python script, and format the request as specified in the Open API specifications, included at the end of this documentation.
The runtime for structure prediction is impacted by both sequence length
and the number of sequences in the multiple-sequence-alignment. On an NVIDIA H100 80GB HBM3
device, this example should complete in under 30 seconds.