aggelos-michael-papadopoulos/AntiSite

Modality Dropout Enables Antibody Paratope Prediction With or Without Structure From a Single Model

Python

2

36 commits

updated Oct 5, 2026

See the code

README

AntiSite

Modality dropout for antibody paratope prediction, with or without structure, from a single model.

License: MIT Python 3.10+ Hugging Face Space Docker Hub Dataset DOI bioRxiv


🚀 Try AntiSite on 🤗 Hugging Face now!!! Predict a paratope from sequence alone, or upload a structure — both modes, one checkpoint, live in your browser!

AntiSite Hugging Face demo

Note: If you see "This Space is sleeping due to inactivity", click "Restart this Space" and give it 3 minutes to load.


AntiSite predicts the antibody paratope (the residues that contact antigen) from a single trained model. It is antigen agnostic. Its key design choice is modality dropout: the 3D features are withheld on half of the training steps, so one checkpoint learns to predict both with and without a structure. It combines frozen protein-language-model (PLM) embeddings with molecular-surface features (from ParaSurf) through a cross-modal attention layer, so that one checkpoint serves two inference modes:

ModeInputWhen to use
Sequence-onlyHeavy + light chain sequencesNo structure available
3DSequences**+** a structure (ParaSurf features)Structure available, best accuracy

AntiSite overview


⚙️ Installation

AntiSite's headline model is structure-aware, so the full install below sets up both the sequence and the 3D (ParaSurf) path. The same checkpoint can still run sequence-only at inference when you have no structure; that is a runtime choice, not a lighter install.

A fully self-contained GPU image is the easiest way to run AntiSite. It bakes in the code, the ParaSurf surface stack (DMS, OpenBabel, pdb2pqr) and all model weights — AntiSite checkpoints, ParaSurf, ProtT5 and ESM-2 — so once you have the image there is nothing left to download and no native dependencies to install. Requirements: an NVIDIA GPU with the NVIDIA Container Toolkit (so --gpus all works).

Pull the pre-built image:

docker pull angepapa/antisite:latest          # or: sudo docker pull angepapa/antisite:latest

👉 For how to run predictions, run the offline smoke test, and build the image yourself, see docker/README.md.

Prefer a manual install, or no GPU-in-Docker? Use the from-source steps below.


📦 1. Core package (manual install from source)

git clone https://github.com/aggelos-michael-papadopoulos/AntiSite.git
cd AntiSite
conda create -n antisite python=3.10 -y
conda activate antisite
pip install -e ".[threed]"

This installs AntiSite and PyTorch, the two protein language models (ProtT5 and ESM-2; pretrained weights download automatically from HuggingFace on first use), and the extra dependencies ParaSurf needs (torchsummary, jsonpickle).

🧬 2. ParaSurf (structure features)

The 3D path runs ParaSurf to extract molecular-surface features from the antibody structure:

# 1) Clone ParaSurf into the repo root
git clone https://github.com/aggelos-michael-papadopoulos/ParaSurf.git

# 2) OpenBabel (chemical features): conda only
conda install -c conda-forge openbabel -y

# 3) DMS molecular-surface program (needs sudo); pdb2pqr ships inside ParaSurf
cd ParaSurf/dms && sudo make install && cd ../..

# 4) ParaSurf model weights — download FIRST (required for 3D mode).
#    Download the Paragraph-expanded ParaSurf model (link below) and save it as:
#        ParaSurf/Paragraph_expanded_entire_dataset_best.pth

Download the ParaSurf Paragraph-expanded weights here: Paragraph_expanded_entire_dataset_best.pth

Do not run pip install -r ParaSurf/requirements.txt inside this environment; it pins an older torch and will break the AntiSite install. The steps above are all the 3D path needs.

At inference, point AntiSite at a ParaSurf weight file with --parasurf-weights (3D mode); omit the structure to run sequence-only.

The headline released model is release/checkpoints/antisite_paragraph.pt; the same file runs both inference modes. Checkpoints trained on each benchmark are provided under release/checkpoints/:

CheckpointTrained on
antisite_paragraph.ptParagraph (headline model)
antisite_pecan.ptPECAN
antisite_aacdb.ptAACDB
antisite_mipe_fold{0..4}.ptMIPE (5-fold)

Every checkpoint uses the same 2-PLM (ProtT5 + ESM-2) architecture and runs both inference modes.


🔮 Inference

One command, one .pt file, two operating modes — the same checkpoint handles both.

Sequence-only (no structure needed)

