Structure inpainting and simulation-ready setup for proteins, DNA, RNA, and complexes
Website | Atlas | Paper | PATCHR-Studio
Download PATCHR-Studio: Windows · macOS (Apple Silicon) · Linux
1KX3 : nucleosome histone-tail inpainting | 6GIS : PCNA + 50 bp DNA extension | 8GZR : NS3 polymerase + RNA reconstruction | 4ZLO : Kinase inpainting with ligand |
Most experimental structures in the PDB have missing regions -- flexible loops, disordered terminals, unresolved sidechains. PATCHR fills them in using diffusion-based inpainting while keeping existing coordinates exactly as-is.
Backend-agnostic-- supportsBoltz-2andProtenix- Works with proteins, DNA, RNA, and multi-chain complexes - 99.4% connectivity pass rate, from short loops to 600+ residue extensions
PATCHR Atlas — large-scale inpainting of the PDB
From every PDB complex with an internal missing region (excluding very large structures), PATCHR inpainted the full set of 66,417 multimeric structures — all browsable and downloadable.
Benchmark — 940 PDB40 structures with artificially introduced gaps mirroring real PDB missing-region statistics. Cα and all-atom RMSD computed over inpainted residues only.
| Method / Configuration | Cα RMSD (Å) | All-atom RMSD (Å) |
|---|---|---|
| PATCHR (full, + LRD) | ||
| 1.781 | ||
| 2.542 | ||
| Boltz-2 + template conditioning | 4.647 | 5.510 |
| Boltz-2 + template conditioning + steering (threshold = 5.0 Å) | 3.675 | 4.342 |
| Boltz-2 + template conditioning + steering (threshold = 2.0 Å) | 3.397 | 4.081 |
| Boltz-2 + template conditioning + steering (threshold = 0.5 Å) | 3.219 | 3.889 |
| RFdiffusion2 (all-atom) | 9.188 | 10.199 |
| RFdiffusion (backbone-only) | 2.043 | — |
git clone https://github.com/DeepFoldProtein/patchr.git
cd patchr && pip install -e .
Mac
conda create --name patchr python=3.12 llvmlite==0.44.0 numba==0.61.0 numpy==1.26.3
conda activate patchr
git clone https://github.com/DeepFoldProtein/patchr.git
cd patchr && pip install -e .
export KMP_DUPLICATE_LIB_OK=TRUE
Docker
./scripts/docker-run.sh # Run with all GPUs
PATCHR_GPU=0 ./scripts/docker-run.sh # Select GPU
Model weights are cached at ~/.boltz
on the host (override with BOLTZ_CACHE
).
For Slurm clusters with Apptainer:
sbatch scripts/slurm-run.sh
1. Generate a template from a PDB structure:
patchr template 1TON all
2. Run inpainting:
patchr predict examples/inpainting/1ton_AB.yaml --out_dir results
The first run downloads the model checkpoint automatically to ~/.boltz/
.
Template options
patchr template 1CK4 all # All polymer chains
patchr template 4ZLO A,B --uniprot # With UniProt sequence
patchr template --input structure.cif A,B # From local CIF
patchr template 7EOQ all-copies # Including duplicate copies
patchr template 1BNA all -o my_templates/ # Custom output directory
patchr template 7EOQ A --include-solvent # Include solvent atoms
patchr template 1CK4 all --assembly best # Biological assembly
patchr template 1CK4 all --relative-paths # Use relative paths in YAML (default: absolute)
Prediction options
patchr predict examples/inpainting/4zlo_ABCD.yaml --out_dir results --seed 42
patchr predict examples/inpainting/1ck4_AB.yaml --out_dir results --diffusion_samples 5
patchr predict examples/inpainting/1bna_AB.yaml --out_dir results --backend protenix
patchr predict examples/inpainting/7eoq_ABCDEFGHIJKLMN.yaml --out_dir results --use_msa_server
patchr predict my_templates/ --out_dir results
patchr predict my_templates/ --out_dir results --backend protenix --seeds 42,101
Go directly from structure completion to MD simulation input:
patchr predict input.yaml --out_dir results --sim-ready gromacs
patchr predict input.yaml --out_dir results --sim-ready amber --ff amber14sb
Standalone command
patchr sim-ready prediction.cif --engine gromacs --ff charmm36m
patchr sim-ready prediction.cif --engine openmm --padding 1.2 --ion-conc 0.15
PATCHR uses diffusion-based generation conditioned on your experimental structure as a rigid template:
| Technique | What it does | |
|---|---|---|
| 1 | Template Conditioning | |
| Anchors known coordinates at every diffusion step | ||
| 2 | Synchronized Rigid Template Tracking | |
| Keeps the template aligned with the evolving generation | ||
| 3 | Local Refinement Denoising | |
| Cleans up bond geometry at template-generation junctions |
A desktop application providing a graphical interface to the full workflow, with no command line required. Download from the links above or the releases page.
Beyond reconstructing missing regions, the interactive sequence editor supports residue-level edits applied directly on the structure and regenerated in a single inpainting run:
Erase and regenerate— remove resolved residues and re-inpaint them** Mutation**— substitute a residue identity; the side chain is rebuilt by inpainting** Post-translational modifications**— introduce modified residues (SEP, TPO, PTR, MLY, M3L)
Staged edits are listed and individually reversible prior to execution, and outputs are versioned for comparison across runs. Prediction, GPU queue status, and simulation-ready export are integrated.
No GPU? Run the server on Google Colab for free and connect from PATCHR-Studio.
patchr serve --model boltz2 --device-id 0
patchr serve --model protenix --port 8080
patchr serve --model all
Beyond the headline RMSDs above, PATCHR also produces simulation-ready geometry:
| Metric | Value |
|---|---|
| Backbone RMSD (missing residues) | 1.78 Å |
| lDDT (missing atoms) | 98.6 |
| Connectivity pass rate | 99.4% |
Impact of Local Refinement Denoising (LRD)
| Metric | With LRD | Without LRD |
|---|---|---|
| Structures with no issues | 99.4% | |
| 87.4% | ||
| Cα--Cα gaps (4.5--10 Å) | 0.21% | 4.57% |
| Peptide bond (C--N) issues | 0.85% | 15.43% |
| Broken chains (>10 Å) | 0.32% | 0.74% |
Accuracy by structural context
| Secondary structure | RMSD (Å) | Solvent accessibility | RMSD (Å) | |
|---|---|---|---|---|
| Helix | 0.30 | Buried | 0.39 | |
| Strand | 0.26 | Intermediate | 0.65 | |
| Loop | 0.85 | Surface | 1.01 |
Any model trained on the AlphaFold3 framework can be converted into an inpainting model through the PATCHR protocol. Currently implemented for Boltz-2 and Protenix only; extending to additional AF3-family backends is planned.
PATCHR builds upon Boltz-2 by Passaro, Corso, Wohlwend et al. and Protenix by ByteDance.
MIT -- free for academic and commercial use.
@article{bae2025patchr,
author = {Bae, Hanjin and Kim, Kunwoo and Yoo, Jejoong and Joo, Keehyoung},
title = {PATCHR-Studio: Template-conditioned diffusion-based molecular structure
inpainting for Protein, RNA, and DNA complexes},
year = {2025}
}