tt-bio 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tt_bio-0.2.0/LICENSE +22 -0
- tt_bio-0.2.0/NOTICE +39 -0
- tt_bio-0.2.0/PKG-INFO +41 -0
- tt_bio-0.2.0/README.md +558 -0
- tt_bio-0.2.0/pyproject.toml +67 -0
- tt_bio-0.2.0/setup.cfg +4 -0
- tt_bio-0.2.0/tests/test_boltzgen.py +52 -0
- tt_bio-0.2.0/tests/test_boltzgen_regression.py +198 -0
- tt_bio-0.2.0/tests/test_constraints.py +134 -0
- tt_bio-0.2.0/tests/test_design_info_requires_design_residue.py +54 -0
- tt_bio-0.2.0/tests/test_esmc.py +276 -0
- tt_bio-0.2.0/tests/test_esmfold2.py +288 -0
- tt_bio-0.2.0/tests/test_input_validation.py +73 -0
- tt_bio-0.2.0/tests/test_msa_cache_key.py +69 -0
- tt_bio-0.2.0/tests/test_protenix.py +479 -0
- tt_bio-0.2.0/tests/test_protenix_atomfeat.py +47 -0
- tt_bio-0.2.0/tests/test_protenix_atomtx.py +31 -0
- tt_bio-0.2.0/tests/test_protenix_confidence.py +54 -0
- tt_bio-0.2.0/tests/test_protenix_data.py +45 -0
- tt_bio-0.2.0/tests/test_protenix_diffusion.py +90 -0
- tt_bio-0.2.0/tests/test_protenix_diffusion_cond.py +65 -0
- tt_bio-0.2.0/tests/test_protenix_fold.py +28 -0
- tt_bio-0.2.0/tests/test_protenix_ife.py +48 -0
- tt_bio-0.2.0/tests/test_protenix_largeN.py +35 -0
- tt_bio-0.2.0/tests/test_protenix_ligand.py +55 -0
- tt_bio-0.2.0/tests/test_protenix_msa.py +43 -0
- tt_bio-0.2.0/tests/test_protenix_na.py +47 -0
- tt_bio-0.2.0/tests/test_protenix_seqfold.py +24 -0
- tt_bio-0.2.0/tests/test_protenix_traj.py +30 -0
- tt_bio-0.2.0/tests/test_protenix_trunk_class.py +23 -0
- tt_bio-0.2.0/tests/test_protenix_trunk_msa.py +52 -0
- tt_bio-0.2.0/tests/test_protenix_trunk_pairformer.py +45 -0
- tt_bio-0.2.0/tests/test_protenix_trunk_template.py +49 -0
- tt_bio-0.2.0/tests/test_protenix_trunkin.py +28 -0
- tt_bio-0.2.0/tests/test_runtime.py +59 -0
- tt_bio-0.2.0/tests/test_structure.py +144 -0
- tt_bio-0.2.0/tests/test_tenstorrent.py +123 -0
- tt_bio-0.2.0/tt_bio/__init__.py +6 -0
- tt_bio-0.2.0/tt_bio/_vendor/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/LICENSE +9 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/esmfold2/__init__.py +44 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/esmfold2/conformers.py +294 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/esmfold2/constants.py +565 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/esmfold2/output.py +227 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/esmfold2/paired_msa.py +248 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/esmfold2/prepare_input.py +1484 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/esmfold2/processor.py +358 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/models/esmfold2/types.py +36 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/constants/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/constants/esm3.py +140 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/misc.py +507 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/msa/__init__.py +6 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/msa/filter_sequences.py +85 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/msa/msa.py +509 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/parsing.py +115 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/residue_constants.py +1226 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/sequential_dataclass.py +160 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/affine3d.py +563 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/aligner.py +104 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/atom_indexer.py +18 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/input_builder.py +257 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/metrics.py +376 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/mmcif_parsing.py +472 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/molecular_complex.py +1228 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/normalize_coordinates.py +82 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/protein_chain.py +1378 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/protein_complex.py +1243 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/structure/protein_structure.py +309 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/system.py +48 -0
- tt_bio-0.2.0/tt_bio/_vendor/esm/utils/types.py +36 -0
- tt_bio-0.2.0/tt_bio/_vendor/esmfold2_hf/LICENSE +203 -0
- tt_bio-0.2.0/tt_bio/_vendor/esmfold2_hf/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/_vendor/esmfold2_hf/configuration_esmfold2.py +302 -0
- tt_bio-0.2.0/tt_bio/_vendor/esmfold2_hf/modeling_esmfold2.py +1167 -0
- tt_bio-0.2.0/tt_bio/_vendor/esmfold2_hf/modeling_esmfold2_common.py +2762 -0
- tt_bio-0.2.0/tt_bio/boltz2.py +5646 -0
- tt_bio-0.2.0/tt_bio/boltzgen/__init__.py +28 -0
- tt_bio-0.2.0/tt_bio/boltzgen/_config.py +149 -0
- tt_bio-0.2.0/tt_bio/boltzgen/adapter.py +207 -0
- tt_bio-0.2.0/tt_bio/boltzgen/cli/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/cli/boltzgen.py +2192 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/cropper.py +409 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/data.py +2122 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/featurizer.py +2198 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/parse/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/parse/a3m.py +136 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/parse/mmcif.py +1469 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/parse/pdb_parser.py +144 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/parse/schema.py +2500 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/rmsd_computation.py +118 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/selector.py +724 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/template.py +37 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/tokenizer.py +437 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/write_mmcif.py +471 -0
- tt_bio-0.2.0/tt_bio/boltzgen/data/write_pdb.py +137 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/geometry.py +380 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/layers/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/layers/attention.py +134 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/layers/confidence_utils.py +443 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/layers/dropout.py +95 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/layers/initialize.py +84 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/layers/relative.py +58 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/layers/transition.py +73 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/models/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/models/boltz.py +890 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/affinity.py +222 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/confidence.py +632 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/diffusion.py +418 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/diffusion_conditioning.py +117 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/encoders.py +741 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/inverse_fold.py +751 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/masker.py +253 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/scatter_utils.py +140 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/transformers.py +263 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/trunk.py +567 -0
- tt_bio-0.2.0/tt_bio/boltzgen/model/modules/utils.py +228 -0
- tt_bio-0.2.0/tt_bio/boltzgen/progress.py +342 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/analyze/analyze.py +1489 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/analyze/analyze_utils.py +1260 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/filter/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/filter/filter.py +1413 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/filter/seqplot_utils.py +507 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/predict/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/predict/data_from_generated.py +882 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/predict/data_from_yaml.py +449 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/predict/data_ligands.py +410 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/predict/data_protein_binder.py +588 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/predict/loading_utils.py +45 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/predict/predict.py +117 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/predict/writer.py +526 -0
- tt_bio-0.2.0/tt_bio/boltzgen/task/task.py +19 -0
- tt_bio-0.2.0/tt_bio/boltzgen/utils/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/boltzgen/utils/quiet.py +18 -0
- tt_bio-0.2.0/tt_bio/data/__init__.py +0 -0
- tt_bio-0.2.0/tt_bio/data/const.py +3593 -0
- tt_bio-0.2.0/tt_bio/data/featurizer.py +2353 -0
- tt_bio-0.2.0/tt_bio/data/mol.py +1145 -0
- tt_bio-0.2.0/tt_bio/data/msa.py +295 -0
- tt_bio-0.2.0/tt_bio/data/pad.py +84 -0
- tt_bio-0.2.0/tt_bio/data/parse.py +3647 -0
- tt_bio-0.2.0/tt_bio/data/tokenize.py +452 -0
- tt_bio-0.2.0/tt_bio/data/types.py +784 -0
- tt_bio-0.2.0/tt_bio/data/write.py +474 -0
- tt_bio-0.2.0/tt_bio/distributed.py +649 -0
- tt_bio-0.2.0/tt_bio/energy.py +337 -0
- tt_bio-0.2.0/tt_bio/esmc.py +571 -0
- tt_bio-0.2.0/tt_bio/esmfold2.py +1316 -0
- tt_bio-0.2.0/tt_bio/esmfold2_runtime.py +488 -0
- tt_bio-0.2.0/tt_bio/install_system_deps.py +124 -0
- tt_bio-0.2.0/tt_bio/main.py +2207 -0
- tt_bio-0.2.0/tt_bio/msa_server.py +173 -0
- tt_bio-0.2.0/tt_bio/progress.py +389 -0
- tt_bio-0.2.0/tt_bio/protenix.py +1261 -0
- tt_bio-0.2.0/tt_bio/protenix_data.py +531 -0
- tt_bio-0.2.0/tt_bio/protenix_weights.py +137 -0
- tt_bio-0.2.0/tt_bio/reference.py +1542 -0
- tt_bio-0.2.0/tt_bio/runtime.py +113 -0
- tt_bio-0.2.0/tt_bio/tenstorrent.py +3115 -0
- tt_bio-0.2.0/tt_bio/worker.py +835 -0
- tt_bio-0.2.0/tt_bio.egg-info/PKG-INFO +41 -0
- tt_bio-0.2.0/tt_bio.egg-info/SOURCES.txt +171 -0
- tt_bio-0.2.0/tt_bio.egg-info/dependency_links.txt +1 -0
- tt_bio-0.2.0/tt_bio.egg-info/entry_points.txt +2 -0
- tt_bio-0.2.0/tt_bio.egg-info/requires.txt +34 -0
- tt_bio-0.2.0/tt_bio.egg-info/top_level.txt +1 -0
tt_bio-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Jeremy Wohlwend, Gabriele Corso, Saro Passaro
|
|
4
|
+
Copyright (c) 2024 Moritz Thüning
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
tt_bio-0.2.0/NOTICE
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
tt-bio bundles third-party code under tt_bio/_vendor/ and tt_bio/boltzgen/.
|
|
2
|
+
Each component keeps its upstream license alongside it. The core Boltz-2 / Boltz-1
|
|
3
|
+
code that tt-bio is built on (parsing, tokenization, featurization, the model) is
|
|
4
|
+
MIT-licensed and credited in the top-level LICENSE.
|
|
5
|
+
|
|
6
|
+
1. tt_bio/_vendor/esm/ — ESMFold2 host-side reference: sequence/atom
|
|
7
|
+
featurization, MSA handling, and mmCIF assembly (no neural compute; that runs
|
|
8
|
+
on Tenstorrent via tt_bio.esmc / tt_bio.esmfold2).
|
|
9
|
+
Source: github.com/Biohub/esm @ b6b0e88
|
|
10
|
+
License: MIT — Copyright 2026 Chan Zuckerberg Biohub, Inc.
|
|
11
|
+
(tt_bio/_vendor/esm/LICENSE)
|
|
12
|
+
Modifications: only the files on the ESMFold2 fold path are included; absolute
|
|
13
|
+
`esm.` imports rewritten to `tt_bio._vendor.esm.`.
|
|
14
|
+
|
|
15
|
+
2. tt_bio/_vendor/esmfold2_hf/ — the ESMFold2 model definition for HuggingFace
|
|
16
|
+
`transformers` (runs on top of the stock `transformers` wheel).
|
|
17
|
+
Source: Biohub `transformers` fork (based on transformers 4.57.6),
|
|
18
|
+
src/transformers/models/esmfold2
|
|
19
|
+
License: Apache-2.0 — Copyright The HuggingFace team and Chan Zuckerberg
|
|
20
|
+
Biohub, Inc. (tt_bio/_vendor/esmfold2_hf/LICENSE)
|
|
21
|
+
Modifications: the three inference files only; transformers-core relative
|
|
22
|
+
imports rewritten to absolute `transformers.`.
|
|
23
|
+
|
|
24
|
+
3. tt_bio/boltzgen/ — BoltzGen binder-design source, stripped to Tenstorrent-only
|
|
25
|
+
inference (training code, PyTorch Lightning, and Hydra removed); the heavy
|
|
26
|
+
compute runs on Tenstorrent via tt_bio.boltzgen.adapter.
|
|
27
|
+
Source: github.com/HannesStark/boltzgen
|
|
28
|
+
License: MIT — Copyright (c) 2025 Hannes Stärk (tt_bio/boltzgen/LICENSE).
|
|
29
|
+
Some modules carry their own upstream headers (lucidrains/
|
|
30
|
+
alphafold3-pytorch, MIT; PyTorch3D, BSD) — kept in-file.
|
|
31
|
+
Modifications: inference-only subset; Lightning/Hydra dependencies eliminated.
|
|
32
|
+
|
|
33
|
+
4. tt_bio/protenix.py, protenix_data.py, protenix_weights.py — Protenix-v2
|
|
34
|
+
(AlphaFold3-family) support. This is an INDEPENDENT ttnn reimplementation for
|
|
35
|
+
Tenstorrent; no upstream Protenix source is vendored. The architecture and the
|
|
36
|
+
model weights (downloaded on first use from the Hugging Face mirror, not
|
|
37
|
+
redistributed in this repo) are from ByteDance's Protenix.
|
|
38
|
+
Source: github.com/bytedance/Protenix
|
|
39
|
+
License: Apache-2.0 — Copyright ByteDance (code and model parameters).
|
tt_bio-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tt-bio
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Boltz-2 implementation for inference on Tenstorrent Blackhole and Wormhole
|
|
5
|
+
Requires-Python: !=3.11.*,<3.13,>=3.10
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Requires-Dist: torch
|
|
9
|
+
Requires-Dist: numpy
|
|
10
|
+
Requires-Dist: rdkit
|
|
11
|
+
Requires-Dist: requests
|
|
12
|
+
Requires-Dist: pandas
|
|
13
|
+
Requires-Dist: einops
|
|
14
|
+
Requires-Dist: mashumaro
|
|
15
|
+
Requires-Dist: modelcif
|
|
16
|
+
Requires-Dist: click
|
|
17
|
+
Requires-Dist: pyyaml
|
|
18
|
+
Requires-Dist: omegaconf
|
|
19
|
+
Requires-Dist: biopython
|
|
20
|
+
Requires-Dist: biotite
|
|
21
|
+
Requires-Dist: matplotlib
|
|
22
|
+
Requires-Dist: scipy
|
|
23
|
+
Requires-Dist: numba
|
|
24
|
+
Requires-Dist: gemmi
|
|
25
|
+
Requires-Dist: scikit-learn
|
|
26
|
+
Requires-Dist: chembl_structure_pipeline
|
|
27
|
+
Requires-Dist: hydride
|
|
28
|
+
Requires-Dist: pydssp
|
|
29
|
+
Requires-Dist: tqdm
|
|
30
|
+
Requires-Dist: rich
|
|
31
|
+
Requires-Dist: huggingface_hub<1.0
|
|
32
|
+
Requires-Dist: safetensors
|
|
33
|
+
Requires-Dist: transformers==4.57.6
|
|
34
|
+
Requires-Dist: zstd
|
|
35
|
+
Requires-Dist: msgpack-numpy
|
|
36
|
+
Requires-Dist: brotli
|
|
37
|
+
Requires-Dist: cloudpathlib
|
|
38
|
+
Requires-Dist: ttnn==0.68.0
|
|
39
|
+
Provides-Extra: test
|
|
40
|
+
Requires-Dist: pytest; extra == "test"
|
|
41
|
+
Dynamic: license-file
|
tt_bio-0.2.0/README.md
ADDED
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
```
|
|
2
|
+
████████╗████████╗ ██████╗ ██╗ ██████╗
|
|
3
|
+
╚══██╔══╝╚══██╔══╝ ██╔══██╗ ██║ ██╔═══██╗
|
|
4
|
+
██║ ██║ █████╗ ██████╔╝ ██║ ██║ ██║
|
|
5
|
+
██║ ██║ ╚════╝ ██╔══██╗ ██║ ██║ ██║
|
|
6
|
+
██║ ██║ ██████╔╝ ██║ ╚██████╔╝
|
|
7
|
+
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
> [!IMPORTANT]
|
|
11
|
+
> **TT-Boltz is now TT-Bio**
|
|
12
|
+
|
|
13
|
+
TT-Bio runs [Boltz-2](https://github.com/jwohlwend/boltz), [ESMFold2](https://github.com/Biohub/esm), and [Protenix-v2](https://github.com/bytedance/Protenix) structure prediction and [BoltzGen](#boltzgen) binder design on Tenstorrent Blackhole and Wormhole, supporting single-card and multi-card configurations (e.g. QuietBox with 4 cards or Galaxy server with 32 cards). Multiple machines can also be combined into a single prediction run.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
Create a Python virtual environment with Python 3.10 or 3.12, install the latest **release**, then install the matching Tenstorrent system dependencies.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python3.10 -m venv env
|
|
21
|
+
source env/bin/activate
|
|
22
|
+
pip install "tt-bio @ git+https://github.com/moritztng/tt-bio.git@v0.2.0"
|
|
23
|
+
tt-bio install-deps
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Use a tagged release (`@v0.2.0` above — see [Releases](https://github.com/moritztng/tt-bio/releases) for the latest), not `main`: `main` is the development branch and may contain untested work.
|
|
27
|
+
|
|
28
|
+
`tt-bio install-deps` installs the SFPI compiler version that matches the installed `ttnn` wheel and clears stale TT-Metal kernel cache entries. It may ask for your sudo password.
|
|
29
|
+
|
|
30
|
+
### Nightly / from source
|
|
31
|
+
Track the latest development commit, or work from an editable clone:
|
|
32
|
+
```bash
|
|
33
|
+
pip install "tt-bio @ git+https://github.com/moritztng/tt-bio.git@main" # nightly (may be untested)
|
|
34
|
+
# or
|
|
35
|
+
git clone https://github.com/moritztng/tt-bio.git
|
|
36
|
+
cd tt-bio
|
|
37
|
+
pip install -e .
|
|
38
|
+
tt-bio install-deps
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Optional: Build TT-Metal / TT-NN from Source
|
|
42
|
+
If you need to build from source, follow the [Tenstorrent Installation Guide](https://github.com/tenstorrent/tt-metal/blob/main/INSTALLING.md).
|
|
43
|
+
|
|
44
|
+
### Verify Installation
|
|
45
|
+
```bash
|
|
46
|
+
tt-bio --help
|
|
47
|
+
tt-bio predict --help
|
|
48
|
+
tt-bio msa --help
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Basic Usage
|
|
52
|
+
|
|
53
|
+
### Structure Prediction
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
tt-bio predict examples/prot.yaml --model boltz2 --use_msa_server --override
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Every command names its model with `--model`:
|
|
60
|
+
|
|
61
|
+
- **`boltz2`** — folds complexes of proteins, DNA, RNA, and ligands and predicts binding affinity. Needs an MSA for each protein chain.
|
|
62
|
+
- **`esmfold2`** / **`esmfold2-fast`** — fold a single protein sequence on-device, no MSA required (`esmfold2-fast` is the lighter, faster checkpoint):
|
|
63
|
+
- **`protenix-v2`** — folds complexes of proteins, RNA, DNA, and ligands (an AlphaFold3-family model, the [Protenix](https://github.com/bytedance/Protenix) reproduction); proteins take an optional MSA (recommended for best accuracy) and it also emits a PAE/PDE matrix with `--write_pae`:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
tt-bio predict examples/prot.fasta --model esmfold2-fast --fast
|
|
67
|
+
tt-bio predict examples/prot.yaml --model protenix-v2 --use_msa_server # protein MSA optional; NA/ligand chains are single-sequence
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
ESMFold2 is protein-only, so the affinity, potential, template, and energy options below apply to **Boltz-2 only** — as do pocket/contact binding constraints. Covalent `bond` constraints additionally work with Protenix-v2 (it honours them through its token-bond graph). Protenix-v2 folds multimodal complexes (protein / RNA / DNA / ligand chains in one input, FASTA `>id|protein|...`, `>id|rna`, `>id|dna`, `>id|ccd`, `>id|smiles`, or the YAML `protein/rna/dna/ligand` entries) and writes per-atom pLDDT into B-factors; only proteins use an MSA (`--use_msa_server`, a precomputed a3m, or `--msa_db_path`), nucleic-acid and ligand chains are single-sequence. The shared options — `--fast`, `--recycling_steps`, `--sampling_steps`, `--diffusion_samples`, `--output_format`, the MSA flags, and the multi-card / multi-machine flags — work for every model. Each model downloads its weights automatically on first use.
|
|
71
|
+
|
|
72
|
+
Boltz-2 needs an MSA (multiple sequence alignment) for each protein chain.
|
|
73
|
+
`--use_msa_server` sends sequences to the ColabFold MSA API and downloads the resulting alignments (online MSA).
|
|
74
|
+
|
|
75
|
+
`--fast` makes some operations use block-fp8, a lower-precision numeric format that runs faster. Accuracy is typically very close.
|
|
76
|
+
|
|
77
|
+
`predict` accepts either a single YAML/FASTA file or a directory containing many input files.
|
|
78
|
+
|
|
79
|
+
A live display shows the progress of each protein. On a multi-card machine such
|
|
80
|
+
as a QuietBox or Galaxy server, every card is used in parallel and labelled in
|
|
81
|
+
the display (`quietbox:tt0`, `quietbox:tt1`, ...). Models load once per card
|
|
82
|
+
and stay resident, so jobs flow through without per-protein reloads:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
tt-bio predict proteins/ --model boltz2 --out_dir results --use_msa_server --fast
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If you have additional machines with Tenstorrent cards, you can add them to a
|
|
89
|
+
single run — see [Optional: Multi-Machine Prediction](#optional-multi-machine-prediction).
|
|
90
|
+
|
|
91
|
+
### Offline MSA (Optional)
|
|
92
|
+
|
|
93
|
+
Use this if you have enough disk and RAM and want local MSA.
|
|
94
|
+
This avoids external MSA server calls and is faster for repeated runs.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
tt-bio msa
|
|
98
|
+
tt-bio predict examples/prot.yaml --model boltz2 --override
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`tt-bio msa` downloads UniRef30 to `~/.boltz/msa_db` (~100GB download, ~500GB on disk after indexing). `predict` auto-detects this path.
|
|
102
|
+
|
|
103
|
+
To add EnvDB and use it in prediction:
|
|
104
|
+
EnvDB can improve MSA coverage when UniRef30 hits are weak, at higher disk/RAM cost.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
tt-bio msa --db all
|
|
108
|
+
tt-bio predict examples/prot.yaml --model boltz2 --use_envdb --override
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Key Options:**
|
|
112
|
+
- `--override`: Re-run from scratch, ignoring cached files
|
|
113
|
+
- `--use_msa_server`: Generate MSA via ColabFold API
|
|
114
|
+
- `--msa_db_path`: Use a local database at a custom path (e.g. `--msa_db_path /data/colabfold_db`)
|
|
115
|
+
- `--use_envdb`: Include EnvDB in offline MSA (`tt-bio msa --db all`)
|
|
116
|
+
- `--accelerator=tenstorrent`: Use Tenstorrent hardware (default, or use `cpu`/`gpu`)
|
|
117
|
+
- `--fast`: Makes some operations use block-fp8, a lower-precision numeric format that runs faster; accuracy is typically very close
|
|
118
|
+
- `--debug`: Show all raw output from the hardware and libraries instead of the progress display
|
|
119
|
+
- `--debug --log`: Same as `--debug`, but also print what each device is currently working on
|
|
120
|
+
|
|
121
|
+
### Shared MSA Server (Optional)
|
|
122
|
+
|
|
123
|
+
Host the database on one machine and let others fetch MSAs from it over HTTP, so each prediction machine need not keep its own ~500GB copy.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# On the machine with the database:
|
|
127
|
+
tt-bio msa-server --listen 0.0.0.0:8765
|
|
128
|
+
|
|
129
|
+
# On any other machine (no local database needed):
|
|
130
|
+
tt-bio predict examples/prot.yaml --model protenix-v2 --msa_endpoint http://HOST:8765
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The server runs the same offline `colabfold_search` and serves unpaired `{hash}.a3m`, with a shared cache and a search-concurrency cap (`--max_concurrent`). Add `--token` to require `Authorization: Bearer <token>`. `--msa_endpoint` applies to `--model esmfold2`/`protenix-v2`.
|
|
134
|
+
|
|
135
|
+
### Binding Affinity Prediction (Boltz-2)
|
|
136
|
+
|
|
137
|
+
Predict binding affinity for protein-ligand complexes:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
tt-bio predict examples/affinity.yaml --model boltz2 --use_msa_server --override --affinity_mw_correction
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The `--affinity_mw_correction` flag applies molecular weight correction for more accurate predictions.
|
|
144
|
+
|
|
145
|
+
### Input Format
|
|
146
|
+
|
|
147
|
+
ESMFold2 takes a plain protein FASTA or a YAML with one or more `protein` chains. The richer inputs below — ligands, affinity, DNA/RNA, constraints, and templates — are Boltz-2 features.
|
|
148
|
+
|
|
149
|
+
Create a YAML file describing your complex:
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
version: 1
|
|
153
|
+
sequences:
|
|
154
|
+
- protein:
|
|
155
|
+
id: A
|
|
156
|
+
sequence: MVTPEGNVSLVDESLLVGVTDEDRAVRSAHQFYERLIGLWAPAVMEAAHELGVFAALAEAPADSGELARRLDCDARAMRVLLDALYAYDVIDRIHDTNGFRYLLSAEARECLLPGTLFSLVGKFMHDINVAWPAWRNLAEVVRHGARDTSGAESPNGIAQEDYESLVGGINFWAPPIVTTLSRKLRASGRSGDATASVLDVGCGTGLYSQLLLREFPRWTATGLDVERIATLANAQALRLGVEERFATRAGDFWRGGWGTGYDLVLFANIFHLQTPASAVRLMRHAAACLAPDGLVAVVDQIVDADREPKTPQDRFALLFAASMTNTGGGDAYTFQEYEEWFTAAGLQRIETLDTPMHRILLARRATEPSAVPEGQASENLYFQ
|
|
157
|
+
- ligand:
|
|
158
|
+
id: B
|
|
159
|
+
smiles: 'N[C@@H](Cc1ccc(O)cc1)C(=O)O'
|
|
160
|
+
properties:
|
|
161
|
+
- affinity:
|
|
162
|
+
binder: B
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Entity Types:**
|
|
166
|
+
- **Polymers**: `protein`, `dna`, `rna` — provide `sequence`
|
|
167
|
+
- **Ligands**: `ligand` — provide `smiles` or `ccd` code
|
|
168
|
+
|
|
169
|
+
**Multiple Identical Chains:**
|
|
170
|
+
```yaml
|
|
171
|
+
- protein:
|
|
172
|
+
id: [A, B] # Two identical chains
|
|
173
|
+
sequence: ...
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Understanding Results
|
|
177
|
+
|
|
178
|
+
### Output Structure
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
boltz_results_prot/
|
|
182
|
+
├── structures/
|
|
183
|
+
│ ├── prot.cif # Best-ranked predicted structure
|
|
184
|
+
│ └── prot_model_1.cif # Additional samples (if diffusion_samples > 1)
|
|
185
|
+
├── results.json # One entry per target with confidence/affinity metrics
|
|
186
|
+
├── power_profile.csv # (optional, --report-energy)
|
|
187
|
+
├── power_profile.png # (optional, --report-energy)
|
|
188
|
+
├── prot_pae.npz # (optional, --write_pae)
|
|
189
|
+
├── prot_pde.npz # (optional, --write_pde)
|
|
190
|
+
└── prot_embeddings.npz # (optional, --write_embeddings)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
MSA results are cached in `<out_dir>/msa/` (default `./msa/`), keyed by sequence hash. The same protein sequence is never searched twice, even across different input files or runs. The MSA search uses all available CPU threads and keeps the database index memory-mapped for maximum speed.
|
|
194
|
+
|
|
195
|
+
### Confidence Scores
|
|
196
|
+
|
|
197
|
+
Each target entry in `results.json` contains confidence metrics. The fields below are Boltz-2's; Protenix-v2 reports the same `confidence_score` / `ptm` / `iptm` / `plddt` (and `all_runs` when `--diffusion_samples` > 1, ranked best-first), while an ESMFold2 entry instead carries `plddt` (mean, 0-1), `ptm` when available, and `n_residues` / `n_chains`.
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"id": "prot",
|
|
202
|
+
"status": "ok",
|
|
203
|
+
"confidence_score": 0.84,
|
|
204
|
+
"ptm": 0.84,
|
|
205
|
+
"iptm": 0.82,
|
|
206
|
+
"complex_plddt": 0.84,
|
|
207
|
+
"chains_ptm": {
|
|
208
|
+
"0": 0.85,
|
|
209
|
+
"1": 0.83
|
|
210
|
+
},
|
|
211
|
+
"pair_chains_iptm": {
|
|
212
|
+
"0": {"0": 0.85, "1": 0.72},
|
|
213
|
+
"1": {"0": 0.82, "1": 0.83}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
- `confidence_score`: Overall confidence (0-1, higher is better), calculated as 0.8 × `complex_plddt` + 0.2 × `iptm`. Models are ranked by this score
|
|
219
|
+
- `ptm`: Predicted TM-score for complex (0-1)
|
|
220
|
+
- `iptm`: Interface TM-score (0-1)
|
|
221
|
+
- `complex_plddt`: Average per-residue confidence (0-1)
|
|
222
|
+
- `chains_ptm`: Per-chain TM-scores (0-1)
|
|
223
|
+
- `pair_chains_iptm`: Per-chain-pair interface TM-scores (0-1)
|
|
224
|
+
|
|
225
|
+
### Affinity Predictions
|
|
226
|
+
|
|
227
|
+
For affinity targets, the same `results.json` entry also contains:
|
|
228
|
+
|
|
229
|
+
```json
|
|
230
|
+
{
|
|
231
|
+
"affinity_pred_value": 2.47,
|
|
232
|
+
"affinity_probability_binary": 0.41,
|
|
233
|
+
"affinity_pred_value1": 2.55,
|
|
234
|
+
"affinity_pred_value2": 2.19,
|
|
235
|
+
"affinity_probability_binary1": 0.50,
|
|
236
|
+
"affinity_probability_binary2": 0.42
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
- `affinity_probability_binary`: Probability of binding (0-1). Use for hit discovery (higher = more likely to bind)
|
|
241
|
+
- `affinity_pred_value`: Predicted binding affinity as log10(IC50) in μM. Use for ligand optimization (lower = stronger binding). Only compare between known active molecules
|
|
242
|
+
- `affinity_pred_value1`, `affinity_pred_value2`: Individual model predictions for binding affinity
|
|
243
|
+
- `affinity_probability_binary1`, `affinity_probability_binary2`: Individual model predictions for binding probability
|
|
244
|
+
|
|
245
|
+
## Advanced Usage
|
|
246
|
+
|
|
247
|
+
### Input Format Details
|
|
248
|
+
|
|
249
|
+
#### Proteins with Custom MSA
|
|
250
|
+
```yaml
|
|
251
|
+
- protein:
|
|
252
|
+
id: A
|
|
253
|
+
sequence: MVTPEGNVSLVDES...
|
|
254
|
+
msa: ./path/to/msa.a3m
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Proteins with Modifications
|
|
258
|
+
```yaml
|
|
259
|
+
- protein:
|
|
260
|
+
id: A
|
|
261
|
+
sequence: MVTPEGNVSLVDES...
|
|
262
|
+
modifications:
|
|
263
|
+
- position: 5
|
|
264
|
+
ccd: PTR # Modified residue code
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
#### Ligands
|
|
268
|
+
```yaml
|
|
269
|
+
- ligand:
|
|
270
|
+
id: B
|
|
271
|
+
smiles: 'CC1=CC=CC=C1' # SMILES string
|
|
272
|
+
# OR
|
|
273
|
+
ccd: ATP # CCD code
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
#### Constraints
|
|
277
|
+
|
|
278
|
+
Pocket and contact constraints are **Boltz-2 only** (they need a trained constraint embedder). Covalent `bond` constraints work with **Boltz-2 and Protenix-v2**.
|
|
279
|
+
|
|
280
|
+
**Pocket Constraints** (binding site):
|
|
281
|
+
```yaml
|
|
282
|
+
constraints:
|
|
283
|
+
- pocket:
|
|
284
|
+
binder: B # Ligand chain
|
|
285
|
+
contacts: [[A, 10], [A, 11], [A, 12]] # Binding site residues
|
|
286
|
+
max_distance: 6.0 # Angstroms (4-20A, default 6A)
|
|
287
|
+
force: false # Use potential to enforce (default: false)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Contact Constraints:**
|
|
291
|
+
```yaml
|
|
292
|
+
constraints:
|
|
293
|
+
- contact:
|
|
294
|
+
token1: [A, 10]
|
|
295
|
+
token2: [A, 50]
|
|
296
|
+
max_distance: 8.0
|
|
297
|
+
force: false
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**Bond Constraints** (covalent link — e.g. a covalent inhibitor, glycosylation, or disulfide; works with Boltz-2 and Protenix-v2):
|
|
301
|
+
```yaml
|
|
302
|
+
constraints:
|
|
303
|
+
- bond:
|
|
304
|
+
atom1: [A, 10, SG] # [chain, residue, atom]
|
|
305
|
+
atom2: [B, 1, C12] # ligand atom by name; polymer atoms by residue
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### Templates
|
|
309
|
+
|
|
310
|
+
Use experimental structures as templates:
|
|
311
|
+
|
|
312
|
+
```yaml
|
|
313
|
+
templates:
|
|
314
|
+
- cif: ./template.cif
|
|
315
|
+
chain_id: A
|
|
316
|
+
template_id: A
|
|
317
|
+
force: true # Enforce template alignment
|
|
318
|
+
threshold: 2.0 # Max deviation in Angstroms
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Command-Line Options
|
|
322
|
+
|
|
323
|
+
Options apply to every model unless tagged **(Boltz-2)**.
|
|
324
|
+
|
|
325
|
+
**Common Options:**
|
|
326
|
+
|
|
327
|
+
| Option | Default | Description |
|
|
328
|
+
|--------|---------|-------------|
|
|
329
|
+
| `--model` | `boltz2` | `boltz2`, `esmfold2`, `esmfold2-fast` (single-sequence ESMFold2), or `protenix-v2` (AlphaFold3-family folder; protein / RNA / DNA / ligand complexes) |
|
|
330
|
+
| `--out_dir` | `./` | Output directory |
|
|
331
|
+
| `--cache` | `~/.boltz` | **(Boltz-2)** model cache directory; ESMFold2 uses the Hugging Face cache |
|
|
332
|
+
| `--accelerator` | `tenstorrent` | **(Boltz-2)** `tenstorrent`, `cpu`, or `gpu`; ESMFold2 always runs on Tenstorrent |
|
|
333
|
+
| `--recycling_steps` | `3` | Number of recycling iterations |
|
|
334
|
+
| `--sampling_steps` | `200` | Diffusion sampling steps |
|
|
335
|
+
| `--diffusion_samples` | `1` | Number of structure samples |
|
|
336
|
+
| `--output_format` | `cif` | `cif` or `pdb` |
|
|
337
|
+
| `--override` | `False` | Re-run from scratch |
|
|
338
|
+
| `--use_msa_server` | `False` | Use online ColabFold API for MSAs (required for Boltz-2, optional for ESMFold2) |
|
|
339
|
+
| `--msa_endpoint` | — | **(ESMFold2/Protenix-v2)** Fetch MSAs from a `tt-bio msa-server` at this URL instead of searching locally |
|
|
340
|
+
| `--use_potentials` | `False` | **(Boltz-2)** Apply physical constraints |
|
|
341
|
+
| `--affinity_mw_correction` | `False` | **(Boltz-2)** Apply MW correction to affinity |
|
|
342
|
+
| `--num_devices` | `0` | Number of TT devices (0=all available) |
|
|
343
|
+
| `--device_ids` | — | Comma-separated TT device IDs (e.g. `0,2`) |
|
|
344
|
+
| `--fast` | `False` | Makes some operations use block-fp8, a lower-precision numeric format that runs faster; accuracy is typically very close |
|
|
345
|
+
| `--listen` | — | Accept worker connections from other machines; see [Multi-Machine Prediction](#optional-multi-machine-prediction) |
|
|
346
|
+
| `--report-energy` | `False` | **(Boltz-2)** Enables optional energy profiling for one TT device (requires `tt-mgmt` add-on); writes `power_profile.csv` and `power_profile.png` |
|
|
347
|
+
| `--energy-metric` | `both` | **(Boltz-2)** Choose power channel(s): `tdp`, `input`, or `both` |
|
|
348
|
+
| `--energy-sample-hz` | `20.0` | **(Boltz-2)** Sampling rate in Hz for both `power_w` and `input_power_w` channels |
|
|
349
|
+
|
|
350
|
+
**Affinity-Specific Options (Boltz-2):**
|
|
351
|
+
|
|
352
|
+
| Option | Default | Description |
|
|
353
|
+
|--------|---------|-------------|
|
|
354
|
+
| `--sampling_steps_affinity` | `200` | Sampling steps for affinity |
|
|
355
|
+
| `--diffusion_samples_affinity` | `5` | Number of affinity samples |
|
|
356
|
+
|
|
357
|
+
**MSA Options** (Boltz-2; used by ESMFold2 only when you opt into an MSA):
|
|
358
|
+
|
|
359
|
+
| Option | Default | Description |
|
|
360
|
+
|--------|---------|-------------|
|
|
361
|
+
| `--msa_db_path` | auto-detect | Path to local ColabFold database |
|
|
362
|
+
| `--use_envdb` | `False` | Also search environmental database |
|
|
363
|
+
| `--use_msa_server` | `False` | Use ColabFold API for MSA |
|
|
364
|
+
| `--msa_server_url` | `https://api.colabfold.com` | MSA server URL |
|
|
365
|
+
| `--msa_pairing_strategy` | `greedy` | `greedy` or `complete` |
|
|
366
|
+
| `--max_msa_seqs` | `8192` | Maximum MSA sequences |
|
|
367
|
+
| `--subsample_msa` | `False` | Subsample MSA |
|
|
368
|
+
| `--num_subsampled_msa` | `1024` | Number of subsampled sequences |
|
|
369
|
+
|
|
370
|
+
**MSA Database Setup Options:**
|
|
371
|
+
|
|
372
|
+
| Option | Default | Description |
|
|
373
|
+
|--------|---------|-------------|
|
|
374
|
+
| `--db` | `uniref30` | `uniref30` (~500GB), `envdb` (~800GB), or `all` |
|
|
375
|
+
| `--path` | `~/.boltz/msa_db` | Where to store the databases |
|
|
376
|
+
| `--install-tools` | `True` | Auto-install missing `mmseqs`/`colabfold_search` |
|
|
377
|
+
|
|
378
|
+
### MSA Server Authentication
|
|
379
|
+
|
|
380
|
+
For `--use_msa_server`:
|
|
381
|
+
|
|
382
|
+
**Basic Authentication:**
|
|
383
|
+
```bash
|
|
384
|
+
export BOLTZ_MSA_USERNAME=myuser
|
|
385
|
+
export BOLTZ_MSA_PASSWORD=mypassword
|
|
386
|
+
tt-bio predict ... --model boltz2 --use_msa_server
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
**API Key Authentication:**
|
|
390
|
+
```bash
|
|
391
|
+
export MSA_API_KEY_VALUE=your-api-key
|
|
392
|
+
tt-bio predict ... --model boltz2 --use_msa_server
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## Optional: Multi-Machine Prediction
|
|
396
|
+
|
|
397
|
+
Combine the cards across any mix of Tenstorrent machines — a workstation, one
|
|
398
|
+
or more QuietBoxes, one or more Galaxy servers — into a single run.
|
|
399
|
+
|
|
400
|
+
On the machine driving the run:
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
tt-bio predict ./proteins --model boltz2 --listen 8765 --use_msa_server --fast
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
On every additional machine, replace `HOST` with the driving machine's
|
|
407
|
+
hostname or IP:
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
tt-bio worker --connect http://HOST:8765
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## Optional: Energy Measurement (Boltz-2)
|
|
414
|
+
|
|
415
|
+
Use `--report-energy` to profile energy during prediction:
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
tt-bio predict examples/686.yaml --model boltz2 --override --device_ids 0 --report-energy --energy-metric both --energy-sample-hz 5
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
Behavior:
|
|
422
|
+
- Select metric channel(s) with `--energy-metric` (`tdp`, `input`, `both`)
|
|
423
|
+
- Uses one sampling rate (`--energy-sample-hz`, default 20 Hz)
|
|
424
|
+
- Supports only Tenstorrent runs with one selected device
|
|
425
|
+
- Records two power channels when available:
|
|
426
|
+
- `power_w`: `tt-mgmt` UMD telemetry power (TDP channel)
|
|
427
|
+
- `input_power_w`: `tt-mgmt` UMD telemetry input power
|
|
428
|
+
- Requires optional `tt-mgmt` installation:
|
|
429
|
+
- `git clone --recursive https://github.com/aperezvicente-TT/tt-mgmt.git`
|
|
430
|
+
- `pip install -e ./tt-mgmt`
|
|
431
|
+
- Prints energy summary metrics for selected channels
|
|
432
|
+
- Always writes:
|
|
433
|
+
- `power_profile.csv`
|
|
434
|
+
- `power_profile.png`
|
|
435
|
+
|
|
436
|
+
## BoltzGen
|
|
437
|
+
|
|
438
|
+
[BoltzGen](https://github.com/HannesStark/boltzgen) designs protein binders against a target. The pipeline runs design → inverse folding → folding → analysis → filtering and writes the top-ranked binders to `<output>/final_ranked_designs/`.
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
tt-bio gen run examples/binder.yaml --num_designs 10
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
This automatically uses every available card (splitting the designs across them and merging the results) and writes to `./binder/`. Add `--device_ids 0,2` to run on specific cards only.
|
|
445
|
+
|
|
446
|
+
### Input Format
|
|
447
|
+
|
|
448
|
+
```yaml
|
|
449
|
+
entities:
|
|
450
|
+
- protein:
|
|
451
|
+
id: B
|
|
452
|
+
sequence: 80..120 # designed chain, sampled length per design
|
|
453
|
+
- file:
|
|
454
|
+
path: target.cif # target structure (path relative to this yaml)
|
|
455
|
+
include:
|
|
456
|
+
- chain:
|
|
457
|
+
id: A
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
`80..120` randomises the binder length per design; a fixed integer pins it. Ligand, DNA, and RNA targets use the same YAML grammar as `tt-bio predict`. See the [BoltzGen examples](https://github.com/HannesStark/boltzgen/tree/main/example) for binding sites, scaffolds, and residue constraints.
|
|
461
|
+
|
|
462
|
+
### Protocols
|
|
463
|
+
|
|
464
|
+
`--protocol` sets defaults appropriate for the binder type.
|
|
465
|
+
|
|
466
|
+
| Protocol | Use for |
|
|
467
|
+
|----------|---------|
|
|
468
|
+
| `protein-anything` (default) | de-novo protein binder |
|
|
469
|
+
| `peptide-anything` | peptide binder |
|
|
470
|
+
| `nanobody-anything` | nanobody / VHH |
|
|
471
|
+
| `antibody-anything` | antibody |
|
|
472
|
+
| `protein-small_molecule` | binder against a small-molecule target (adds affinity step) |
|
|
473
|
+
| `protein-redesign` | re-design existing residues (e.g. symmetric dimers) |
|
|
474
|
+
|
|
475
|
+
### Running a Subset
|
|
476
|
+
|
|
477
|
+
`--steps` restricts the pipeline.
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
tt-bio gen run examples/binder.yaml --steps design --num_designs 10
|
|
481
|
+
tt-bio gen run examples/binder.yaml --output existing/ --steps analysis filtering
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Command-Line Options
|
|
485
|
+
|
|
486
|
+
| Option | Default | Description |
|
|
487
|
+
|--------|---------|-------------|
|
|
488
|
+
| `--protocol` | `protein-anything` | Protocol; sets defaults appropriate for the binder type |
|
|
489
|
+
| `--num_designs` | `10000` | Number of binders to generate |
|
|
490
|
+
| `--budget` | `30` | Number of top designs kept after filtering |
|
|
491
|
+
| `--output` | `./<basename>/` | Output directory |
|
|
492
|
+
| `--steps` | (all) | Run only specific stages |
|
|
493
|
+
| `--config STEP key=val` | — | Override per-stage config (e.g. `--config design sampling_steps=200`) |
|
|
494
|
+
| `--device_ids` | all cards | Restrict to specific cards (e.g. `0,2`) |
|
|
495
|
+
| `--fast` | `False` | Use block-fp8 for some ops (slightly lower precision, faster) |
|
|
496
|
+
| `--cache` | `~/.boltz/boltzgen` | Cache for downloaded weights |
|
|
497
|
+
| `--debug` | `False` | Disable live display; show raw stage output |
|
|
498
|
+
| `--debug --log` | `False` | Add per-stage progress markers |
|
|
499
|
+
|
|
500
|
+
## Cite
|
|
501
|
+
|
|
502
|
+
If you use this code or the models in your research, please cite the following papers:
|
|
503
|
+
|
|
504
|
+
```bibtex
|
|
505
|
+
@article{passaro2025boltz2,
|
|
506
|
+
author = {Passaro, Saro and Corso, Gabriele and Wohlwend, Jeremy and Reveiz, Mateo and Thaler, Stephan and Somnath, Vignesh Ram and Getz, Noah and Portnoi, Tally and Roy, Julien and Stark, Hannes and Kwabi-Addo, David and Beaini, Dominique and Jaakkola, Tommi and Barzilay, Regina},
|
|
507
|
+
title = {Boltz-2: Towards Accurate and Efficient Binding Affinity Prediction},
|
|
508
|
+
year = {2025},
|
|
509
|
+
doi = {10.1101/2025.06.14.659707},
|
|
510
|
+
journal = {bioRxiv}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
@article{stark2025boltzgen,
|
|
514
|
+
author = {Stark, Hannes and Faltings, Felix and Choi, MinGyu and Xie, Yuxin and Hur, Eunsu and O'Donnell, Timothy John and Bushuiev, Anton and U{\c c}ar, Talip and Passaro, Saro and Mao, Weian and Reveiz, Mateo and Bushuiev, Roman and Pluskal, Tom{\'a}{\v s} and Sivic, Josef and Kreis, Karsten and Vahdat, Arash and Ray, Shamayeeta and Goldstein, Jonathan T. and Savinov, Andrew and Hambalek, Jacob A. and Gupta, Anshika and Taquiri-Diaz, Diego A. and Zhang, Yaotian and Hatstat, A. Katherine and Arada, Angelika and Kim, Nam Hyeong and Tackie-Yarboi, Ethel and Boselli, Dylan and Schnaider, Lee and Liu, Chang C. and Li, Gene-Wei and Hnisz, Denes and Sabatini, David M. and DeGrado, William F. and Wohlwend, Jeremy and Corso, Gabriele and Barzilay, Regina and Jaakkola, Tommi},
|
|
515
|
+
title = {BoltzGen: Toward Universal Binder Design},
|
|
516
|
+
year = {2025},
|
|
517
|
+
doi = {10.1101/2025.11.20.689494},
|
|
518
|
+
journal = {bioRxiv}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
@article{wohlwend2024boltz1,
|
|
522
|
+
author = {Wohlwend, Jeremy and Corso, Gabriele and Passaro, Saro and Getz, Noah and Reveiz, Mateo and Leidal, Ken and Swiderski, Wojtek and Atkinson, Liam and Portnoi, Tally and Chinn, Itamar and Silterra, Jacob and Jaakkola, Tommi and Barzilay, Regina},
|
|
523
|
+
title = {Boltz-1: Democratizing Biomolecular Interaction Modeling},
|
|
524
|
+
year = {2024},
|
|
525
|
+
doi = {10.1101/2024.11.19.624167},
|
|
526
|
+
journal = {bioRxiv}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
@misc{candido2026language,
|
|
530
|
+
author = {Candido, Salvatore and Hayes, Thomas and Derry, Alexander and Rao, Roshan and Lin, Zeming and Verkuil, Robert and others},
|
|
531
|
+
title = {Language Modeling Materializes a World Model of Protein Biology},
|
|
532
|
+
year = {2026},
|
|
533
|
+
url = {https://biohub.ai/papers/esm_protein.pdf},
|
|
534
|
+
note = {Preprint; ESMC / ESMFold2}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
@misc{protenix2025,
|
|
538
|
+
author = {{ByteDance AML AI4Science Team}},
|
|
539
|
+
title = {Protenix: An AlphaFold3 Reproduction for Biomolecular Structure Prediction},
|
|
540
|
+
year = {2025},
|
|
541
|
+
url = {https://github.com/bytedance/Protenix}
|
|
542
|
+
}
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
In addition if you use the automatic MSA generation, please cite:
|
|
546
|
+
|
|
547
|
+
```bibtex
|
|
548
|
+
@article{mirdita2022colabfold,
|
|
549
|
+
title={ColabFold: making protein folding accessible to all},
|
|
550
|
+
author={Mirdita, Milot and Sch{\"u}tze, Konstantin and Moriwaki, Yoshitaka and Heo, Lim and Ovchinnikov, Sergey and Steinegger, Martin},
|
|
551
|
+
journal={Nature methods},
|
|
552
|
+
year={2022}
|
|
553
|
+
}
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
## License
|
|
557
|
+
|
|
558
|
+
tt-bio is released under the MIT License (see [`LICENSE`](LICENSE)) and is built on the MIT-licensed Boltz-2 / Boltz-1 code. It bundles third-party code, each under its upstream license: the ESMFold2 host-side reference under `tt_bio/_vendor/` (the `esm` pipeline, MIT, © Chan Zuckerberg Biohub; and the HuggingFace ESMFold2 model definition, Apache-2.0) and the BoltzGen binder-design source under `tt_bio/boltzgen/` (MIT, © Hannes Stärk). Protenix-v2 is an independent ttnn reimplementation — no upstream code is vendored — and its weights download from ByteDance's Hugging Face mirror under Apache-2.0. See [`NOTICE`](NOTICE) for sources, versions, and modifications.
|