This repository accompanies the chapter āModeling ProteināProtein Complexes by Combining pyDock and AlphaFoldā published in Methods in Molecular Biology (2026), and provides a practical, reproducible implementation of the workflow described by RodrĆguez-Lumbreras et al. .
The main goal is to demonstrate how artificial intelligenceābased modeling (AlphaFold2-Multimer and AlphaFold3) can be combined with energy-based scoring from pyDock to improve the accuracy of proteināprotein complex predictions, particularly for challenging cases such as:
- antibodyāantigen complexes
- multiprotein assemblies
- weak or transient interactions
- highly flexible proteins
The repository is organized into three folders, each corresponding to a major stage of the workflow: model generation with AlphaFold, energy scoring with pyDock, and final integration of both approaches.
āāā 3.1_Generating_3D_Models_for_Protein_Protein_Complexes_with_AlphaFold/
ā Scripts and examples for generating multiple conformations
ā using ColabFold AlphaFold2-Multimer, including the relaxation
ā of all recycled intermediate models generated by AF2.
ā
āāā 3.3.2_Computing_pyDock_Scores_for_a_Set_of_Complexes/
ā Templates (.ini ) generation, bindEy execution, chain reconstruction
ā with SCWRL, and parsed pyDock energy tables.
ā
āāā 3.4_Combined_Model_Confidence_and_pyDock_Score/
ā Scripts for integrating AlphaFold confidence metrics (AF-MC) with
ā pyDock energy scores, including parsed energy tables and extracted
ā AF2/AF3 metadata. This section computes z-scores for both scoring
ā functions, generates combined AFāpyDock rankings, and outputs the
ā final prioritized model list.
Each section contains ready-to-use scripts, test cases, and short usage notes.
This folder contains:
-
Workflows for AlphaFold2-Multimer (versions v1, v2, v3) with:
- increased recycles
- dropout during inference
- saving all intermediate recycles
- multiple seeds
-
ColabFold and LocalColabFold pipelines for rapid predictions without large databases.
-
AlphaFold3 examples (server-based and local execution).
-
FASTA templates for heterodimers and homooligomers.
The aim is to generate >100 structural models per complex, which is essential for the subsequent scoring stage.
This folder includes:
-
Automatic generation of all required
*.inifiles. -
Parallel execution of bindEy via Greasy.
-
Optional side-chain reconstruction using SCWRL3/4.
-
Example
*.eneenergy tables including:- Electrostatics (ELE)
- Desolvation (DESOLV)
- Van der Waals (VDW)
- pyDock total energy (0.1Ā·VDW)
- pyDock total energy (1.0Ā·VDW)
The VHHāRNase A (PDB 4POU) complex is provided as an illustrative example.
combining AlphaFold model confidence (AF-MC = 0.8Ā·ipTM + 0.2Ā·pTM) with pyDock energies using z-score normalization.
Included:
-
Extraction of AF-MC from AF2
log.txtor AF3summary_confidence.json. -
Computation of:
Z = (X ā μ) / Ļ -
Calculation of:
Z_AF-MCZ_pyDock-1VDWZ_combined = Z_AF-MC ā Z_pyDock-1VDW
-
Final ranking and filtering of top predictions.
When AF-MC < 0.8, the pipeline automatically falls back to classical pyDock docking, following the decision tree shown in Fig. 1 of the chapter.
In this repository, only the components highlighted in the red box of the figure are implemented, namely:
- Generation of AlphaFold2-Multimer models using ColabFold (optional use AlphaFold3 server)
- Extraction of ipTM and pTM
- Computation of Model Confidence (AF-MC)
- Calculation of pyDock energy scoring for AF2-generated complexes
The remaining moduleāthe docking stage starting from monomeric or unbound structuresāis not included here. If docking poses are needed, they can be generated via the pyDockWEB server:
š https://life.bsc.es/pid/pydockweb
- VHHāRNase A (4POU) ā AF2 rank 1 fails; pyDock identifies an acceptable model.
- Python ā„ 3.8
- pyDock ā„ 3.0
- SCWRL3 or SCWRL4
- Greasy (for task parallelization)
- AlphaFold2-Multimer / ColabFold / AlphaFold3 (depending on workflow)
git clone https://github.com/PyDock/AF_pyDock/
cd AF_pyDockEach internal folder includes its own usage notes and example scripts.
If you use this repository, please cite:
RodrĆguez-Lumbreras LA, Monteagudo V, FernĆ”ndez-Recio J. Modeling ProteināProtein Complexes by Combining pyDock and AlphaFold. Methods in Molecular Biology (2026).
Contributions, suggestions, and pull requests are welcome.
For questions related to the protocol or pyDock software: