
Bio Structural Biology Modern Structure Prediction
- 3 installs
- 1.1k repo stars
- Updated July 25, 2026
- gptomics/bioskills
Predict protein structures using AlphaFold3, ESMFold, Chai-1, Boltz-1, or ColabFold and compare the results.
About
Runs modern ML structure-prediction models via cloud APIs or local installs for single chains, complexes, and protein-ligand systems. A developer uses it to predict structures for novel proteins and compare predictions by RMSD and confidence metrics.
- Model comparison table plus ESMFold, AF3, Chai-1, Boltz-1, ColabFold recipes
- Pairwise RMSD comparison and per-model GPU memory requirements
Bio Structural Biology Modern Structure Prediction by the numbers
- 3 all-time installs (skills.sh)
- Ranked #1,661 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/gptomics/bioskills --skill bio-structural-biology-modern-structure-predictionAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 3 |
|---|---|
| repo stars | ★ 1.1k |
| Last updated | July 25, 2026 |
| Repository | gptomics/bioskills ↗ |
What it does
Predict protein structures using AlphaFold3, ESMFold, Chai-1, Boltz-1, or ColabFold and compare the results.
Files
Modern Structure Prediction
Predict protein structures using state-of-the-art machine learning models. This covers cloud APIs, local installations, and interpretation of results.
Model Comparison
| Model | Complexes | Ligands | Speed | Access |
|---|---|---|---|---|
| AlphaFold3 | Yes | Yes | Slow | Server only (2025) |
| ESMFold | No | No | Fast | API or local |
| Chai-1 | Yes | Yes | Moderate | Local or API |
| Boltz-1 | Yes | Yes | Moderate | Local |
| ColabFold | No* | No | Moderate | Colab/local |
*ColabFold can predict complexes with AlphaFold-Multimer.
ESMFold (Fastest Single-Chain)
Via ESM Atlas API
import requests
def predict_esmfold(sequence):
'''Predict structure using ESMFold API'''
url = 'https://api.esmatlas.com/foldSequence/v1/pdb/'
response = requests.post(url, data=sequence, timeout=300)
if response.status_code == 200:
return response.text
raise Exception(f'ESMFold failed: {response.status_code}')
sequence = 'MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSH'
pdb_text = predict_esmfold(sequence)
with open('predicted.pdb', 'w') as f:
f.write(pdb_text)Local ESMFold
import torch
import esm
def predict_esmfold_local(sequence, device='cuda'):
'''Run ESMFold locally (requires ~16GB GPU memory)'''
model = esm.pretrained.esmfold_v1()
model = model.eval().to(device)
with torch.no_grad():
output = model.infer_pdb(sequence)
return output
# Extract pLDDT from ESMFold output
def extract_esmfold_plddt(pdb_text):
plddt = {}
for line in pdb_text.split('\n'):
if line.startswith('ATOM') and line[12:16].strip() == 'CA':
resnum = int(line[22:26])
bfactor = float(line[60:66])
plddt[resnum] = bfactor
return plddtAlphaFold3 (Server)
AlphaFold3 predictions via the server at alphafoldserver.com.
Prepare Input JSON
import json
def create_af3_input(sequences, job_name='prediction'):
'''Create AlphaFold3 server input JSON'''
entities = []
for i, seq in enumerate(sequences):
entities.append({
'type': 'protein',
'sequence': seq,
'count': 1
})
job = {
'name': job_name,
'modelSeeds': [1],
'sequences': entities
}
return json.dumps(job, indent=2)
# Single protein
input_json = create_af3_input(['MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSH'])
# Protein complex
input_json = create_af3_input([
'MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSH',
'MGHFTEEDKATITSLWGKVNVEDAGGETLGRLLVVYPWTQRFFDSFGNLSS'
])Process AF3 Results
import json
from Bio.PDB import PDBParser
import numpy as np
def analyze_af3_result(result_dir):
'''Analyze AlphaFold3 prediction results'''
# Load summary
with open(f'{result_dir}/summary_confidences.json') as f:
summary = json.load(f)
# Extract confidence metrics
iptm = summary.get('iptm', None) # Interface pTM (complexes)
ptm = summary.get('ptm', None) # Predicted TM-score
ranking = summary.get('ranking_score', None)
print(f'pTM: {ptm:.3f}' if ptm else 'pTM: N/A')
print(f'ipTM: {iptm:.3f}' if iptm else 'ipTM: N/A')
return summaryAF3 Confidence Interpretation
| Metric | Range | Interpretation |
|---|---|---|
| pTM | 0-1 | Overall structure confidence |
| ipTM | 0-1 | Interface prediction quality |
| pLDDT | 0-100 | Per-residue confidence |
| PAE | 0-30A | Position error between residue pairs |
Chai-1 (Local Open-Source)
Installation
pip install chai-labBasic Prediction
from chai_lab.chai1 import run_inference
import numpy as np
from pathlib import Path
def predict_chai1(fasta_path, output_dir='chai_output'):
'''Run Chai-1 structure prediction'''
Path(output_dir).mkdir(exist_ok=True)
candidates = run_inference(
fasta_file=Path(fasta_path),
output_dir=Path(output_dir),
num_trunk_recycles=3, # 3: Standard. Use 5+ for difficult targets.
num_diffn_timesteps=200, # 200: Standard. 500 for higher quality.
seed=42,
device='cuda:0'
)
return candidates
# Candidates are sorted by confidence
# candidates.cif files contain predicted structuresChai-1 with Ligands
# Chai-1 supports protein-ligand complexes
# Include ligand SMILES in input FASTA with special format
def create_chai_fasta_with_ligand(protein_seq, ligand_smiles, output_file):
'''Create Chai-1 input with protein and ligand'''
with open(output_file, 'w') as f:
f.write('>protein|chain_A\n')
f.write(f'{protein_seq}\n')
f.write('>ligand|chain_B\n')
f.write(f'{ligand_smiles}\n')Boltz-1 (Open-Source Complex Prediction)
Installation
pip install boltzBasic Prediction
from boltz import Boltz1
def predict_boltz1(sequences, output_dir='boltz_output'):
'''Run Boltz-1 structure prediction'''
model = Boltz1()
result = model.predict(
sequences=sequences,
output_dir=output_dir,
recycling_steps=3, # 3: Standard. Increase for difficult targets.
sampling_steps=200 # 200: Standard. 500 for publication quality.
)
return resultBoltz-1 for Complexes
# Boltz-1 handles heteromeric complexes
def predict_complex_boltz(chain_sequences):
'''Predict protein complex with Boltz-1'''
model = Boltz1()
result = model.predict(
sequences=chain_sequences, # List of sequences for each chain
output_dir='complex_output'
)
# Extract interface metrics
return resultColabFold (AlphaFold2 + MMseqs2)
Command Line
# Install ColabFold
pip install colabfold
# Run prediction
colabfold_batch input.fasta output_dir/
# With custom templates
colabfold_batch input.fasta output_dir/ --templates
# For complexes (use : to separate chains)
# Create FASTA like: >complex\nSEQUENCE1:SEQUENCE2Python API
from colabfold.batch import run_colabfold
def predict_colabfold(fasta_file, output_dir, use_templates=False):
'''Run ColabFold prediction'''
run_colabfold(
input_path=fasta_file,
result_dir=output_dir,
use_templates=use_templates,
num_models=5, # 5: Standard. Use 1 for quick predictions.
num_recycles=3, # 3: Standard. Increase for multimers.
model_order=[1,2,3,4,5]
)Comparing Predictions
from Bio.PDB import PDBParser, Superimposer
import numpy as np
def compare_predictions(pdb_files, labels=None):
'''Compare multiple structure predictions'''
parser = PDBParser(QUIET=True)
structures = [parser.get_structure(f'model_{i}', f) for i, f in enumerate(pdb_files)]
# Extract CA atoms from first chain
def get_ca_atoms(struct):
return [r['CA'] for r in struct[0].get_residues() if 'CA' in r]
all_atoms = [get_ca_atoms(s) for s in structures]
# Pairwise RMSD
n = len(structures)
rmsd_matrix = np.zeros((n, n))
for i in range(n):
for j in range(i+1, n):
min_len = min(len(all_atoms[i]), len(all_atoms[j]))
super_imposer = Superimposer()
super_imposer.set_atoms(all_atoms[i][:min_len], all_atoms[j][:min_len])
rmsd_matrix[i,j] = rmsd_matrix[j,i] = super_imposer.rms
return rmsd_matrix
# Compare ESMFold vs AlphaFold3 vs Chai-1
rmsd = compare_predictions(['esmfold.pdb', 'af3.pdb', 'chai1.pdb'])
print('RMSD matrix:')
print(rmsd)When to Use Each Model
| Scenario | Recommended Model |
|---|---|
| Quick single-chain prediction | ESMFold (API) |
| Highest accuracy single chain | AlphaFold3 or ColabFold |
| Protein-protein complex | AlphaFold3, Chai-1, or Boltz-1 |
| Protein-ligand complex | AlphaFold3 or Chai-1 |
| No GPU available | ESMFold API or AlphaFold3 server |
| Large-scale screening | ESMFold (local) |
| Open-source requirement | Chai-1 or Boltz-1 |
Memory Requirements
| Model | GPU Memory | Notes |
|---|---|---|
| ESMFold | ~16 GB | Sequence length dependent |
| ColabFold | ~8-16 GB | Model size dependent |
| Chai-1 | ~24 GB | Complex size dependent |
| Boltz-1 | ~24 GB | Complex size dependent |
Related Skills
- alphafold-predictions - Download pre-computed AlphaFold structures
- structure-io - Parse and write structure files
- geometric-analysis - RMSD, superimposition, distance calculations
- structure-navigation - Navigate predicted structure hierarchy
from Bio.PDB import PDBParser, Superimposer
import numpy as np
def get_ca_atoms(structure):
'''Extract CA atoms from first chain of structure'''
atoms = []
for chain in structure[0]:
for residue in chain:
if 'CA' in residue:
atoms.append(residue['CA'])
break # First chain only
return atoms
def calculate_rmsd(pdb1, pdb2):
'''Calculate CA RMSD between two structures'''
parser = PDBParser(QUIET=True)
struct1 = parser.get_structure('model1', pdb1)
struct2 = parser.get_structure('model2', pdb2)
atoms1 = get_ca_atoms(struct1)
atoms2 = get_ca_atoms(struct2)
# Align by minimum length
min_len = min(len(atoms1), len(atoms2))
if min_len == 0:
raise ValueError('No CA atoms found')
super_imposer = Superimposer()
super_imposer.set_atoms(atoms1[:min_len], atoms2[:min_len])
return super_imposer.rms
def compare_multiple_predictions(pdb_files, labels=None):
'''Compare multiple structure predictions with pairwise RMSD'''
if labels is None:
labels = [f'Model_{i}' for i in range(len(pdb_files))]
n = len(pdb_files)
rmsd_matrix = np.zeros((n, n))
for i in range(n):
for j in range(i+1, n):
try:
rmsd = calculate_rmsd(pdb_files[i], pdb_files[j])
rmsd_matrix[i,j] = rmsd_matrix[j,i] = rmsd
except Exception as e:
print(f'Warning: Could not compare {labels[i]} vs {labels[j]}: {e}')
rmsd_matrix[i,j] = rmsd_matrix[j,i] = np.nan
# Print formatted matrix
print('\nPairwise RMSD (Angstroms):')
header = ' ' + ' '.join(f'{l:>8}' for l in labels)
print(header)
for i, label in enumerate(labels):
row = f'{label:>8} ' + ' '.join(f'{rmsd_matrix[i,j]:8.2f}' for j in range(n))
print(row)
return rmsd_matrix
def extract_plddt_comparison(pdb_files, labels=None):
'''Extract and compare pLDDT across predictions'''
from collections import defaultdict
if labels is None:
labels = [f'Model_{i}' for i in range(len(pdb_files))]
parser = PDBParser(QUIET=True)
plddt_data = {}
for pdb_file, label in zip(pdb_files, labels):
struct = parser.get_structure(label, pdb_file)
plddt = {}
for chain in struct[0]:
for residue in chain:
if 'CA' in residue:
plddt[residue.id[1]] = residue['CA'].get_bfactor()
break
plddt_data[label] = plddt
avg = sum(plddt.values()) / len(plddt) if plddt else 0
print(f'{label}: Average pLDDT = {avg:.1f}')
return plddt_data
if __name__ == '__main__':
# Example: Compare predictions from different methods
# Replace with actual prediction files
pdb_files = [
'esmfold_prediction.pdb',
'alphafold_prediction.pdb',
'chai1_prediction.pdb'
]
labels = ['ESMFold', 'AlphaFold3', 'Chai-1']
# Check which files exist
from pathlib import Path
existing = [(f, l) for f, l in zip(pdb_files, labels) if Path(f).exists()]
if len(existing) >= 2:
files, labs = zip(*existing)
compare_multiple_predictions(list(files), list(labs))
extract_plddt_comparison(list(files), list(labs))
else:
print('Need at least 2 prediction files to compare')
print('Run predictions first, then compare')
import requests
from pathlib import Path
def predict_esmfold(sequence, output_file=None):
'''Predict protein structure using ESMFold API'''
url = 'https://api.esmatlas.com/foldSequence/v1/pdb/'
# timeout=300: ESMFold can take several minutes for long sequences (>500 residues)
response = requests.post(url, data=sequence, timeout=300)
if response.status_code != 200:
raise Exception(f'ESMFold failed with status {response.status_code}')
pdb_text = response.text
if output_file:
Path(output_file).write_text(pdb_text)
print(f'Structure saved to {output_file}')
return pdb_text
def extract_plddt(pdb_text):
'''Extract per-residue pLDDT scores from ESMFold PDB output'''
plddt = {}
for line in pdb_text.split('\n'):
if line.startswith('ATOM') and line[12:16].strip() == 'CA':
resnum = int(line[22:26])
bfactor = float(line[60:66])
plddt[resnum] = bfactor
return plddt
def analyze_confidence(plddt):
'''Summarize pLDDT confidence regions'''
# pLDDT thresholds: >90 very high, 70-90 confident, 50-70 low, <50 very low
very_high = [r for r, s in plddt.items() if s > 90]
confident = [r for r, s in plddt.items() if 70 <= s <= 90]
low = [r for r, s in plddt.items() if 50 <= s < 70]
very_low = [r for r, s in plddt.items() if s < 50]
avg = sum(plddt.values()) / len(plddt)
print(f'Average pLDDT: {avg:.1f}')
print(f'Very high confidence (>90): {len(very_high)} residues')
print(f'Confident (70-90): {len(confident)} residues')
print(f'Low confidence (50-70): {len(low)} residues')
print(f'Very low (<50, likely disordered): {len(very_low)} residues')
return {'avg': avg, 'very_high': very_high, 'confident': confident, 'low': low, 'very_low': very_low}
if __name__ == '__main__':
# Example: Human hemoglobin alpha chain (first 50 residues)
# For full proteins, use sequences from UniProt
sequence = 'MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSH'
pdb_text = predict_esmfold(sequence, 'esmfold_prediction.pdb')
plddt = extract_plddt(pdb_text)
analyze_confidence(plddt)
Modern Structure Prediction
Overview
Predict protein structures using state-of-the-art ML models including ESMFold, AlphaFold3, Chai-1, and Boltz-1. These tools enable rapid structure prediction for single proteins and complexes, including protein-ligand interactions.
Prerequisites
# ESMFold (local)
pip install fair-esm
# Chai-1
pip install chai-lab
# Boltz-1
pip install boltz
# ColabFold
pip install colabfold
# For API-only usage, only requests is needed
pip install requestsQuick Start
Tell your AI agent what you want to do:
- "Predict the structure of this protein sequence using ESMFold"
- "Run AlphaFold3 on my protein complex"
- "Compare predictions from multiple structure prediction methods"
- "Predict a protein-ligand complex with Chai-1"
Example Prompts
Single Protein Prediction
"Predict the structure of this protein sequence using the fastest method"
"Run ESMFold on my sequence and analyze the confidence scores"
"Get an AlphaFold3 prediction for this protein"
Complex Prediction
"Predict the structure of this protein-protein complex"
"Run Boltz-1 on my heterodimer sequences"
"Model my protein binding to this small molecule ligand"
Comparison and Validation
"Compare ESMFold, AlphaFold3, and Chai-1 predictions for this sequence"
"Calculate RMSD between different structure predictions"
"Which regions have high confidence across all prediction methods?"
Batch Processing
"Predict structures for all sequences in this FASTA file"
"Run ESMFold on my list of protein sequences"
What the Agent Will Do
1. Determine the best prediction method based on your needs (speed, accuracy, complex support) 2. Prepare the input sequence(s) in the appropriate format 3. Run the prediction via API or local installation 4. Extract and interpret confidence metrics (pLDDT, pTM, PAE) 5. Save the predicted structure in PDB or mmCIF format 6. Provide guidance on interpreting low-confidence regions
Tips
- ESMFold is fastest for single chains and doesn't require MSA
- AlphaFold3 server is best for complexes but has usage limits
- Chai-1 and Boltz-1 are open-source alternatives for complex prediction
- pLDDT > 70 indicates confident predictions; < 50 suggests disorder
- For complexes, check ipTM (interface pTM) to assess binding prediction quality
- Compare multiple methods for critical applications
- Low-confidence regions may indicate intrinsically disordered regions