
gdock: Information-driven protein-protein docking using a genetic algorithm
Free, open-source docking software for protein complexes. Use interface residues as ambiguous restraints, as in HADDOCK.
Dock proteins in your browser
Upload a receptor and ligand PDB, specify residue restraints, then run the genetic algorithm docking engine directly in your browser.
No restraints — select a receptor and ligand residue above to add a pair.
Vargas Honorato, R. gdock: Information-Driven Protein-Protein Docking Using a Genetic Algorithm. Zenodo, 2026. doi:10.5281/zenodo.18863557
Algorithm
gdock uses a genetic algorithm to optimize rigid-body protein-protein docking, guided by a physics-based scoring function and optional experimental restraints.
Genetic Algorithm
Each candidate pose is encoded as a chromosome with 6 genes: three Euler angles (α, β, γ) for rotation and three translations (x, y, z) for positioning the ligand relative to the receptor.
| Population size | 150 |
| Elitism | Top 5 preserved |
| Selection | Tournament |
| Crossover | Uniform |
| Mutation | Creep mutation |
| Early stopping | 10 generations without improvement |
Energy Function
Soft-core Lennard-Jones. Remains finite at r→0, allowing exploration of near-native poses with minor clashes.
Coulombic electrostatics with distance-dependent dielectric (ε = r) to dampen long-range interactions.
Empirical atomic solvation parameters penalize burial of polar atoms (N, O) and reward burial of hydrophobic atoms (C, S).
Flat-bottom harmonic on Cα–Cα distances. No penalty within 0–7Å; quadratic penalty beyond. HADDOCK-inspired.
Benchmark
Benchmarked on the Protein-Protein Docking Benchmark v5, gdock achieves high success rates with minimal computational cost.
Runtime Performance
Tested on standard computational hardware. Actual performance may vary based on protein size and complexity.
About DockQ
DockQ is a continuous quality measure for protein docking models, combining interface RMSD, ligand RMSD, and fraction of native contacts into a single score between 0 and 1.
Installation
Install gdock via cargo install or build from source. Requires Rust 1.85 or later.
Install via Cargo
Install directly from crates.io. Requires Rust 1.85 or later.
cargo install gdockDon't have Rust? Install it here — takes about a minute.
Prepare your input
You need two PDB files (receptor and ligand) and residue restraints indicating which residues should be in contact.
# Download and split a complex from the PDB
curl -sL https://files.rcsb.org/download/2OOB.pdb -o 2OOB.pdb
awk '/^ATOM/ && substr($0,22,1)=="A"' 2OOB.pdb > 2oob_A.pdb
awk '/^ATOM/ && substr($0,22,1)=="B"' 2OOB.pdb > 2oob_B.pdb
# Restraints format: receptor_resid:ligand_resid pairs
# Example: 933:6,936:8,940:42,941:44,946:45,950:46Run docking
Execute gdock with your structures and restraints. Most runs complete in ~15 seconds.
gdock run \
--receptor 2oob_A.pdb \
--ligand 2oob_B.pdb \
--restraints 933:6,936:8,940:42,941:44,946:45,950:46Analyze results
gdock outputs cluster representatives, top-ranked models, and a metrics file with scores.
# Output files
results/model_*.pdb # Cluster representatives
results/ranked_*.pdb # Top 5 models by score
results/metrics.tsv # Scores and DockQ values
# View metrics
cat results/metrics.tsvCLI Reference
gdock provides three subcommands: run for docking, score for energy calculation, and restraints for generating restraints from a reference structure.
Run the full genetic algorithm docking between a receptor and ligand.
gdock run [OPTIONS] --receptor <FILE> --ligand <FILE> --restraints <PAIRS>
Required:
-r, --receptor <FILE> Receptor PDB file (single chain)
-l, --ligand <FILE> Ligand PDB file (single chain)
--restraints <PAIRS> Residue pairs, e.g. 933:6,936:8,940:42
Options:
-o, --output-dir <DIR> Output directory (default: current)
-n, --nproc <NUM> Number of processors (default: total - 2)
--reference <FILE> Reference structure for DockQ calculation
--no-clust Disable clustering
--w_vdw <WEIGHT> VDW energy weight
--w_elec <WEIGHT> Electrostatics weight
--w_desolv <WEIGHT> Desolvation weight
--w_air <WEIGHT> Restraints weight
-h, --help Print helpExample
gdock run \
--receptor data/2oob_A.pdb \
--ligand data/2oob_B.pdb \
--restraints 933:6,936:8,940:42,941:44,946:45,950:46 \
--reference data/2oob.pdb \
--output-dir results/Calculate energy components for a given receptor-ligand configuration without running the genetic algorithm.
gdock score --receptor <FILE> --ligand <FILE> --restraints <PAIRS>
Required:
-r, --receptor <FILE> Receptor PDB file
-l, --ligand <FILE> Ligand PDB file
--restraints <PAIRS> Residue pairs
Options:
-h, --help Print helpExample
gdock score \
--receptor receptor.pdb \
--ligand ligand.pdb \
--restraints 933:6,936:8,940:42Output
Returns the total energy score and individual contributions: VDW, electrostatics, desolvation, and AIR restraints.
Generate restraints from interface contacts in a native complex structure. Useful for benchmarking or when interface residues are known experimentally.
gdock restraints --receptor <FILE> --ligand <FILE> [OPTIONS]
Required:
-r, --receptor <FILE> Receptor PDB file (reference)
-l, --ligand <FILE> Ligand PDB file (reference)
Options:
-c, --cutoff <DIST> Distance cutoff in Angstroms (default: 5.0)
-h, --help Print helpExample
gdock restraints \
--receptor receptor_ref.pdb \
--ligand ligand_ref.pdb \
--cutoff 5.0Restraint Format
Output is a comma-separated list of residue pairs in receptor:ligand format:
933:6,936:8,940:42,941:44,946:45,950:46