python antisite.py \
    --weights release/checkpoints/antisite_paragraph.pt \
    -vh DVKLVQSGPGLVAPSQSLSITCTVSGFSLTTYGVSWVRQPPGKGLEWLGVIWGDGNTTYHSALISRLSISKDNSRSQVFLKLNSLHTDDTATYYCAGNYYGMDYWGQGTSVTVSS \
    -vl DIAMTQTTSSLSASLGQKVTISCRASQDIGNYLNWYQQKPDGTVRLLIYYTSRLHSGVPSRFSGSGSGTDYSLTISNLESEDIATYFCQNGGTNPWTFGGGTKLEVKR

The PLMs encode the sequences and the fused head is fed zero 3D features (modality dropout taught it to handle this).

Sequence-only paratope prediction

Sequence-only residue-level paratope probabilities.

3D (when you have a structure)

python antisite.py \
    --weights release/checkpoints/antisite_paragraph.pt \
    --antibody 1FSK_antibody.pdb \
    --parasurf-weights ParaSurf/Paragraph_expanded_entire_dataset_best.pth #frozen ParaSurf

AntiSite 3D paratope prediction for PDB 1FSK

Example 3D paratope prediction for PDB 1FSK; predicted residues are shown in cyan.


📁 Data

Train / validation / test splits for all four benchmarks (Paragraph, PECAN, AACDB, MIPE) are provided under Data/ — each row gives the antibody heavy/light and antigen chain IDs and their sequences. See Data/README.md for the schema, split sizes, correction notes, and checkpoint caveat.

The exact processed PDB inputs and corrected split metadata are archived on Zenodo.


🏋️ Training

To reproduce AntiSite from scratch (data preparation, PLM embedding, ParaSurf feature precompute, and single-dataset / 5-fold training), see TRAIN.md.


📄 License

Released under the MIT License.

📖 Citation

If you use AntiSite in your research, please cite the preprint:

@article{papadopoulos2026antisite,
  title={AntiSite: Modality Dropout Enables Antibody Paratope Prediction With or Without Structure From a Single Model},
  author={Papadopoulos, Angelos Michail and Alvarez, Federico and Daras, Petros},
  journal={bioRxiv},
  pages={2026--08},
  year={2026},
  publisher={Cold Spring Harbor Laboratory}
}

This is a preprint; the citation will be updated here if the paper is published after peer review.

aggelos-michael-papadopoulos/AntiSite

Modality Dropout Enables Antibody Paratope Prediction With or Without Structure From a Single Model

Python

2

36 commits

updated Oct 5, 2026

See the code

README

AntiSite

Modality dropout for antibody paratope prediction, with or without structure, from a single model.

License: MIT Python 3.10+ Hugging Face Space Docker Hub Dataset DOI bioRxiv


🚀 Try AntiSite on 🤗 Hugging Face now!!! Predict a paratope from sequence alone, or upload a structure — both modes, one checkpoint, live in your browser!

AntiSite Hugging Face demo

Note: If you see "This Space is sleeping due to inactivity", click "Restart this Space" and give it 3 minutes to load.


AntiSite predicts the antibody paratope (the residues that contact antigen) from a single trained model. It is antigen agnostic. Its key design choice is modality dropout: the 3D features are withheld on half of the training steps, so one checkpoint learns to predict both with and without a structure. It combines frozen protein-language-model (PLM) embeddings with molecular-surface features (from ParaSurf) through a cross-modal attention layer, so that one checkpoint serves two inference modes:

ModeInputWhen to use
Sequence-onlyHeavy + light chain sequencesNo structure available
3DSequences**+** a structure (ParaSurf features)Structure available, best accuracy

AntiSite overview


⚙️ Installation

AntiSite's headline model is structure-aware, so the full install below sets up both the sequence and the 3D (ParaSurf) path. The same checkpoint can still run sequence-only at inference when you have no structure; that is a runtime choice, not a lighter install.

A fully self-contained GPU image is the easiest way to run AntiSite. It bakes in the code, the ParaSurf surface stack (DMS, OpenBabel, pdb2pqr) and all model weights — AntiSite checkpoints, ParaSurf, ProtT5 and ESM-2 — so once you have the image there is nothing left to download and no native dependencies to install. Requirements: an NVIDIA GPU with the NVIDIA Container Toolkit (so --gpus all works).

Pull the pre-built image:

docker pull angepapa/antisite:latest          # or: sudo docker pull angepapa/antisite:latest

👉 For how to run predictions, run the offline smoke test, and build the image yourself, see docker/README.md.

Prefer a manual install, or no GPU-in-Docker? Use the from-source steps below.


