agentleFS
PharMolixPharMolix/OpenBioMed/skills/antibody-structure-prediction-tfold/SKILL.md

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

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the PharMolix/OpenBioMed repository that our weekly crawl found: only 1 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

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.

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
  1. Distinctive:

    Use this skill when: (1) Predict antibody and nanobody structure of a given sequence, (2) Predict antigen-antibody complex structure of …

    line 5

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

tFold Antibody-related Structure Prediction

Prerequisites

RequirementMinimumRecommended
Python3.8+3.8
CUDA11.7+11.8
GPU VRAM24GB80GB (A800)
RAM32GB64GB

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 requests

Predict 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-2

Next: Evaluate binding affinity with binding-affinity-prediction-prodigy.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.