dl_binder_design
Model Introduction
dl_binder_design is a de novo protein binder design pipeline introduced by Bennett et al. It takes a binder-target complex backbone as input, uses ProteinMPNN to design binder sequences, optionally optimizes the structure with PyRosetta FastRelax, and then evaluates the designed complex using an AlphaFold2 implementation modified to support an initial structural guess.
The AlphaFold2 stage outputs confidence and structural consistency metrics including pLDDT, PAE, interaction PAE, and RMSD.
Paper: Improving de novo protein binder design with deep learning
Model Description
This package is not a single neural network. It is a composite inference pipeline consisting of multiple pretrained models and structural modeling tools:
Binder-target complex backbone
(PDB / Rosetta silent file)
β
βββ ProteinMPNN
β βββ Designs binder amino acid sequences
β
βββ PyRosetta FastRelax
β βββ Optimizes the complex structure (optional)
β
βββ AlphaFold2 initial guess
βββ Re-predicts the complex and reports
pLDDT, PAE, interaction PAE, and RMSD
This workflow does not generate a binder backbone directly from a target structure.
The input binder-target backbone can be generated beforehand using tools such as RFdiffusion or provided directly as a PDB or Rosetta silent structure. Example structures are included in this Hugging Face model package.
Use Cases
| Use Case | Description |
|---|---|
| Binder sequence design | Generate candidate binder sequences for a given binder-target backbone. |
| Sequence and backbone optimization | Alternate ProteinMPNN sequence design with PyRosetta FastRelax. |
| Complex structure validation | Use AlphaFold2 with an initial structural guess to re-predict designed complexes. |
| Candidate filtering | Rank candidates using pLDDT, PAE, pae_interaction, and aligned RMSD. |
| Batch processing | Process PDB directories, runlists, checkpoints, and Rosetta silent files. |
Usage
1. OneCode
You can use the OneCode online environment for an intelligent one-click AI4S programming experience:
Try OneCode for AI4S Programming
2. Manual Installation
Hardware Requirements
- ProteinMPNN supports CPU execution and accelerator devices visible to PyTorch;
- PyRosetta FastRelax mainly runs on CPU, and a high-performance multi-core CPU is recommended;
- FastRelax runtime depends on structure length, number of designs, and
relax_cycles; - AlphaFold2 memory usage and runtime increase with complex length and the number of recycles;
- Sufficient disk space is required for the approximately 356 MB
params_model_1_ptm.npzfile, ProteinMPNN weights, PyRosetta installation and database files, as well as generated PDB files, checkpoints, score files, and temporary outputs.
Download the Model Package
Install the Hugging Face command-line tool and download the model repository:
python -m pip install -U huggingface_hub
hf download OneScience-Group/dl_binder_design --local-dir ./dl_binder_design
cd dl_binder_design
Install the Runtime Environment
DCU Environment
# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
python -m pip install onescience[bio-dcu] \
-i http://mirrors.onescience.ai:3141/pypi/simple/ \
--trusted-host mirrors.onescience.ai
GPU Environment
# Activate Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
python -m pip install onescience[bio-gpu] \
-i http://mirrors.onescience.ai:3141/pypi/simple/ \
--trusted-host mirrors.onescience.ai
Install the additional dependencies required by dl_binder_design:
python -m pip install --no-deps -r requirements.txt
Input Requirements
The default workflow assumes the following input format:
- The first chain is the binder to be designed;
- The second chain is the fixed target;
- The current AlphaFold2 inference script supports at most two chains;
- Different chains should preferably use non-overlapping residue numbering;
- If duplicated residue numbers are detected, the adapted script renumbers them by default;
- Input structures should contain valid backbone atoms and clearly defined chain boundaries;
- Binder residues that must remain unchanged can be marked with the PDB residue label
FIXED.
Example inputs are provided under:
conf/examples/inputs/
The example package includes:
- 10 PDB binder-target complex backbones;
- ProteinMPNN reference outputs;
- A Rosetta silent file.
Environment Validation
Verify the ProteinMPNN environment:
python model/include/importtests/proteinmpnn_importtest.py
Verify the AlphaFold2 environment:
python model/include/importtests/af2_importtest.py
Unified Inference Entry Point
ProteinMPNN Only
Purpose: Rapidly design binder sequences for the input complex backbone without running FastRelax.
This mode is useful for validating ProteinMPNN checkpoint loading and batch candidate generation.
python scripts/inference.py mpnn \
--input-dir conf/examples/inputs/pdbs \
--output-dir output/mpnn_no_relax \
--relax-cycles 0 \
--seqs-per-struct 1 \
--debug
ProteinMPNN + FastRelax
Purpose: Perform sequence design followed by one FastRelax cycle to reduce local structural clashes and optimize the binder-target complex backbone.
python scripts/inference.py mpnn \
--input-dir conf/examples/inputs/pdbs \
--output-dir output/mpnn_fastrelax \
--relax-cycles 1 \
--seqs-per-struct 1 \
--debug
AlphaFold2 CPU Smoke Test
Purpose: Re-evaluate a single designed structure using AlphaFold2 with an initial structural guess and output confidence and structural consistency metrics such as pLDDT, PAE, and RMSD.
First create a runlist:
mkdir -p output
printf '%s\n' 'design_ppi_0_dldesign_0' > output/af2_smoke.list
Then run:
python scripts/inference.py af2 \
--input-dir conf/examples/inputs/proteinmpnn_output_pdbs \
--output-dir output/af2_cpu \
--runlist output/af2_smoke.list \
--recycle 1 \
--debug
Complete PDB Directory Pipeline
Purpose: Sequentially run sequence design, FastRelax, and AlphaFold2 validation for end-to-end batch generation and evaluation of candidate binders.
python scripts/inference.py pipeline \
--input-dir conf/examples/inputs/pdbs \
--output-dir output/pipeline \
--relax-cycles 1 \
--recycle 1 \
--debug
The output includes:
- Designed PDB structures;
- AlphaFold2-predicted PDB structures;
- Checkpoint files;
- AlphaFold2
.scscore files.
A lower pae_interaction value generally indicates higher model confidence at the binder-target interface.
However, pae_interaction, pLDDT, PAE, and related computational metrics do not replace experimental binding validation.
Silent Files and FIXED Residues
The unified inference entry point is primarily designed for PDB directories.
For Rosetta silent files, the lower-level upstream scripts can be used directly.
ProteinMPNN inference on a silent file:
python model/mpnn_fr/dl_interface_design.py \
-silent conf/examples/inputs/in.silent \
-outsilent output/mpnn_fastrelax.silent
AlphaFold2 inference on the designed silent structures:
python model/af2_initial_guess/predict.py \
-silent output/mpnn_fastrelax.silent \
-outsilent output/af2.silent \
-scorefilename output/af2.sc
ProteinMPNN silent inference performs batch sequence design directly on structures stored in a Rosetta silent file and writes the resulting designs to a new silent file.
AlphaFold2 silent inference validates those designed structures and writes both predicted structures and score information.
If RFdiffusion also provides .trb files, fixed binder positions can be transferred into PDB residue labels:
python model/helper_scripts/addFIXEDlabels.py \
--pdbdir /path/to/pdbs \
--trbdir /path/to/trbs \
--verbose
The resulting FIXED labels are used to preserve selected binder residues during subsequent sequence design.
Training
dl_binder_design is an inference orchestration pipeline built around official pretrained ProteinMPNN, PyRosetta, and AlphaFold2 components.
This repository does not provide:
- An independent trainable
dl_binder_designmodel; - A project-level training objective;
- A unified optimizer or training loop;
- A dedicated training dataset;
- A complete retraining entry point.
Therefore, this Hugging Face model package does not provide a training command.
Retraining ProteinMPNN or AlphaFold2 is a separate upstream model-training workflow and is not part of the standard dl_binder_design pipeline.
OneScience Official Resources
| Platform | OneScience Main Repository | Skills Repository |
|---|---|---|
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
Citation and License
- Paper: Improving de novo protein binder design with deep learning
- Upstream
dl_binder_designimplementation: https://github.com/nrbennet/dl_binder_design - ProteinMPNN: https://github.com/dauparas/ProteinMPNN
- AlphaFold2: https://github.com/google-deepmind/alphafold
The top-level dl_binder_design workflow code is distributed under the MIT License.
ProteinMPNN source code is also distributed under the MIT License.
AlphaFold2 source code is distributed under the Apache License 2.0. Its pretrained model parameters are distributed under separate terms, including CC BY 4.0 attribution requirements.
PyRosetta is subject to separate licensing requirements. Commercial use may require an additional license from the PyRosetta/Rosetta developers.
All third-party source code, pretrained weights, databases, datasets, and software components remain subject to their respective original licenses, copyright notices, and terms of use.
- Downloads last month
- -