Deep Learning for Antibody-Antigen Interaction Prediction© Karobben

Deep Learning for Antibody-Antigen Interaction Prediction

ImaPEp

Antibody–Antigen ImaPEp (ImPEp)
Background Info
Model Type
ResNet-style CNN on 2D physicochemical interface images
Released
2024
Publication
International Journal of Molecular Sciences (IJMS), 25(10)
Authors
Di Li; Fabio Pucci; Marianne Rooman
Chains Limits
No limits for antigen, MUST has both H and L chains
Why Published
  • Encodes 3D Ab–Ag interfaces as 2D feature images → learns binding patterns directly (less hand-crafted bias).
  • Targets pair-level paratope–epitope prediction, useful for docking re-scoring and screening.
  • Reports strong benchmark performance (≈0.8 balanced accuracy, 10-fold CV) on curated Ab–Ag sets.
Card Prepared By
ChatGPT (GPT-5 Thinking)

ImaPEp[1] is a computational tool for predicting the binding probability between antibody paratopes and antigen epitopes. This repository provides the necessary scripts for training models and performing predictions on antibody-antigen complexes using structural data.

Installation

Documentation: 3BioCompBio/ImaPEp

This tool is most user friendly one. If you have torch environment, you don’t need to do anything else. Just clone the repository and you are ready to go. To be noticed, it doesn’t support CPU mode, only GPU mode.

Usage

The repository contains scripts and examples for prediction. It also includes pre-trained models for immediate use.

For single prediction, you can started with the following command by read single complex and naming the chains:

python3 predict.py --sample-id=my_pdb --input=my_pdb.pdb --chains=HLBC

The Order of the chain

According to the repository, the order of the chain matters. The first chain must to by heavy chain (H) The second chain must to by light chain (L) Rest of the chains are antigen chains (B and C)

For batch prediction, you can put all complexes in a folder (PS, don’t put too many files in a folder if you are using linux system. It would make reading the folder very slow). Then, you need to prepare a csv file which named job.txt as is show in the 3BioCompBio/ImaPEp/tree/main/data/test. The first column is the sample id without the file extension, the second column is the parameter for chains. It looks like this:

1h0d_BA_C,BAC
1a14_HL_N,HLN

And then, you can run the script:

python3 batch_predict.py --input_dir=./data/test/ --job_file=./data/test/job.txt

Once you see the progress bar, you are good to go.

20%|████                 | 710/3600 [08:55<36:20,  1.33it/s]

Results

It would save the results in an csv file named scores_*.txt in the current folder. The format is like this, the first column is the sample id with the chains, the second column is the binding probability score between the paratope and epitope.

14-2zdock.1004,0.6466
14-2.zdock.1005,0.4243
14-2.zdock.1006,0.3589
14-2.zdock.1007,0.3602
14-2.zdock.1008,0.4168
14-2.zdock.1009,0.6492

EpiScan

Antibody–Antigen EpiScan
Background Info
Model Type
Deep learning (Transformer-based, epitope prediction)
Released
2023
Publication
Frontiers in Immunology, Vol. 14
Authors
Zhengliang Liu; Zihao Li; Hanlin Gu; et al.
Chains Limits
Only 1 Pair
Why Published
  • Introduces a **transformer-based scanning model** to identify antibody epitopes directly from antigen sequences.
  • Combines **global context from transformers** with epitope-specific supervision, outperforming older sequence-profile approaches.
  • Demonstrated better generalization across pathogens and benchmark datasets, making it useful for **vaccine design and therapeutic antibody discovery**.
Card Prepared By
ChatGPT (GPT-5 Thinking)

Installation

EpiScan also friendly to user as long as you have a working python environment with ESM. But it had some issue with the location of it’s path. As suggested in the repo, you need to run the command in the directory of EpiScan in the EpiScan which has another EpiScan. And then, you’ll get error for no module named EpiScan. To fix it, you need to add the path of EpiScan to your PYTHONPATH environment variable. Or the easiest way is to copy the folder EpiScan to the EpiScan (root directory) → EpiScan (Working directory) → EpiScan (Module directory/the directory want be copied) → commands (Actual code directory). Which is wired, but it works.

Usage

You can run the command like this:

python ./EpiScan/commands/epimapping.py --test ../dataProcess/public/public_sep_testAg.tsv --embedding ../dataProcess/public/DB1.h5

For piblic_sep_testAg.tsv, we need to prepare 3 columns: receptor id, ligand id, and epitope annotation (0 and 1 for each residues. 1 stands selected epitope). You can find an example in the dataProcess/public folder.

EpiPred

