Get Started

Install Cyclic BindCraft.

Linux + NVIDIA GPU, ~30 minutes from clone to first trajectory. If you already have a working stock BindCraft, jump straight to "Updating from stock BindCraft" — the cyclic patch is ~250 lines.

Requirements

What you'll need.

Hardware

GPU: NVIDIA ≥16 GB VRAM minimum, ≥24 GB recommended (A100, A6000, RTX 4090, H100).
CPU: 8 cores min, 16+ recommended (PyRosetta FastRelax is multi-threaded).
RAM: 32 GB min, 64 GB recommended.
Disk: 50 GB free (AF2 params ~5.3 GB + 10 GB PDBs per 200-design run).

Operating system

Linux (Ubuntu 22.04+): primary, recommended.
macOS (Apple Silicon): experimental — install with pip install jax-metal, expect ~5–10× slower.
Windows + WSL2: supported via WSL2 + Ubuntu 22.04 (PyRosetta wheels are Linux-only).
Native Windows: not supported.

Software

CUDA 11.8 or 12.1 (12.1 recommended).
Python 3.10 (do not use 3.11+ — colabdesign not validated there).
JAX/jaxlib >=0.4, <=0.6.0 with the CUDA-matched wheel.
PyRosetta quarterly release — free for academic/non-commercial use, register at els2.comotion.uw.edu.

CPU-only is impractical

AF2 hallucination requires JAX/GPU backprop through the structure module. On a 32-core CPU a single trajectory takes ~6 hours vs. ~3 minutes on an A100. Cyclic BindCraft will refuse to start if check_jax_gpu() fails (the same behavior as stock BindCraft).


Step-by-step

Install Cyclic BindCraft, fresh.

Seven steps from clone to verified install. Total time ~30 minutes on a fast connection.

01

Clone BindCraft & apply the cyclic patch

clone.sh
mkdir -p ~/cyclic-bindcraft && cd ~/cyclic-bindcraft
git clone https://github.com/martinpacesa/BindCraft.git repo
cd repo
git checkout v1.5.3  # pin to the version Cyclic BindCraft is built against

# Apply the cyclic patch (shipped alongside these docs)
git apply /path/to/cyclic.patch
# or, equivalently, copy the modified-code/ tree over the repo:
# cp -r /path/to/modified-code/functions/cyclic_utils.py functions/
# cp -r /path/to/modified-code/functions/colabdesign_utils.py functions/
# cp -r /path/to/modified-code/functions/pyrosetta_utils.py  functions/
# cp -r /path/to/modified-code/functions/biopython_utils.py  functions/
# cp -r /path/to/modified-code/functions/generic_utils.py    functions/
# cp -r /path/to/modified-code/settings_advanced/peptide_cyclic_3stage.json   settings_advanced/
# cp -r /path/to/modified-code/settings_filters/peptide_cyclic_filters.json  settings_filters/
02

Create the conda environment

BindCraft ships install_bindcraft.sh which creates the env, installs conda packages, ColabDesign, and PyRosetta, then downloads AF2 params. Run it with the CUDA version that matches your driver:

install.sh
cd ~/cyclic-bindcraft/repo
bash install_bindcraft.sh --pkg_manager mamba --cuda 12.1

The script takes ~30 minutes on a fast connection. It will:

  1. Create conda env BindCraft python=3.10
  2. Install all conda packages (JAX/jaxlib CUDA build, BioPython, scipy, flax<0.10, dm-haiku, optax, chex, etc.)
  3. pip install git+https://github.com/sokrypton/ColabDesign.git --no-deps
  4. pip install pyrosetta --find-links https://west.rosettacommons.org/pyrosetta/quarterly/release.cxx11thread.serialization (requires that your PyRosetta license is already registered)
  5. Download + extract alphafold_params_2022-12-06.tar into ./params/
  6. chmod +x functions/dssp functions/DAlphaBall.gcc
03

Activate the environment

activate.sh
conda activate bindcraft   # or `mamba activate bindcraft`
04

Download AF2 weights

install_bindcraft.sh already does this. If you skipped that step or want a shared location:

af2_weights.sh
mkdir -p ~/af2_params
wget -O ~/af2_params/alphafold_params_2022-12-06.tar \
  https://storage.googleapis.com/alphafold/alphafold_params_2022-12-06.tar
tar -xvf ~/af2_params/alphafold_params_2022-12-06.tar -C ~/af2_params/

Then set af_params_dir in your advanced-settings JSON to ~/af2_params/.

05

Verify ProteinMPNN weights

ProteinMPNN weights (v_48_020 and the soluble variant) are bundled with ColabDesign — no separate download needed. Verify:

verify_mpnn.sh
python -c "from colabdesign.mpnn import mk_mpnn_model; m = mk_mpnn_model(weights='soluble'); print('MPNN OK')"
06

Verify the cyclic patch

