Inference Endpoints
AlphaFold2-Multimer NIM provides the following endpoints:
protein-structure/alphafold2/multimer/predict-structure-from-sequences- Predict a protein structure given an input list of amino acid sequences.protein-structure/alphafold2/multimer/predict-MSA-from-sequences- Perform a Multiple Sequence Alignment (MSA) and return the MSA and templates for AlphaFold2 inference. This endpoint is useful for batching long-running and CPU-intensive MSA runs prior to structure prediction.protein-structure/alphafold2/multimer/predict-structure-from-MSA- Perform structural prediction from an input MSA and templates. This is useful when using a pre-computed or custom/external MSA.
Usage
The three endpoints follow, with requests you can run when the NIM is configured.
Predict Structure From Multiple Sequences
The predict-structure-from-sequences endpoint provides a full structural prediction pipeline, from protein sequences to a multimer protein structure. It requires at least 1 and up to 6 amino acid sequences. Tunable parameters follow:
sequences: An array of valid amino acid sequences. Refer to the table of amino acid codes if you are unsure if your sequence is valid.databases: A list containing any ofuniref90,mgnify, andsmall_bfd. These databases contain sequences used to generate a Multiple Sequence Alignment (MSA) that is used as input to the structural prediction neural network in AlphaFold2. In general, passing all three databases will provide the most accurate structural prediction at the cost of requiring the longest runtime.algorithm: The algorithm used for Multiple Sequence Alignment. Currently, onlyjackhmmeris supported.e_value: The sequence e-value for filtering sequences in the MSA. A smaller value is stricter as fewer sequences are included, and the MSA is less sensitive. The default is0.0001. This value ranges from 0 to 1.bit_score: The sequence bit-score to use for filtering before MSA. If passed, this is used in place of e-value for filtering. A good starting place is around200. This value is greater than zero.iterations: The number of MSA iterations to perform. In general, the defaultiterations=1is sufficient and takes the least amount of time.relax_prediction: Set toTrueto run structural relaxation after prediction. This is set toTrueby default and helps fix clashes in the predicted structure.
Here is an example query for sequences and a full set of databases using cURL:
Here is the same example, but this time using the Python requests module:
The response is JSON and includes the predicted structure as PDB text. Refer to the PyMOL website for how to view PDB text.
Predict an MSA From Multiple Sequences
The predict-msa-from-sequences endpoint generates Multiple Sequence Alignments (MSAs) and templates used for structural prediction.
This is useful if you want to batch prediction on different (CPU-intensive) nodes.
Below is an example query using cURL:
Here is the same query in Python using the requests module:
The predict-msa-from-sequences endpoint takes the following parameters:
sequences: An array of valid amino acid sequences. Refer to the table of amino acid codes if you are unsure if your sequence is valid.databases: A list containing any ofuniref90,mgnify, andsmall_bfd. These databases contain sequences used to generate a Multiple Sequence Alignment (MSA) that is used as input to the structural prediction neural network in AlphaFold2. In general, passing all three databases will provide the most accurate structural prediction at the cost of requiring the longest runtime. If you must pick only one,uniref90is considered the best choice, though it is still recommended to run with all three.algorithm: The algorithm used for Multiple Sequence Alignment. Currently, onlyjackhmmeris supported.e_value: The sequence e-value for filtering sequences in the MSA. Smaller implies stricter alignments - fewer sequences with higher probability of origin will be included, but this will also reduce the sensitivity of the MSA. The default value of0.0001is in general a good choice. This value ranges from 0 to 1.bit_score: The sequence bit-score to use for filtering before MSA. If passed, this is used in place of e-value for filtering. A good starting place is around200. This value is greater than zero.iterations: The number of MSA iterations to perform. In general, the defaultiterations=1is sufficient and takes the least amount of time.
Predict Protein Structure From MSAs
The predict-structure-from-msa endpoint takes the results of the predict-msa-from-sequences endpoint and runs structural prediction.
Do not run the MSA-to-structure prediction with cURL. The inputs include characters that need careful escaping in bash. Use the Python requests module for this endpoint.
The predict-structure-from-msa endpoint takes the following arguments:
sequences: An array of valid amino acid sequences. Refer to the table of amino acid codes if you are unsure if your sequence is valid.alignments: The MSA results frompredict-msa-from-sequences. This is an array of dictionaries, one for each input amino acid sequence, of the form{database: [database, MSA output, MSA output format]}.templates: Templates from the structural database search. These use a format specific to AlphaFold2. More details of the fields are in the AlphaFold template parser.relax_prediction: Set toTrueto run structural relaxation after prediction. This is set toTrueby default and helps fix clashes in the predicted structure.
Here is an example of a request to the predict-structure-from-msa endpoint using the Python requests module:
The structural prediction module scales quadratically with sequence length. Long sequences can take several hours to predict.