BioNeMo OpenFold2
NVIDIA NIM for OpenFold2 single-chain protein structure prediction.
Model details
View repositoryOpenFold2 is a protein structure prediction model from the OpenFold Consortium and the Alquraishi Laboratory, a PyTorch re-implementation of Google DeepMind's AlphaFold2 with support for both training and inference, demonstrating parity accuracy with AlphaFold2 and improved speed. It takes a protein sequence as input, along with optional multiple sequence alignments and structural templates, and predicts the corresponding 3D protein structure. This implementation covers the "monomer" version of OpenFold2, using model parameter sets trained with DeepMind's original AlphaFold2 implementation.
Call BioNeMo OpenFold2 on Baseten using the NIM structure prediction route.
1import os
2import requests
3
4MODEL_ID = os.environ["BASETEN_MODEL_ID"]
5BASETEN_API_KEY = os.environ["BASETEN_API_KEY"]
6BASETEN_URL = (
7 f"https://model-{MODEL_ID}.api.baseten.co/environments/production/sync"
8 "/biology/openfold/openfold2/predict-structure-from-msa-and-template"
9)
10
11sequence = "LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"
12minimal_msa_a3m = f">query\n{sequence}\n"
13
14payload = {
15 "sequence": sequence,
16 "input_id": "villin_hp35_test",
17 "selected_models": [1],
18 "alignments": {
19 "uniref90": {
20 "a3m": {
21 "alignment": minimal_msa_a3m,
22 "format": "a3m",
23 }
24 }
25 },
26 "use_templates": False,
27}
28
29response = requests.post(
30 BASETEN_URL,
31 headers={
32 "Authorization": f"Bearer {BASETEN_API_KEY}",
33 "Content-Type": "application/json",
34 },
35 json=payload,
36 timeout=300,
37)
38response.raise_for_status()
39result = response.json()
40print(result)
411{
2 "structures_in_ranked_order": [
3 {
4 "structure": "<PDB text>",
5 "format": "pdb"
6 }
7 ]
8}