antibody-structure-prediction-tfold
Skill1.1k starsChanged 8 months agoMITView on GitHub
Antibody-related structure prediction using tfold model. Use this skill when: (1) Predict antibody and nanobody structure of a given sequence, (2) Predict antigen-antibody complex structure of given sequences, (3) Using local GPU resources.
- Installs packages
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about PharMolix/OpenBioMed
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
In this repository45 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- admet-predictionSkill
- antibody-design-iggmSkill
- binding-affinity-prediction-prodigySkill
- biomedical-literature-searchSkill
- biomed-skill-creatorSkill
- biomed-skill-routerSkill
- cellxgene-census-querySkill
- chembl-querySkill
- disease-drug-intelligenceSkill
- drug-candidate-discoverySkill
- drug-drug-interaction-analysisSkill
- drug-lead-analysisSkill
- functional-protein-designSkill
- iupac-name-identification-biot5Skill
- kegg-querySkill
- molecule-biochemical-significance-query-biot5Skill
- mutation-design-aavSkill
- mutation-design-gfpSkill
- ppi-string-querySkill
- protein-function-predictionSkill
- protein-ligand-binding-analysis-plipSkill
- protein-mutation-analysisSkill
- protein-structure-design-boltzgenSkill
- protein-subcellular-localization-prediction-biot5Skill
- pubchem-querySkill
- retrosynthesis-planningSkill
- similar-protein-retrievalSkill
- single-cell-atac-seq-peak-calling-annotaionSkill
- single-cell-atac-seq-qc-processingSkill
- single-cell-foundation-model-geneformerSkill
- single-cell-foundation-model-langcellSkill
- single-cell-foundation-model-scgptSkill
- single-cell-multi-omics-analysis-scviSkill
- single-cell-multi-omics-data-harmonizationSkill
- single-cell-proteomics-data-processingSkill
- single-cell-proteomics-peptide-identificationSkill
- single-cell-scrna-seq-analysis-scanpySkill
- single-cell-foundation-model-stofmSkill
- spatial-transcriptomics-spatial-data-ioSkill
- structure-prediction-boltz-2Skill
- target-based-lead-designSkill
- target-drug-reportSkill
- text-based-molecule-editingSkill
- uniprot-querySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Use this skill when: (1) Predict antibody and nanobody structure of a given sequence, (2) Predict antigen-antibody complex structure of …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
tFold Antibody-related Structure Prediction
Prerequisites
| Requirement | Minimum | Recommended |
| Python | 3.8+ | 3.8 |
| CUDA | 11.7+ | 11.8 |
| GPU VRAM | 24GB | 80GB (A800) |
| RAM | 32GB | 64GB |
How to run
Local installation
git clone https://github.com/TencentAI4S/tfold.git
cd tfold
pip install torch==2.4.0 --index-url https://download.pytorch.org/whl/cu118
pip install deepspeed==0.12.3 termcolor==2.3.0 biopython==1.79 ml-collections==0.1.1 dm-tree==0.1.8 numpy==1.21.2 modelcif==0.9 scipy requestsPredict structure of an antibody
import torch
import tfold
def pred_antibody_structure(heavy_chain_sequence, light_chain_sequence, output_path):
"""
:param heavy_chain_sequence: sequence of the heavy chain
:param light_chain_sequence: sequence of the light chain
:param output_path: path to the antibody structure prediction
"""
# Download the pre-trained model
ppi_model_path = tfold.model.esm_ppi_650m_ab()
tfold_model_path = tfold.model.tfold_ab_trunk()
# Load the model
model = tfold.deploy.PLMComplexPredictor.restore_from_module(ppi_model_path, tfold_model_path)
# Prepare antibody sequences (can be single or multiple sequences)
data =[
{
"sequence": heavy_chain_sequence, # Heavy chain
"id": 'H'
},
{
"sequence": light_chain_sequence, # Light chain
"id": 'L'
}]
model.infer_pdb(data, output_path)Predict the structure of antigen-antibody complex
import torch
import tfold
from projects.tfold_ag.gen_msa import generate_msa
def pred_antigen_antibody_structure(antigen_sequence, heavy_chain_sequence, light_chain_sequence, output_path):
"""
:param antigen_sequence: sequence of the antigen
:param heavy_chain_sequence: sequence of the heavy chain
:param light_chain_sequence: sequence of the light chain
:param output_path: path to the antibody structure prediction
"""
# Download the pre-trained model of ESM-PPI
ppi_model_path = tfold.model.esm_ppi_650m_ab()
# Download the pre-trained model of alphaFold
alphafold_path = tfold.model.alpha_fold_4_ptm()
# Download base model for tFold-Ag
tfold_model_path = tfold.model.tfold_ag_base()
# Load the model
model = tfold.deploy.AgPredictor(ppi_model_path, alphafold_path, tfold_model_path)
# generate msa information
with open('antigen.fasta', 'w') as f:
f.write(f'>antigen\n{antigen_sequence}')
generate_msa('antigen.fasta', output_dir='./')
with open('./antigen.a3m') as f:
msa, deletion_matrix = tfold.protein.parser.parse_a3m(f.read())
# prepare input
data = [
{
"id": "H",
"sequence": heavy_chain_sequence
},
{
"id": "L",
"sequence": light_chain_sequence
},
{
"id": "A",
"sequence": antigen_sequence,
"msa": msa,
"deletion_matrix": deletion_matrix
}
]
model.infer_pdb(data, output_path)Decision tree
Should I use tFold?
│
└─ What are you predicting?
├─ Antibody and nanobody structure prediction → antibody-structure-prediction-tfold ✓
├─ Antigen-antibody structure prediction → antibody-structure-prediction-tfold ✓
├─ Structure prediction for general protein-protein complex → structure-prediction-boltz-2
└─ Structure prediction for protein-ligand complex → structure-prediction-boltz-2Next: Evaluate binding affinity with binding-affinity-prediction-prodigy.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

