This repository provides an extended version of Boltz-1 with restraint-guided inference to improve stereochemical accuracy in protein-ligand complex structure prediction. This method addresses significant limitations in ligand stereochemistry reproduction, including chirality, bond lengths, and bond angles, without requiring model retraining.
Try the method directly in Google Colab without any installation:
- 100% chirality reproduction for input molecular structures
- Significant improvement in bond lengths and angle geometries
- No model retraining required - works with existing Boltz-1 weights
- GPU acceleration for restraint calculations
- Maintains protein structure quality while fixing ligand stereochemistry
- Python 3.11+
- PyTorch 2.2.0+
- CUDA-compatible GPU (recommended for performance)
First, install torch-cluster with the appropriate CUDA version. For PyTorch 2.8.0:
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.8.0+${CUDA}.htmlReplace ${CUDA} with your CUDA version string (e.g., cu121 for CUDA 12.1, cu118 for CUDA 11.8, or cpu for CPU-only installation).
Examples:
# For PyTorch 2.8.0 and CUDA 12.6
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.8.0+cu126.htmlgit clone https://github.com/cddlab/boltz_ext.git
cd boltz_ext
git checkout restr_torch
pip install -e .To enable restraint-guided inference, modify your configuration YAML file:
Add chiral_restraints: true at the same level as your ligand CCD code or SMILES:
sequences:
- protein:
id: A
sequence: "MKFLVL..."
- ligand:
ccd: "ATP" # or smiles: "CC(C)CC..."
chiral_restraints: true # Add this lineAdd a top-level restraints_config section:
restraints_config:
angle:
weight: 1 # Weight for bond angle restraints
bond:
weight: 1 # Weight for bond length restraints
chiral:
weight: 1 # Weight for chirality restraints
start_sigma: 1.0 # Noise level threshold for applying restraints
gpu: true # Enable GPU acceleration# Sample configuration with restraint-guided inference
sequences:
- protein:
id: A
sequence: "MKFLVLVLLAIIWLLLPSGGAGARGDFPGTYVEYIHYQVWAISPGDKAWRLAKKDQAEVKLREYRKHLA"
- ligand:
ccd: "ATP"
chiral_restraints: true
restraints_config:
angle:
weight: 1
bond:
weight: 1
chiral:
weight: 1
start_sigma: 1.0
gpu: trueweight: Relative weight for each restraint type (default: 1)start_sigma: Sigma threshold below which restraints are applied (default: 1.0)gpu: Enable GPU-accelerated constraint calculations (default: false)- Highly recommended for large ligands or multiple diffusion samples
You can use different combinations of restraints:
- All restraints (Boltz R in paper)
restraints_config:
angle:
weight: 1
bond:
weight: 1
chiral:
weight: 1
start_sigma: 1.0- Chirality only (Boltz Rc in paper)
restraints_config:
chiral:
weight: 1
bond:
weight: 0
chiral:
weight: 0
start_sigma: 1.0- Final step only (Boltz R1 in paper)
restraints_config:
angle:
weight: 1
bond:
weight: 1
chiral:
weight: 1
start_sigma: 0.005If you use this work in your research, please cite:
@article{ishitani2025improving,
title={Improving Stereochemical Limitations in Protein-Ligand Complex Structure Prediction},
author={Ishitani, Ryuichiro and Moriwaki, Yoshitaka},
journal={bioRxiv},
year={2025},
doi={10.1101/2025.03.25.645362v2}
}Boltz-1 is the state-of-the-art open-source model that predicts the 3D structure of proteins, RNA, DNA, and small molecules; it handles modified residues, covalent ligands and glycans, as well as condition the generation on pocket residues.
For more information about the model, see our technical report.
Install boltz with PyPI (recommended):
pip install boltz -U
or directly from GitHub for daily updates:
git clone https://github.com/jwohlwend/boltz.git
cd boltz; pip install -e .
Note: we recommend installing boltz in a fresh python environment
You can run inference using Boltz-1 with:
boltz predict input_path --use_msa_server
Boltz currently accepts three input formats:
-
Fasta file, for most use cases
-
A comprehensive YAML schema, for more complex use cases
-
A directory containing files of the above formats, for batched processing
To see all available options: boltz predict --help and for more information on these input formats, see our prediction instructions.
To encourage reproducibility and facilitate comparison with other models, we provide the evaluation scripts and predictions for Boltz-1, Chai-1 and AlphaFold3 on our test benchmark dataset as well as CASP15. These datasets are created to contain biomolecules different from the training data and to benchmark the performance of these models we run them with the same input MSAs and same number of recycling and diffusion steps. More details on these evaluations can be found in our evaluation instructions.
If you're interested in retraining the model, see our training instructions.
We welcome external contributions and are eager to engage with the community. Connect with us on our Slack channel to discuss advancements, share insights, and foster collaboration around Boltz-1.
- Auto-generated MSAs using MMseqs2
- More examples
- Support for custom paired MSA
- Confidence model checkpoint
- Chunking for lower memory usage
- Pocket conditioning support
- Full data processing pipeline
- Colab notebook for inference
- Kernel integration
Our model and code are released under MIT License, and can be freely used for both academic and commercial purposes.
If you use this code or the models in your research, please cite the following paper:
@article{wohlwend2024boltz1,
author = {Wohlwend, Jeremy and Corso, Gabriele and Passaro, Saro and Reveiz, Mateo and Leidal, Ken and Swiderski, Wojtek and Portnoi, Tally and Chinn, Itamar and Silterra, Jacob and Jaakkola, Tommi and Barzilay, Regina},
title = {Boltz-1: Democratizing Biomolecular Interaction Modeling},
year = {2024},
doi = {10.1101/2024.11.19.624167},
journal = {bioRxiv}
}In addition if you use the automatic MSA generation, please cite:
@article{mirdita2022colabfold,
title={ColabFold: making protein folding accessible to all},
author={Mirdita, Milot and Sch{\"u}tze, Konstantin and Moriwaki, Yoshitaka and Heo, Lim and Ovchinnikov, Sergey and Steinegger, Martin},
journal={Nature methods},
year={2022},
}

