ProteinDJ v3.0.0
ProteinDJ v3.0.0
Major Update: PyRosectomy for commercial use, OpenMM Relaxation, and BoltzGen
Authors: @JoshuaMHardy @tlitfin @dladd
This release brings together a rewrite of dl_binder_design, analysis, and switches BindCraft to FreeBindCraft to remove the PyRosetta dependency. We have also integrated BoltzGen for fold design. Note that v3 is not backwards compatible and requires a fresh installation, as containers and models have been updated.
Highlights
- New step-by-step tutorial for binder design on the insulin receptor
- Replaced BindCraft with FreeBindCraft, removing the PyRosetta dependency from the binder hallucination stage.
- Rewrote dl_binder_design to drop PyRosetta in favour of OpenMM-based relaxation (GPU-accelerated, 4-5x faster than FastRelax).
- Rewrote
analyse_best_designs.py(the final Analysis stage) to drop PyRosetta entirely, replacing it with PDBFixer/OpenMM relaxation, arpeggia (shape complementarity, H-bonds, SAP), and PRODIGY (binding free energy) - Added BoltzGen as a third Fold Design engine alongside RFdiffusion and BindCraft, with new
boltzgen_denovo(de novo monomer/binder generation) andboltzgen_motifscaff(existing monomer/binder sequence/structure redesign, including insertions and deletions) pipeline modes. - Added a new option for prediction (
af2_boltz) which runs AlphaFold2 first, followed by Boltz-2 on the surviving designs. - Boltz-2 target prediction now supports targets with multiple/broken chains.
- Added an optional target-free "unbound" binder prediction with Boltz-2 (
boltz_predict_unbound_binder, off by default) - Collapsed the 8 monomer/binder RFdiffusion
design_modeoptions into 4 (rfd_denovo,rfd_foldcond,rfd_motifscaff,rfd_partialdiff); monomer vs. binder behaviour is now auto-detected at runtime - Removed the
rfd_contigs/rfd_inpaint_seqmanual contig-specification parameters entirely. RFdiffusion contigs are now always auto-generated from parameters — trim/edit your target PDB directly (e.g. in ChimeraX/PyMOL) instead of writing contig strings by hand.
FreeBindCraft / BindCraft
- Raised verbosity of the OpenMM relaxation step to report per-iteration energies.
- Relaxation across the 3 stages now always resumes from the best geometry seen so far, so the tight-tolerance stage 3 (0.1 kJ/mol/nm) refines the best structure rather than a potentially degraded one from stage 2.
- Forced temp file writes to the working directory.
- Container now explicitly installs CUDA 12 Python modules; pinned
cuda-nvcc/cuda-versionto12.*to stop conda-forge from pulling CUDA 13.1+.
ProteinMPNN + FastRelax/OpenMMRelax
- dl_interface_design_multi.py now uses OpenMM relaxation instead of FastRelax (ProteinMPNN-OpenMMRelax) based on the algorithm used in FreeBindCraft, with increased logging of energies and acceptance/rejection decisions.
- Merged the
af2anddl_binder_designcontainers into one (dl_binder_design), since both now require GPU — the standaloneaf2.defand container are removed. - ProteinMPNN weights removed from the container; now mounted at runtime via a new
mpnn_modelsparameter, same as AF2 weights (with a matching model download step).
ProteinMPNN+OpenMMRelax benchmarking
We applied our new OpenMMRelax approach to binder design using the same benchmarking approach and five targets as in our paper, and calculated in silico success rates for AF2 prediction. Although there is some stochastic variation per target due to the random seeds, the average success rate across all targets was similar between FastRelax and OpenMMRelax, with the GPU-accelerated OpenMMRelax running 4-5x faster than CPU-bound FastRelax.
| Sequence Design Method | HA | IL7Rα | IR | PD-L1 | TrkA | Average |
|---|---|---|---|---|---|---|
| v2 ProteinMPNN(Soluble) | 5.0% | 5.8% | 27.6% | 33.9% | 8.5% | 16.2% |
| v3 ProteinMPNN(Soluble) | 6.4% | 9.8% | 23.1% | 33.9% | 8.6% | 16.4% |
| v2 ProteinMPNN(Soluble) + FastRelax | 6.1% | 9.1% | 29.6% | 52.3% | 18.1% | 23.0% |
| v3 ProteinMPNN(Soluble) + OpenMMRelax | 4.9% | 15.1% | 30.1% | 52.1% | 13.5% | 23.1% |
Analysis & Filtering
analyse_best_designs.pyrewritten to remove PyRosetta:- Each predicted structure is now energy-minimized once (PDBFixer + OpenMM), preserving per-atom B-factors, and every metric is calculated from that single relaxed structure.
- Interface shape complementarity (Lawrence & Colman algorithm), hydrogen bonds, buried unsatisfied hydrogen bonds (angle-dependent), and SAP score are now calculated with arpeggia instead of the
scbinary/PyRosetta. - Binding free energy (
pr_intface_deltaG) is now predicted with PRODIGY's IC-NIS model (kcal/mol) instead of Rosetta's InterfaceAnalyzerMover (Rosetta Energy Units). - Removed the defunct
pr_intface_packstat/pr_TEMmetrics and associated filters (pr_min_intface_packstat/pr_max_tem) metrics, which had no open-source equivalent. - Designs where the binder and target chains have no interface contact at all (e.g. a failed prediction) no longer crash the Analysis stage -- BSA, shape complementarity, deltaG, H-bonds, and unsatisfied H-bonds are reported as zero instead of raising an error.
- Fixed handling of
mkdssp>=4.0's PDB/mmCIF auto-detection for headerless AF2/Boltz output PDBs.
- Fold-based filtering (FilterFold) now uses BioPython (+DSSP) to calculate radius of gyration and the number of secondary structures, with the same
mkdssp>=4.0 header fix applied. - Sequence-property filtering (extinction coefficient, isoelectric point) split out of
filter_analysis.pyinto a new dedicatedscripts/filter_seq.py, exposed via a renamedFilterSeqprocess (replacesFilterMPNN). prep_fampnn_designs.pyrewritten to use PDBFixer + FASPR (pyfaspr) instead of PyRosetta for backbone/side-chain restoration, preserving per-residue B-factor/occupancy metadata.- New
mpnn_timemetric added alongside existingmpnn_score/fampnn_avg_psce.
Structure Prediction
- af2_initial_guess predict.py now uses BioPython for I/O, PDBfixer/Pyfaspr to add side-chains, instead of PyRosetta
prep_boltz_yaml.pynow detects chain breaks (C→N distance > 3 Å) and splits a target into multiple chains (B, C, D, …) before prediction.align_boltz.pyupdated to align/compute RMSD against all non-binder target chains, rather than assuming a single chain B.- New metrics:
boltz_ptm_binder(binder-only pTM) andboltz_ptm_target(mean pTM across all target chains).boltz_iptmis redefined as the mean binder→target interface pTM across all target chains. - New
pred_methodoption:af2_boltz, which cascades the two existing structure prediction methods -- AlphaFold2 Initial-Guess runs first as a fast pre-filter, survivors are filtered with anyaf2_*thresholds, and only the surviving designs are then re-predicted and filtered with Boltz-2 (boltz_*thresholds). This gives Boltz-2-quality metrics on the final design set while avoiding the cost of running Boltz-2 on every candidate.- When
af2_boltzis used, bothaf2_*andboltz_*metric columns are populated for designs that make it through both stages. - Ranking (
--rank_designs) defaults to the Boltz-2 metrics (boltz_ptm/boltz_ipSAE_min) whenpred_methodisaf2_boltz, since Boltz-2 is the final/most-refined stage.
- When
- Added persistent cache for AlphaFold2 to reduce compilation overhead of jax models by caching compiled kernels on disk, which persists across multiple runs (
af2_jax_compilation_cache_dir). Each cache file is valid for a single design+target length and a single GPU model e.g. A30 only. - Added ipTM metric for AlphaFold2 with filter (
af2_min_iptm). Renamed metric field names for Boltz-2 from *_interface to *_iptm, *_iplddt, and *_ipde for consistency. - Added an optional target-free "unbound" binder prediction with Boltz-2 (
boltz_predict_unbound_binder, off by default), which predicts the binder chain alone as a monomer to check whether it folds consistently in the absence of the target. Binder design modes only; runs alongside the existing (bound) Boltz-2 prediction and adds new metrics:boltz_unbound_rmsd,boltz_unbound_conf_score,boltz_unbound_ptm,boltz_unbound_plddt,boltz_unbound_pdemetrics with matching filters (boltz_max_unbound_rmsd,boltz_min_unbound_conf_score,boltz_min_unbound_ptm,boltz_min_unbound_plddt,boltz_max_unbound_pde).
Fold Conditioning
- Replaced PyRosetta DSSP with BioPython DSSP (mkdssp) for secondary structure assignment in create_scaffolds.py
- Removed incomplete P-SEA fallback (get_sse)
- Changed GenerateRFDFoldCond process label from pyrosetta_tools to python_tools (which already includes biopython and dssp)
RFdiffusion
- Collapsed
monomer_denovo/binder_denovointorfd_denovo,monomer_foldcond/binder_foldcondintorfd_foldcond,monomer_motifscaff/binder_motifscaffintorfd_motifscaff, andmonomer_partialdiff/binder_partialdiffintorfd_partialdiff. Each mode now auto-detects monomer vs. binder design from whetherinput_pdb(and, forrfd_motifscaff/rfd_partialdiff, chain count/contigs) indicates a target is present, via a singleis_binder_modeflag computed once and threaded through the workflow. Existing pipeline configs using the old 8 mode names will need to be updated to the new 4 mode names bindsweeperupdated to match:binder_schema.jsonmode keys and mode-prefix checks renamed frombinder_*torfd_*.hotspot_residuesnow supports comma-separated residue ranges (e.g.A115-120) and whole-chain tokens (e.g.B) in addition to single residues, expanded internally into individual residues for RFdiffusion'sppi.hotspot_res— previously only single residues were supported, unlike BindCraft/BoltzGen.- Removed the
rfd_contigs/rfd_inpaint_seqmanual contig-specification parameters entirely. RFdiffusion contigs are now always auto-generated frominput_pdb/design_length/motifscaff_spec/rfd_partialdiff_spec, the same way BindCraft/BoltzGen work — trim/edit your target PDB directly (e.g. in ChimeraX/PyMOL) instead of writing contig strings by hand. rfd_motifscaffbinder design now defaults to thecomplex_baseRFdiffusion checkpoint automatically (unlessmotifscaff_inpaint_seq/flexible_residuesis set, orrfd_ckpt_overrideis set explicitly). This mode never sets hotspot residues, so RFdiffusion's own checkpoint auto-selection would otherwise silently fall back to the monomer-onlybasecheckpoint even when a target chain is present.- renamed
rfd_lengthtorfd_motifscaff_length,rfd_scaffold_dirtorfd_foldcond_scaffold_dir,rfd_mask_loopstorfd_foldcond_mask_loopsto better indicate their mode relevance
BoltzGen
- Added BoltzGen as a third Fold Design engine alongside RFdiffusion and BindCraft, via two new pipeline modes:
boltzgen_denovo— diffuse a new binder (chain A) of a given length against a fixed target (frominput_pdb), with optional hotspot/anti-hotspot residues and/or target structural flexibility.boltzgen_motifscaff— rework an existing chain A binder against the remaining fixed chain(s) ofinput_pdb, with independent control over architecture changes (insertions/deletions), sequence redesign of kept residues, and structural flexibility.
- BoltzGen model weights are downloaded/mounted the same way as AF2/ProteinMPNN (new
bg_modelsparameter); only the 3 artifacts needed for thedesignstep are fetched (~4.0 GB total), using thehfCLI instead ofwget/curlfor fast Xet-backed downloads. RunBGavoids unnecessary Hugging Face Hub network calls at runtime once models are cached.- Added
docs/integrating_fold_design_tools.md, a developer guide for integrating new Fold Design tools into ProteinDJ, generalised from lessons learned during the BoltzGen integration. - Unified the residue-spec grammar used by
hotspot_residues(RFdiffusion, BindCraft, BoltzGen) and BoltzGen'sbg_not_binding_residues: comma-separated tokens, each a chain-qualified residue (A56), chain-qualified range (A115-120), or bare chain ID meaning the whole chain (B) - Unified motif scaffolding mode/parameters with RFdiffusion: shares
motifscaff_spec/motifscaff_inpaint_seq/flexible_residuesparams also used byrfd_motifscaff
Bug Fixes
- Using
--rank_designstogether with--run_fold_onlynow raises a clear error at startup (no prediction metrics are generated to rank on) instead of silently proceeding. - Fixed a
-resumecaching bug where changing any single parameter (even one unrelated to fold design or filtering) could forceRunRFDand several filtering steps (FilterFold,FilterSeq,FilterAF2,FilterBoltz,FilterAnalysis) to needlessly re-execute from scratch. These processes previously passed the entire Nextflowparamsobject into a helper function inside their script blocks, which caused Nextflow to hash the whole params object rather than just the specific values each process actually uses. The relevant values are now computed once in the workflow body and explicitly passed to each process, so unrelated parameter changes no longer invalidate their caches. - Fixed the
uncropped_target_pdbparameter's JSON Schema pattern, which incorrectly required the value to be exactly the literal string.pdb(missing a wildcard prefix) instead of any path ending in.pdb. - Fixed handling of design length when a single integer is provided rather than a range
- Count of final designs is now calculated after ranking is complete
Documentation
- Installation docs updated: Nextflow ≥24.04 requirement clarified, plus guidance to set
NXF_SYNTAX_PARSER=v1for Nextflow v26+. - Added ProteinMPNN model weight download instructions (~0.2 GB: vanilla, soluble, and HyperMPNN weights).
metrics.md,parameters.md,README.md, and all Nextflow JSON schemas updated for new/renamed metrics and parameters, removing stale "PyRosetta"/"Rosetta Energy Units" references from the Analysis stage description in favour of the new arpeggia/PRODIGY/OpenMM toolchain.docs/modes.mdrestructured around the new 4 RFdiffusion modes, each documenting both monomer and binder usage;README.md,parameters.md,testing.md,installation.md, andbindsweeper.mdupdated to the newrfd_*mode names.- Added Arpeggia, OpenMM/PDBFixer, and PRODIGY to the software list and citations in
README.md.
Infrastructure & Config
- Rebuilt
python_tools,bindcraft, anddl_binder_designcontainer definitions (now installuv,pyfaspr,pdbfixer, etc.);af2.defremoved. - New
mpnn_modelsparameter (path to ProteinMPNN checkpoints) added tonextflow.config, including a cluster-profile default path. apptainer.pullTimeoutincreased to 20 minutes in the cluster profile..gitignoreupdated to excludework/,*.sif, andlib/**/__pycache__/.- Improved compatibility with Amazon S3 storage systems.
- Refactored fold-design mode dispatch in
main.nfinto aDesignEnginestrategy pattern (lib/DesignEngine.groovy,BindCraftEngine,BoltzGenEngine,RFDEngine), consolidating each engine's validation, startup logging, and input-file collection and removing ~300 lines of duplicated per-mode logic. - Added pytest and nf-test suite for input validation and file checks, as well as process/module level tests.
bindsweeper'sbinder_schema.json(used to validate sweep configs) is now mechanically generated from the pipeline's per-mode Nextflow schemas via a newscripts/generate_bindsweeper_schema.py, instead of being hand-maintained. Every parameter valid for a given mode is now available to sweep, rather than a previously hand-curated subset.- Per-mode generated Nextflow schemas (
schemas/nextflow_schema_<mode>.json) no longer include empty parameter groups