Playbook · Tools and pipelines
Boltz2Run: Every run logged, timed, and reproducible
14 Jun 2026 · updated 17 Sep 2026 · 3 min read
run_boltz.zsh
A minimal, auditable wrapper for Boltz-1/2. Every run logged, timed, and reproducible.
| π Website | marcdeller.com | βοΈ Contact | marc@marcdeller.com | π GitHub | bellcheddar/simple-zsh-script-to-run-boltz2 |
A minimal, production-ready shell wrapper for running Boltz-1/Boltz-2 structure predictions from the command line. Handles logging, runtime tracking, and input sanitisation automatically so every run is reproducible and auditable.
Why it matters: running co-folding predictions by hand invites silent failures: overwritten logs, stray macOS dot-files derailing a batch, no record of how long a run took or what flags were used. run_boltz.zsh wraps Boltz in a thin, production-minded shell layer that timestamps every log, tracks wall-clock runtime, sanitises the input directory, and tees output to both screen and file. It is useful for anyone running Boltz at scale or in a regulated setting where reproducibility and an audit trail matter: drop it in, point it at your inputs, and every prediction becomes self-documenting.
Features
- Timestamped log files β every run writes to
boltz_run_YYYYMMDD_HHMMSS.log; nothing is ever silently overwritten - Runtime tracking β total wall-clock time reported at the end of each run
- Input sanitisation β removes macOS/Linux hidden dot-files (
.DS_Store,._*, etc.) from the inputs directory before prediction - MPS fallback β sets
PYTORCH_ENABLE_MPS_FALLBACK=1for Apple Silicon compatibility - Unified stdout + log β all output is teeβd to the terminal and the log file simultaneously via
2>&1 | tee
Requirements
- Boltz installed and on your
$PATH zsh(macOS default; also available on Linux)- A CUDA-capable GPU (the script passes
--accelerator gpu) - Internet access if MSA server lookups are needed (
--use_msa_server)
Directory layout
project/
βββ run_boltz.zsh # this script
βββ inputs/ # place your input YAML / FASTA / CIF files here
βββ output/ # Boltz outputs written here (created automatically)
Usage
chmod +x run_boltz.zsh
./run_boltz.zsh
Thatβs it. The script picks up all inputs from ./inputs/, writes predictions to ./output/, and creates a timestamped log in the current directory.
Configuration
All key parameters are set at the top of the script:
| Variable | Default | Description |
|---|---|---|
INPUT_DIR | ./inputs | Directory containing Boltz input files |
OUTPUT_DIR | ./output | Root output directory |
LOGFILE | boltz_run_<timestamp>.log | Per-run log filename |
Boltz prediction flags can be edited directly in the boltz predict call:
| Flag | Value | Notes |
|---|---|---|
--use_potentials | β | Enables potential energy guidance during diffusion |
--diffusion_samples | 1 | Number of diffusion samples per input; increase for ensemble diversity |
--use_msa_server | β | Queries the ColabFold MSA server; remove for purely local runs |
--num_workers | 8 | DataLoader workers; tune to your CPU core count |
--accelerator | gpu | Use cpu for debugging on machines without a GPU |
Output
Each run produces:
output/
βββ boltz_results_<input_name>/
βββ predictions/
β βββ <model>_model_0.cif # ModelCIF-format predicted structure
βββ confidence_<model>_model_0.json
βββ ...
boltz_run_20250611_143022.log # full stdout/stderr capture
Predicted structures are written as ModelCIF files. These can be loaded directly in PyMOL, UCSF ChimeraX, or processed downstream with tools such as Biotite or a PLIP-based interaction pipeline.
Notes
- The
cleanup_input_dirfunction removes hidden files silently before each run. This prevents spurious Boltz errors on macOS where Finder writes._<filename>resource fork files alongside legitimate inputs. - Log files accumulate in the working directory; archive or delete them periodically if running many predictions.
- To run multiple diffusion samples for ensemble analysis, increase
--diffusion_samples(e.g.5) and downstream results will includemodel_0throughmodel_N.
π€ Author
Marc C. Deller, D.Phil.
Structural biologist & drug discovery scientist