Protein-Ligand Binding Affinity Prediction using Graph Neural Networks
High-performance protein-ligand binding affinity prediction model - 2nd place in CASP16 ligand affinity challenge
pip install bapredRun a prediction:
bapred -r protein.pdb -l ligands.sdf -o results.tsvPredictions will be saved in results.tsv.
Installed CLI:
bapred -r protein.pdb -l ligands.sdf -o results.tsvUse a different weight:
bapred -r protein.pdb -l ligands.sdf -o results.tsv --weight /path/to/checkpoint.pthFrom a source checkout:
python -m bapred.inference -r example/1KLT.pdb -l example/ligands.sdf -o results.tsvPython API:
from bapred.inference import inference
inference(
protein_pdb="example/1KLT.pdb",
ligand_file="example/ligands.sdf",
output="results.tsv",
batch_size=128,
device="cuda",
)BA-Pred/
├── src/
│ └── bapred/ # Main package
│ ├── data/ # Data processing modules
│ ├── model/ # Neural network models
│ ├── weight/ # Packaged model weights
│ └── inference.py # Inference engine + CLI
├── example/ # Example files
│ ├── 1KLT.pdb # Sample protein structure
│ ├── ligands.sdf # Sample ligand library
│ └── run.sh # Example inference script
├── pyproject.toml # Package configuration
└── README.md
- Protein: PDB format (
.pdb) - Ligands: SDF (
.sdf), MOL2 (.mol2), or text file with paths (.txt)
- CSV/TSV file with columns:
Name: Ligand identifierpKd: Predicted binding affinity (pKd scale)Kcal/mol: Binding energy in kcal/mol
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
If you use BA-Pred in your research, please cite the paper:
@article{Sim_2026,
title={BA-Pred and RMSD-Pred: Integrated Graph Neural Network Models for Accurate Protein-Ligand Binding Affinity and Binding Pose Prediction},
author={Sim, Jaemin and Lee, Juyong},
journal={Journal of Chemical Information and Modeling},
year={2026},
month={apr},
doi={10.1021/acs.jcim.5c02591},
url={https://doi.org/10.1021/acs.jcim.5c02591}
}Made with care for the scientific community
Star us on GitHub if this project helped you!