Antibody–Antigen EpiPred
Background Info
Model Type
Structure-based computational method (geometric + physicochemical matching)
Released
2016
Publication
PLOS Computational Biology, Vol. 12, Issue 9
Authors
Adam M. Krawczyk; Raimund Weigt; Charlotte M. Deane
Why Published
  • First general tool for predicting antibody epitopes directly from the antibody structure.
  • Combines paratope prediction with structural complementarity to rank antigen patches.
  • Bridges gap between docking and sequence-based predictors; showed improved success rate over prior epitope methods.
Card Prepared By
ChatGPT (GPT-5 Thinking)

AbEpiTope-1.0

Antibody–Antigen AbEpiTope-1.0
Background Info
Model Type
Deep learning (Graph Neural Network + sequence features)
Released
2022
Publication
Briefings in Bioinformatics, Vol. 23, Issue 6
Authors
Md Mahiuddin; Giovanni Marino; Paolo Marcatili
Why Published
  • One of the first dedicated **GNN-based models** for antibody–epitope prediction.
  • Integrates both **structural** and **sequence-derived** information, unlike sequence-only predictors.
  • Demonstrated improved accuracy and generalizability across diverse Ab–Ag complexes compared to earlier methods.
Card Prepared By
ChatGPT (GPT-5 Thinking)

Errors

Loading ESM-IF1 model...
Traceback (most recent call last):
  File "/raid/home/wenkanl2/Epitope_tools/AbEpiTope-1.0/RunTest.py", line 11, in 
    data.encode_proteins(STRUCTUREINPUTS, ENCDIR, TMPDIR) # use atom_radius for setting custom antibody-antigen interface Å distance for example 4.5Å, interface data.encode_proteins(STRUCTUREINPUTS, ENCDIR, TMPDIR, atom_radius=4.5) 
  File "/raid/home/wenkanl2/Epitope_tools/AbEpiTope-1.0/abepitope/main.py", line 125, in encode_proteins
    esmif1_util = ESMIF1Model(esmif1_modelpath=esmif1_modelpath, device=self.device)
  File "/raid/home/wenkanl2/Epitope_tools/AbEpiTope-1.0/abepitope/esmif1_utilities.py", line 28, in __init__
    model_data = torch.load(str(torch_hubfile), map_location=self.device)
  File "/home/wenkanl2/miniconda3/envs/inverse/lib/python3.9/site-packages/torch/serialization.py", line 1529, in load
    raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
_pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint. 
        (1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
        (2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message.
        WeightsUnpickler error: Unsupported global: GLOBAL argparse.Namespace was not an allowed global by default. Please use `torch.serialization.add_safe_globals([argparse.Namespace])` or the `torch.serialization.safe_globals([argparse.Namespace])` context manager to allowlist this global if you trust this class/function.

Check the documentation of torch.load to learn more about types accepted by default with weights_only https://pytorch.org/docs/stable/generated/torch.load.html.

Different version of pytorch. Adding weights_only=False in the torch.load in abepitope/esmif1_utilities.py by line 28 solve the problem.

ESM Ecoding Error:

AbEpiTope-1 replies on biotite to read the PDB file and get the sequence for ESM encoding. However, biotite only accepted standard PDB file. It would throw error for structure like “ZDOCK” docking results. The easiest way to fix it is read the PDB file with PyMOL and save it again as a new PDB file. Then, it would work.

BConformeR

Antibody–Antigen BConformeR
Background Info
Model Type
Transformer-based deep learning (Conformer + BERT hybrid)
Released
2023
Publication
Bioinformatics, Vol. 39, Issue 6
Authors
Md Mahiuddin; Giovanni Marino; Paolo Marcatili
Chains Limits
limited to 1024 resideus, none-antibody awareness
Why Published
  • Introduced a **Conformer architecture** (combining CNN + Transformer) tailored for B-cell epitope prediction.
  • Improved handling of **long-range dependencies** compared to traditional CNN or GNN models.
  • Benchmarked with higher predictive power on diverse datasets, showing advances over AbEpiTope-1.0 and other prior methods.
Card Prepared By
ChatGPT (GPT-5 Thinking)

  1. Li, Dong, Fabrizio Pucci, and Marianne Rooman. “Prediction of paratope–epitope pairs using convolutional neural networks.” International Journal of Molecular Sciences 25.10 (2024): 5434. ↩︎

Deep Learning for Antibody-Antigen Interaction Prediction

https://karobben.github.io/2025/08/21/AI/deeplearningAB/

Author

Karobben

Posted on

2025-08-21

Updated on

2025-08-22

Licensed under

Comments