Skip to main content

A deep learning model for protein-ligand binding affinity prediction

Project description

DockTDeep

Preprint: "Data-centric training enables meaningful interaction learning in protein–ligand binding affinity prediction." ChemRXiv.

💾 Installation

[!TIP] Always use a virtual environment to manage dependencies.

python -m venv .venv
source .venv/bin/activate

Using pip

Quick setup for inference. Install the package directly from PyPI:

pip install docktdeep

🚀 Quick start

Basic usage

Predict binding affinities for protein-ligand pairs (predictions are given in kcal/mol).

# single protein-ligand pair
docktdeep predict --proteins protein.pdb --ligands ligand.pdb --output-csv results.csv

# multiple pairs
docktdeep predict \
    --proteins protein1.pdb protein2.pdb \
    --ligands ligand1.pdb ligand2.pdb \
    --output-csv results.csv \
    --max-batch-size 16

# options available in help
docktdeep predict --help

[!TIP] Use shell globbing patterns to process multiple files efficiently.

# using regex expansion
docktdeep predict \
   --proteins $(ls path/to/proteins/*_protein.pdb) \
   --ligands $(ls path/to/ligands/*_ligand.pdb)

# another example using find command for more complex patterns
docktdeep predict \
   --proteins $(find /data/complexes -name "*_protein_prep.pdb" | sort) \
   --ligands $(find /data/complexes -name "*_ligand_rnum.pdb" | sort)

⚙️ Development setup

For development and training custom models:

# clone the repository
git clone https://github.com/gmmsb-lncc/docktdeep.git
cd docktdeep

# create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate

# install deps
python -m pip install -r requirements.txt

# run tests to verify installation
python -m pytest tests/

Training models

Initialize a new aim repository for tracking experiments:

aim init

# to start the aim server
aim server

To see all available training options:

python train.py --help

Train a model with optimized hyperparameters:

python train.py \
    --model Baseline \
    --experiment experiment-name \
    --depthwise-convs \
    --adaptive-pooling \
    --optim AdamW \
    --max-epochs 1500 \
    --batch-size 64 \
    --lr 0.00087469 \
    --beta1 0.25693012 \
    --eps 0.00032933 \
    --dropout 0.25348994 \
    --wdecay 0.0000169 \
    --molecular-dropout 0.06 \
    --molecular-dropout-unit complex \
    --random-rotation \
    --dataframe-path path/to/dataframe.csv \
    --root-dir path/to/data/PDBbind2020 \
    --ligand-path-pattern "{c}/{c}_ligand_rnum.pdb" \
    --protein-path-pattern "{c}/{c}_protein_prep.pdb" \
    --split-column random_split

📝 Citation

If you use DockTDeep in your research, please cite:

@article{dasilva2025docktdeep,
  title={Data-centric training enables meaningful interaction learning in protein--ligand binding affinity prediction},
  author={da Silva, Matheus M. P. and Vidal, Lincon and Guedes, Isabella and de Magalh{\~a}es, Camila and Cust{\'o}dio, F{\'a}bio and Dardenne, Laurent},
  year={2025}
}

Related

  • DockTGrid: a python package for generating deep learning-ready voxel grids of molecular complexes. GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docktdeep-0.1.0.tar.gz (313.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docktdeep-0.1.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file docktdeep-0.1.0.tar.gz.

File metadata

  • Download URL: docktdeep-0.1.0.tar.gz
  • Upload date:
  • Size: 313.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for docktdeep-0.1.0.tar.gz
Algorithm Hash digest
SHA256 426023392690e92ef3a6162cd73fc9351ad816747b8b35f22a9dd82dfa7d2127
MD5 119a1c0c0cdb873c0e5a0a1c59ec1047
BLAKE2b-256 3cf1573b3ef5b27500af7578e2cc34e60aa7854584904f4f48c09f9fe2159476

See more details on using hashes here.

File details

Details for the file docktdeep-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: docktdeep-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for docktdeep-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36cf84964a2053bebbe0029c996949ea62d791c0dcc689763d14e8eb45f9ab37
MD5 c60ffc6ffa251666b2fd1fa792c288a0
BLAKE2b-256 ef0a0eb669d2bd91890eee1e9edac3a5d5147483bf1bd2008fb158d1e9551759

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page