verify.sh
python -c "from functions.cyclic_utils import cyclize_relpos, cyclic_bonded_edges, build_cyclic_reses_mask; print('OK')"
python -c "import jax; print('JAX', jax.__version__, 'devices', jax.devices())"
python -c "import pyrosetta; pyrosetta.init('-ignore_unrecognized_res -mute all'); print('PyRosetta OK')"

You should see OK, a JAX version 0.4.x0.6.x, a list that includes a CUDADevice (not just CpuDevice), and PyRosetta OK.

07

Run a 1-trajectory smoke test

smoke_test.sh
python bindcraft.py \
  --cyclic \
  --settings  settings_target/PDL1.json \
  --filters   settings_filters/peptide_cyclic_filters.json \
  --advanced  settings_advanced/peptide_cyclic_3stage.json

The first trajectory should appear in Trajectory/ within ~5 minutes on an A100.


Optional

Cyclic-aware second-pass validators.

Cyclic BindCraft's primary structure predictor is AF2 with the cyclic relpos applied — this is sufficient for ranking but is still an approximation of a true cyclic-prediction network. For maximum fidelity (especially for designs you intend to synthesize), install one of:

AfCycDesign

Modified AlphaFold2 with the same cyclic relpos we use, but trained for prediction rather than hallucination. Install:

install_afcyc.sh
pip install git+https://github.com/bhardwajlab/AfCycDesign.git

Re-predict your top 5–10 designs and confirm iPAE < 0.13 and RMSD < 1.5 Å vs. the BindCraft output.

RF2-cyclic

RoseTTAFold2 with the cyclic offset. The rfpeptides branch of RosettaCommons/RFdiffusion includes a downstream RF2-cyclic validator. Use it as an orthogonal predictor: if both AfCycDesign and RF2-cyclic agree your design is well-folded, you have high confidence.

Both are optional. They add ~3 GB of weights each and require a second GPU pass per design. See Tutorial step 8.


Troubleshooting

Common errors & fixes.

#ErrorCauseFix
1RuntimeError: jaxlib requires CUDA ... but found CUDA ...JAX wheel CUDA version mismatches driverReinstall: pip install --force-reinstall jaxlib==0.4.30+cuda11.8 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html (match to your driver)
2check_jax_gpu() exited: No GPU devices foundJAX configured for CPU onlyexport XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda and confirm nvidia-smi shows the GPU
3pyrosetta.init() raises LicenseErrorPyRosetta can't reach the license serverCheck your institution's PyRosetta registration; if behind a proxy, export PYROSETTA_LICENSE_SERVER=...
4ModuleNotFoundError: No module named 'colabdesign'ColabDesign not installed in the active envpip install git+https://github.com/sokrypton/ColabDesign.git --no-deps inside the bindcraft env
5FileNotFoundError: params_model_5_ptm.npzAF2 weights not extractedRe-run the AF2 download step (step 4 above); set af_params_dir in your settings JSON
6OSError: Unable to open file .../functions/dsspDSSP binary not executablechmod +x functions/dssp functions/DAlphaBall.gcc
7CUDA out of memory during hallucinationTarget too large for VRAMLower binder_len range, switch to use_multimer_design: false, or use a 40 GB+ GPU
8Chainbreak not closed after FastRelax (cyclic mode)AF2 hallucination produced a geometry that FastRelax cannot closeIncrease weights_cyclic_bond_loss to 1.0–2.0 in the cyclic preset; if persists, lower cyclic_NC_distance filter to 1.5 Å to reject early
9cyclic_NC_distance > 5 Å on all accepted designsCyclic bond loss weight too lowIn peptide_cyclic_3stage.json raise weights_cyclic_bond_loss from default 0.5 to 1.5; if still poor, raise weights_termini_loss to 1.0
10All trajectories terminate as LowConfidenceAF2 hallucination too aggressiveSwitch from peptide_cyclic_3stage.json to a softer 4-stage variant; lower weights_pae_intra to 0.2; ensure predict_initial_guess: true

For runtime questions, also check the stock BindCraft issues page. For cyclization-specific errors (cyclic_NC_distance, cyclic_omega, chainbreak-closure failures), see the FAQ.


Patch only

Updating from stock BindCraft.

If you already have a working stock BindCraft install, you only need to:

  1. Apply the cyclic patch (git apply cyclic.patch) — this adds functions/cyclic_utils.py, modifies 4 functions in functions/*.py, adds the --cyclic CLI flag, and ships peptide_cyclic_3stage.json + peptide_cyclic_filters.json.
  2. Re-run python -c "from functions.cyclic_utils import cyclize_relpos; print('OK')" to confirm.
  3. Your existing default_filters.json and default_4stage_multimer.json continue to work for linear designs — nothing is removed, only added.

The patch is approximately 250 lines of Python on top of stock BindCraft v1.5.3.

update_from_stock.sh
cd ~/cyclic-bindcraft/repo
git fetch && git checkout v1.5.3   # pin to the version the patch is built against
git apply /path/to/cyclic.patch
python -c "from functions.cyclic_utils import cyclize_relpos; print('OK')"