📦 1. Core package (manual install from source)

git clone https://github.com/aggelos-michael-papadopoulos/AntiSite.git
cd AntiSite
conda create -n antisite python=3.10 -y
conda activate antisite
pip install -e ".[threed]"

This installs AntiSite and PyTorch, the two protein language models (ProtT5 and ESM-2; pretrained weights download automatically from HuggingFace on first use), and the extra dependencies ParaSurf needs (torchsummary, jsonpickle).

🧬 2. ParaSurf (structure features)

The 3D path runs ParaSurf to extract molecular-surface features from the antibody structure:

# 1) Clone ParaSurf into the repo root
git clone https://github.com/aggelos-michael-papadopoulos/ParaSurf.git

# 2) OpenBabel (chemical features): conda only
conda install -c conda-forge openbabel -y

# 3) DMS molecular-surface program (needs sudo); pdb2pqr ships inside ParaSurf
cd ParaSurf/dms && sudo make install && cd ../..

# 4) ParaSurf model weights — download FIRST (required for 3D mode).
#    Download the Paragraph-expanded ParaSurf model (link below) and save it as:
#        ParaSurf/Paragraph_expanded_entire_dataset_best.pth

Download the ParaSurf Paragraph-expanded weights here: Paragraph_expanded_entire_dataset_best.pth

Do not run pip install -r ParaSurf/requirements.txt inside this environment; it pins an older torch and will break the AntiSite install. The steps above are all the 3D path needs.

At inference, point AntiSite at a ParaSurf weight file with --parasurf-weights (3D mode); omit the structure to run sequence-only.

The headline released model is release/checkpoints/antisite_paragraph.pt; the same file runs both inference modes. Checkpoints trained on each benchmark are provided under release/checkpoints/:

CheckpointTrained on
antisite_paragraph.ptParagraph (headline model)
antisite_pecan.ptPECAN
antisite_aacdb.ptAACDB
antisite_mipe_fold{0..4}.ptMIPE (5-fold)

Every checkpoint uses the same 2-PLM (ProtT5 + ESM-2) architecture and runs both inference modes.


🔮 Inference

One command, one .pt file, two operating modes — the same checkpoint handles both.

Sequence-only (no structure needed)

python antisite.py \
    --weights release/checkpoints/antisite_paragraph.pt \
    -vh DVKLVQSGPGLVAPSQSLSITCTVSGFSLTTYGVSWVRQPPGKGLEWLGVIWGDGNTTYHSALISRLSISKDNSRSQVFLKLNSLHTDDTATYYCAGNYYGMDYWGQGTSVTVSS \
    -vl DIAMTQTTSSLSASLGQKVTISCRASQDIGNYLNWYQQKPDGTVRLLIYYTSRLHSGVPSRFSGSGSGTDYSLTISNLESEDIATYFCQNGGTNPWTFGGGTKLEVKR

The PLMs encode the sequences and the fused head is fed zero 3D features (modality dropout taught it to handle this).

Sequence-only paratope prediction

Sequence-only residue-level paratope probabilities.

3D (when you have a structure)

python antisite.py \
    --weights release/checkpoints/antisite_paragraph.pt \
    --antibody 1FSK_antibody.pdb \
    --parasurf-weights ParaSurf/Paragraph_expanded_entire_dataset_best.pth #frozen ParaSurf

AntiSite 3D paratope prediction for PDB 1FSK

Example 3D paratope prediction for PDB 1FSK; predicted residues are shown in cyan.


📁 Data

Train / validation / test splits for all four benchmarks (Paragraph, PECAN, AACDB, MIPE) are provided under Data/ — each row gives the antibody heavy/light and antigen chain IDs and their sequences. See Data/README.md for the schema, split sizes, correction notes, and checkpoint caveat.

The exact processed PDB inputs and corrected split metadata are archived on Zenodo.


🏋️ Training

To reproduce AntiSite from scratch (data preparation, PLM embedding, ParaSurf feature precompute, and single-dataset / 5-fold training), see TRAIN.md.


📄 License

Released under the MIT License.

📖 Citation

If you use AntiSite in your research, please cite the preprint:

@article{papadopoulos2026antisite,
  title={AntiSite: Modality Dropout Enables Antibody Paratope Prediction With or Without Structure From a Single Model},
  author={Papadopoulos, Angelos Michail and Alvarez, Federico and Daras, Petros},
  journal={bioRxiv},
  pages={2026--08},
  year={2026},
  publisher={Cold Spring Harbor Laboratory}
}

This is a preprint; the citation will be updated here if the paper is published after peer review.