boltzina 1.0.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.
- boltzina-1.0.0/LICENSE +21 -0
- boltzina-1.0.0/MANIFEST.in +10 -0
- boltzina-1.0.0/PKG-INFO +287 -0
- boltzina-1.0.0/README.md +253 -0
- boltzina-1.0.0/boltzina/__init__.py +8 -0
- boltzina-1.0.0/boltzina/affinity/predict_affinity.py +143 -0
- boltzina-1.0.0/boltzina/boltz_setup.py +437 -0
- boltzina-1.0.0/boltzina/cli.py +496 -0
- boltzina-1.0.0/boltzina/config.py +211 -0
- boltzina-1.0.0/boltzina/data/module/inferencev2.py +435 -0
- boltzina-1.0.0/boltzina/data/parse/mmcif.py +1239 -0
- boltzina-1.0.0/boltzina/data/write/writer.py +85 -0
- boltzina-1.0.0/boltzina/docking/calculate_com.py +120 -0
- boltzina-1.0.0/boltzina/docking/grid.py +239 -0
- boltzina-1.0.0/boltzina/docking/unidock2.py +492 -0
- boltzina-1.0.0/boltzina/engine.py +1221 -0
- boltzina-1.0.0/boltzina/model/models/boltz2.py +1258 -0
- boltzina-1.0.0/boltzina/preparation.py +358 -0
- boltzina-1.0.0/boltzina/runner.py +450 -0
- boltzina-1.0.0/boltzina.egg-info/SOURCES.txt +19 -0
- boltzina-1.0.0/pyproject.toml +58 -0
- boltzina-1.0.0/setup.cfg +4 -0
boltzina-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ohue Laboratory, Science Tokyo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
boltzina-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: boltzina
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Efficient and accurate virtual screening via docking-guided binding prediction with Boltz-2
|
|
5
|
+
Author-email: Kairi Furui <furui@li.comp.isct.ac.jp>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ohuelab/boltzina
|
|
8
|
+
Project-URL: Repository, https://github.com/ohuelab/boltzina
|
|
9
|
+
Project-URL: Issues, https://github.com/ohuelab/boltzina/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/ohuelab/boltzina/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: virtual screening,molecular docking,protein-ligand binding,boltz,affinity prediction
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
21
|
+
Requires-Python: <3.13,>=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: boltz[cuda]>=2.2.0
|
|
25
|
+
Requires-Dist: openbabel-wheel>=3.1.1.22
|
|
26
|
+
Requires-Dist: pdb-tools>=2.5.0
|
|
27
|
+
Requires-Dist: triton==3.3.0
|
|
28
|
+
Requires-Dist: meeko>=0.6.1
|
|
29
|
+
Requires-Dist: click>=8.0
|
|
30
|
+
Requires-Dist: tomli>=2.0; python_version < "3.11"
|
|
31
|
+
Requires-Dist: tomli-w>=1.0
|
|
32
|
+
Requires-Dist: click-option-group>=0.5.9
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# Boltzina
|
|
36
|
+

|
|
37
|
+
Boltzina is a pipeline that combines AutoDock Vina (or Uni-Dock2) docking with Boltz-2 structure prediction and affinity scoring for virtual screening.
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
### Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Using uv (recommended)
|
|
45
|
+
uv venv
|
|
46
|
+
uv sync
|
|
47
|
+
|
|
48
|
+
# Or using pip
|
|
49
|
+
pip install .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Tool setup (Vina, MAXIT, Boltz-2 model weights)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
boltzina setup --all
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
For Uni-Dock2 (GPU-accelerated docking, requires [pixi](https://pixi.sh) and CUDA 12):
|
|
59
|
+
```bash
|
|
60
|
+
# Clone Uni-Dock2 and build using the provided pixi.toml
|
|
61
|
+
git clone https://github.com/dptech-corp/Uni-Dock2 /path/to/Uni-Dock2
|
|
62
|
+
cp pixi.toml /path/to/Uni-Dock2/
|
|
63
|
+
cd /path/to/Uni-Dock2 && pixi install && pixi run build
|
|
64
|
+
boltzina setup --register-unidock2 /path/to/Uni-Dock2
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Usage
|
|
70
|
+
|
|
71
|
+
### With Boltz-2 structure prediction (sequence → dock → score)
|
|
72
|
+
|
|
73
|
+
Provide a protein sequence and a SMILES/SDF file. Boltzina will:
|
|
74
|
+
1. Run Boltz-2 structure + affinity prediction (complex with first/reference ligand)
|
|
75
|
+
2. Determine the docking grid automatically from the predicted binding pose
|
|
76
|
+
3. Run AutoDock Vina docking
|
|
77
|
+
4. Score all poses with Boltz-2
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# From a FASTA file (CDK2 example)
|
|
81
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
82
|
+
--sequence-file sample/CDK2/cdk2.fasta \
|
|
83
|
+
--output-dir ./results
|
|
84
|
+
|
|
85
|
+
# From a sequence string directly
|
|
86
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
87
|
+
--sequence "MENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVPSTAIREISLLKELNHPNIVKLLDVIHTENKLYLVFEFLHQDLKKFMDASALTGIPLPLIKSYLFQLLQGLAFCHSHRVLHRDLKPQNLLINTEGAIKLADFGLARAFGVPVRTYTHEVVTLWYRAPEILLGCKYYSTAVDIWSLGCIFAEMVTRRALFPGDSEIDQLFRIFRTLGTPDEVVWPGVTSMPDYKPSFPKWARQDFSKVVPPLDEDGRSLLSQMLHYDPNKRISAKAALAHPFFQDVTKPVPHLRL" \
|
|
88
|
+
--output-dir ./results
|
|
89
|
+
|
|
90
|
+
# Multi-chain protein: colon-separated sequences
|
|
91
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
92
|
+
--sequence "MENFQKVEKIGEGTYGVVYK...:AKLSILPWGHC..." \
|
|
93
|
+
--output-dir ./results
|
|
94
|
+
|
|
95
|
+
# Multi-chain protein: multi-entry FASTA
|
|
96
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
97
|
+
--sequence-file complex.fasta \ # >chain1 / seq / >chain2 / seq
|
|
98
|
+
--output-dir ./results
|
|
99
|
+
|
|
100
|
+
# Use a specific reference ligand for prediction and grid center
|
|
101
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
102
|
+
--sequence-file sample/CDK2/cdk2.fasta \
|
|
103
|
+
--reference-ligand "CC(C)[C@H](CO)Nc1nc(Nc2ccc(C(=O)O)c(Cl)c2)c2ncn(C(C)C)c2n1" \
|
|
104
|
+
--output-dir ./results
|
|
105
|
+
|
|
106
|
+
# With more diffusion samples for better accuracy
|
|
107
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
108
|
+
--sequence-file sample/CDK2/cdk2.fasta \
|
|
109
|
+
--use-msa-server \
|
|
110
|
+
--diffusion-samples 5 \
|
|
111
|
+
--output-dir ./results
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### With a Boltz-2 YAML input
|
|
115
|
+
|
|
116
|
+
For full control over multi-chain proteins, ligand definitions, and Boltz-2 settings,
|
|
117
|
+
use a boltz-compatible YAML file (see `sample/CDK2/1ckp_cdk2.yaml` for an example):
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
121
|
+
--yaml sample/CDK2/1ckp_cdk2.yaml \
|
|
122
|
+
--output-dir ./results
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The YAML format:
|
|
126
|
+
```yaml
|
|
127
|
+
version: 1
|
|
128
|
+
sequences:
|
|
129
|
+
- protein:
|
|
130
|
+
id: A
|
|
131
|
+
sequence: MENFQKVEKIGEGTYGVVYK... # CDK2 sequence
|
|
132
|
+
- ligand:
|
|
133
|
+
id: B
|
|
134
|
+
smiles: 'CC(C)[C@H](CO)Nc1nc(Nc2ccc(C(=O)O)c(Cl)c2)c2ncn(C(C)C)c2n1'
|
|
135
|
+
properties:
|
|
136
|
+
- affinity:
|
|
137
|
+
binder: B
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Multiple protein chains are supported (add more `- protein:` entries).
|
|
141
|
+
The `properties.affinity.binder` identifies the reference ligand for grid center determination.
|
|
142
|
+
|
|
143
|
+
### From precomputed Boltz-2 results
|
|
144
|
+
|
|
145
|
+
If you have already run `boltz predict`, pass the output directory directly:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
149
|
+
--work-dir sample/CDK2/boltz_results_base \
|
|
150
|
+
--output-dir ./results
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The grid center is determined automatically from the Boltz-2 predicted ligand position.
|
|
154
|
+
You can override it explicitly:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
158
|
+
--work-dir sample/CDK2/boltz_results_base \
|
|
159
|
+
--grid-center "7.0,-4.9,7.5" \
|
|
160
|
+
--output-dir ./results
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## CLI Reference
|
|
166
|
+
|
|
167
|
+
### `boltzina run <INPUT> [OPTIONS]`
|
|
168
|
+
|
|
169
|
+
`INPUT` can be a `.smi`/`.txt` file (SMILES list), `.sdf` file, or a directory.
|
|
170
|
+
|
|
171
|
+
**Protein input** (choose one; required):
|
|
172
|
+
|
|
173
|
+
| Option | Description |
|
|
174
|
+
|--------|-------------|
|
|
175
|
+
| `--sequence` / `-s` | Protein sequence (single chain, or `SEQ1:SEQ2` for multi-chain) |
|
|
176
|
+
| `--sequence-file` | FASTA file (one `>entry` per chain for multi-chain) |
|
|
177
|
+
| `--yaml` | Boltz-2 compatible YAML (protein + ligand + affinity) |
|
|
178
|
+
| `--work-dir` | Existing Boltz-2 output directory (docking + scoring only) |
|
|
179
|
+
|
|
180
|
+
**Structure prediction options** (with `--sequence` / `--sequence-file`):
|
|
181
|
+
|
|
182
|
+
| Option | Default | Description |
|
|
183
|
+
|--------|---------|-------------|
|
|
184
|
+
| `--reference-ligand` | first in INPUT | SMILES string or SDF file for Boltz-2 complex prediction and grid center |
|
|
185
|
+
|
|
186
|
+
**Docking:**
|
|
187
|
+
|
|
188
|
+
| Option | Default | Description |
|
|
189
|
+
|--------|---------|-------------|
|
|
190
|
+
| `--grid-center` | auto | Docking box center `x,y,z` |
|
|
191
|
+
| `--grid-size` | `20.0` | Docking box size (Å) |
|
|
192
|
+
| `--ligand-chain-id` | `B` | Ligand chain in Boltz-2 prediction (rescore mode) |
|
|
193
|
+
| `--docking-engine` | `vina` | `vina` or `unidock2` |
|
|
194
|
+
| `--num-workers` | `1` | Parallel Vina workers |
|
|
195
|
+
| `--skip-docking` | off | Score existing poses only |
|
|
196
|
+
| `--regenerate-conformer` | off | Force 3D conformer regeneration for SDF |
|
|
197
|
+
|
|
198
|
+
**Boltz-2 prediction:**
|
|
199
|
+
|
|
200
|
+
| Option | Default | Description |
|
|
201
|
+
|--------|---------|-------------|
|
|
202
|
+
| `--use-msa-server` | off | Use online MMseqs2 MSA server |
|
|
203
|
+
| `--recycling-steps` | `3` | Boltz-2 recycling steps |
|
|
204
|
+
| `--sampling-steps` | `200` | Boltz-2 sampling steps |
|
|
205
|
+
| `--diffusion-samples` | `1` | Boltz-2 diffusion samples |
|
|
206
|
+
| `--use-potentials` | off | Boltz-2 inference-time potentials |
|
|
207
|
+
| `--subsample-msa` | off | Subsample MSA sequences |
|
|
208
|
+
| `--no-kernels` | off | Disable trifast kernels (older GPUs) |
|
|
209
|
+
| `--affinity-mw-correction` | off | MW correction to affinity |
|
|
210
|
+
|
|
211
|
+
**Output:**
|
|
212
|
+
|
|
213
|
+
| Option | Default | Description |
|
|
214
|
+
|--------|---------|-------------|
|
|
215
|
+
| `--output-dir` / `-o` | `./boltzina_results` | Output directory |
|
|
216
|
+
| `--batch-size` | `1` | Boltz-2 scoring batch size |
|
|
217
|
+
| `--seed` | — | Random seed |
|
|
218
|
+
| `--vina-override` | off | Rerun Vina even if results exist |
|
|
219
|
+
| `--boltz-override` | off | Rerun Boltz-2 scoring even if results exist |
|
|
220
|
+
| `--keep-intermediate-files` | off | Keep intermediate docking files |
|
|
221
|
+
|
|
222
|
+
### `boltzina prepare <INPUT> [OPTIONS]`
|
|
223
|
+
|
|
224
|
+
Convert SMILES/SDF to PDB + `prepared_mols.pkl` for use with `run.py`.
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
boltzina prepare ligands.smi --output-dir ./prepared
|
|
228
|
+
boltzina prepare ligands.sdf --output-dir ./prepared --regenerate-conformer
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### `boltzina grid <STRUCTURE_FILE> [OPTIONS]`
|
|
232
|
+
|
|
233
|
+
Compute the docking grid center from a ligand or complex file.
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
boltzina grid ligand.pdb --output vina_config.txt
|
|
237
|
+
boltzina grid complex.cif --chain B --output vina_config.txt
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### `boltzina setup [OPTIONS]`
|
|
241
|
+
|
|
242
|
+
Install and register external tools.
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
boltzina setup --all # Vina + MAXIT + Boltz-2 weights
|
|
246
|
+
boltzina setup --install-vina # Vina only
|
|
247
|
+
boltzina setup --install-maxit # MAXIT only
|
|
248
|
+
boltzina setup --register-unidock2 /path/to/Uni-Dock2
|
|
249
|
+
boltzina setup --show # Show current config
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Legacy usage (run.py)
|
|
255
|
+
|
|
256
|
+
The original `run.py` interface is fully supported:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
python run.py sample/CDK2/config.json
|
|
260
|
+
python run.py sample/CDK2/config.json --use_kernels --num_workers 4
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
See `sample/CDK2/config.json` for the configuration file format.
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Benchmark Dataset
|
|
268
|
+
|
|
269
|
+
The MF-PCBA benchmark dataset used in the paper is included in `mf-pcba_test.zip`.
|
|
270
|
+
See the paper for details on the evaluation protocol.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Running Tests
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# Unit tests (no GPU required)
|
|
278
|
+
uv run pytest tests/ --ignore=tests/test_integration.py -v
|
|
279
|
+
|
|
280
|
+
# Integration tests (requires GPU + Boltz-2 weights)
|
|
281
|
+
uv run pytest tests/test_integration.py -m gpu -v
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Reference
|
|
287
|
+
Furui, K, & Ohue, M. Boltzina: Efficient and Accurate Virtual Screening via Docking-Guided Binding Prediction with Boltz-2. AI for Accelerated Materials Design - NeurIPS 2025. https://openreview.net/forum?id=OwtEQsd2hN
|
boltzina-1.0.0/README.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# Boltzina
|
|
2
|
+

|
|
3
|
+
Boltzina is a pipeline that combines AutoDock Vina (or Uni-Dock2) docking with Boltz-2 structure prediction and affinity scoring for virtual screening.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Using uv (recommended)
|
|
11
|
+
uv venv
|
|
12
|
+
uv sync
|
|
13
|
+
|
|
14
|
+
# Or using pip
|
|
15
|
+
pip install .
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Tool setup (Vina, MAXIT, Boltz-2 model weights)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
boltzina setup --all
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For Uni-Dock2 (GPU-accelerated docking, requires [pixi](https://pixi.sh) and CUDA 12):
|
|
25
|
+
```bash
|
|
26
|
+
# Clone Uni-Dock2 and build using the provided pixi.toml
|
|
27
|
+
git clone https://github.com/dptech-corp/Uni-Dock2 /path/to/Uni-Dock2
|
|
28
|
+
cp pixi.toml /path/to/Uni-Dock2/
|
|
29
|
+
cd /path/to/Uni-Dock2 && pixi install && pixi run build
|
|
30
|
+
boltzina setup --register-unidock2 /path/to/Uni-Dock2
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### With Boltz-2 structure prediction (sequence → dock → score)
|
|
38
|
+
|
|
39
|
+
Provide a protein sequence and a SMILES/SDF file. Boltzina will:
|
|
40
|
+
1. Run Boltz-2 structure + affinity prediction (complex with first/reference ligand)
|
|
41
|
+
2. Determine the docking grid automatically from the predicted binding pose
|
|
42
|
+
3. Run AutoDock Vina docking
|
|
43
|
+
4. Score all poses with Boltz-2
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# From a FASTA file (CDK2 example)
|
|
47
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
48
|
+
--sequence-file sample/CDK2/cdk2.fasta \
|
|
49
|
+
--output-dir ./results
|
|
50
|
+
|
|
51
|
+
# From a sequence string directly
|
|
52
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
53
|
+
--sequence "MENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVPSTAIREISLLKELNHPNIVKLLDVIHTENKLYLVFEFLHQDLKKFMDASALTGIPLPLIKSYLFQLLQGLAFCHSHRVLHRDLKPQNLLINTEGAIKLADFGLARAFGVPVRTYTHEVVTLWYRAPEILLGCKYYSTAVDIWSLGCIFAEMVTRRALFPGDSEIDQLFRIFRTLGTPDEVVWPGVTSMPDYKPSFPKWARQDFSKVVPPLDEDGRSLLSQMLHYDPNKRISAKAALAHPFFQDVTKPVPHLRL" \
|
|
54
|
+
--output-dir ./results
|
|
55
|
+
|
|
56
|
+
# Multi-chain protein: colon-separated sequences
|
|
57
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
58
|
+
--sequence "MENFQKVEKIGEGTYGVVYK...:AKLSILPWGHC..." \
|
|
59
|
+
--output-dir ./results
|
|
60
|
+
|
|
61
|
+
# Multi-chain protein: multi-entry FASTA
|
|
62
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
63
|
+
--sequence-file complex.fasta \ # >chain1 / seq / >chain2 / seq
|
|
64
|
+
--output-dir ./results
|
|
65
|
+
|
|
66
|
+
# Use a specific reference ligand for prediction and grid center
|
|
67
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
68
|
+
--sequence-file sample/CDK2/cdk2.fasta \
|
|
69
|
+
--reference-ligand "CC(C)[C@H](CO)Nc1nc(Nc2ccc(C(=O)O)c(Cl)c2)c2ncn(C(C)C)c2n1" \
|
|
70
|
+
--output-dir ./results
|
|
71
|
+
|
|
72
|
+
# With more diffusion samples for better accuracy
|
|
73
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
74
|
+
--sequence-file sample/CDK2/cdk2.fasta \
|
|
75
|
+
--use-msa-server \
|
|
76
|
+
--diffusion-samples 5 \
|
|
77
|
+
--output-dir ./results
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### With a Boltz-2 YAML input
|
|
81
|
+
|
|
82
|
+
For full control over multi-chain proteins, ligand definitions, and Boltz-2 settings,
|
|
83
|
+
use a boltz-compatible YAML file (see `sample/CDK2/1ckp_cdk2.yaml` for an example):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
87
|
+
--yaml sample/CDK2/1ckp_cdk2.yaml \
|
|
88
|
+
--output-dir ./results
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The YAML format:
|
|
92
|
+
```yaml
|
|
93
|
+
version: 1
|
|
94
|
+
sequences:
|
|
95
|
+
- protein:
|
|
96
|
+
id: A
|
|
97
|
+
sequence: MENFQKVEKIGEGTYGVVYK... # CDK2 sequence
|
|
98
|
+
- ligand:
|
|
99
|
+
id: B
|
|
100
|
+
smiles: 'CC(C)[C@H](CO)Nc1nc(Nc2ccc(C(=O)O)c(Cl)c2)c2ncn(C(C)C)c2n1'
|
|
101
|
+
properties:
|
|
102
|
+
- affinity:
|
|
103
|
+
binder: B
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Multiple protein chains are supported (add more `- protein:` entries).
|
|
107
|
+
The `properties.affinity.binder` identifies the reference ligand for grid center determination.
|
|
108
|
+
|
|
109
|
+
### From precomputed Boltz-2 results
|
|
110
|
+
|
|
111
|
+
If you have already run `boltz predict`, pass the output directory directly:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
115
|
+
--work-dir sample/CDK2/boltz_results_base \
|
|
116
|
+
--output-dir ./results
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The grid center is determined automatically from the Boltz-2 predicted ligand position.
|
|
120
|
+
You can override it explicitly:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
boltzina run sample/CDK2/ligands.smi \
|
|
124
|
+
--work-dir sample/CDK2/boltz_results_base \
|
|
125
|
+
--grid-center "7.0,-4.9,7.5" \
|
|
126
|
+
--output-dir ./results
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## CLI Reference
|
|
132
|
+
|
|
133
|
+
### `boltzina run <INPUT> [OPTIONS]`
|
|
134
|
+
|
|
135
|
+
`INPUT` can be a `.smi`/`.txt` file (SMILES list), `.sdf` file, or a directory.
|
|
136
|
+
|
|
137
|
+
**Protein input** (choose one; required):
|
|
138
|
+
|
|
139
|
+
| Option | Description |
|
|
140
|
+
|--------|-------------|
|
|
141
|
+
| `--sequence` / `-s` | Protein sequence (single chain, or `SEQ1:SEQ2` for multi-chain) |
|
|
142
|
+
| `--sequence-file` | FASTA file (one `>entry` per chain for multi-chain) |
|
|
143
|
+
| `--yaml` | Boltz-2 compatible YAML (protein + ligand + affinity) |
|
|
144
|
+
| `--work-dir` | Existing Boltz-2 output directory (docking + scoring only) |
|
|
145
|
+
|
|
146
|
+
**Structure prediction options** (with `--sequence` / `--sequence-file`):
|
|
147
|
+
|
|
148
|
+
| Option | Default | Description |
|
|
149
|
+
|--------|---------|-------------|
|
|
150
|
+
| `--reference-ligand` | first in INPUT | SMILES string or SDF file for Boltz-2 complex prediction and grid center |
|
|
151
|
+
|
|
152
|
+
**Docking:**
|
|
153
|
+
|
|
154
|
+
| Option | Default | Description |
|
|
155
|
+
|--------|---------|-------------|
|
|
156
|
+
| `--grid-center` | auto | Docking box center `x,y,z` |
|
|
157
|
+
| `--grid-size` | `20.0` | Docking box size (Å) |
|
|
158
|
+
| `--ligand-chain-id` | `B` | Ligand chain in Boltz-2 prediction (rescore mode) |
|
|
159
|
+
| `--docking-engine` | `vina` | `vina` or `unidock2` |
|
|
160
|
+
| `--num-workers` | `1` | Parallel Vina workers |
|
|
161
|
+
| `--skip-docking` | off | Score existing poses only |
|
|
162
|
+
| `--regenerate-conformer` | off | Force 3D conformer regeneration for SDF |
|
|
163
|
+
|
|
164
|
+
**Boltz-2 prediction:**
|
|
165
|
+
|
|
166
|
+
| Option | Default | Description |
|
|
167
|
+
|--------|---------|-------------|
|
|
168
|
+
| `--use-msa-server` | off | Use online MMseqs2 MSA server |
|
|
169
|
+
| `--recycling-steps` | `3` | Boltz-2 recycling steps |
|
|
170
|
+
| `--sampling-steps` | `200` | Boltz-2 sampling steps |
|
|
171
|
+
| `--diffusion-samples` | `1` | Boltz-2 diffusion samples |
|
|
172
|
+
| `--use-potentials` | off | Boltz-2 inference-time potentials |
|
|
173
|
+
| `--subsample-msa` | off | Subsample MSA sequences |
|
|
174
|
+
| `--no-kernels` | off | Disable trifast kernels (older GPUs) |
|
|
175
|
+
| `--affinity-mw-correction` | off | MW correction to affinity |
|
|
176
|
+
|
|
177
|
+
**Output:**
|
|
178
|
+
|
|
179
|
+
| Option | Default | Description |
|
|
180
|
+
|--------|---------|-------------|
|
|
181
|
+
| `--output-dir` / `-o` | `./boltzina_results` | Output directory |
|
|
182
|
+
| `--batch-size` | `1` | Boltz-2 scoring batch size |
|
|
183
|
+
| `--seed` | — | Random seed |
|
|
184
|
+
| `--vina-override` | off | Rerun Vina even if results exist |
|
|
185
|
+
| `--boltz-override` | off | Rerun Boltz-2 scoring even if results exist |
|
|
186
|
+
| `--keep-intermediate-files` | off | Keep intermediate docking files |
|
|
187
|
+
|
|
188
|
+
### `boltzina prepare <INPUT> [OPTIONS]`
|
|
189
|
+
|
|
190
|
+
Convert SMILES/SDF to PDB + `prepared_mols.pkl` for use with `run.py`.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
boltzina prepare ligands.smi --output-dir ./prepared
|
|
194
|
+
boltzina prepare ligands.sdf --output-dir ./prepared --regenerate-conformer
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### `boltzina grid <STRUCTURE_FILE> [OPTIONS]`
|
|
198
|
+
|
|
199
|
+
Compute the docking grid center from a ligand or complex file.
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
boltzina grid ligand.pdb --output vina_config.txt
|
|
203
|
+
boltzina grid complex.cif --chain B --output vina_config.txt
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### `boltzina setup [OPTIONS]`
|
|
207
|
+
|
|
208
|
+
Install and register external tools.
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
boltzina setup --all # Vina + MAXIT + Boltz-2 weights
|
|
212
|
+
boltzina setup --install-vina # Vina only
|
|
213
|
+
boltzina setup --install-maxit # MAXIT only
|
|
214
|
+
boltzina setup --register-unidock2 /path/to/Uni-Dock2
|
|
215
|
+
boltzina setup --show # Show current config
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Legacy usage (run.py)
|
|
221
|
+
|
|
222
|
+
The original `run.py` interface is fully supported:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
python run.py sample/CDK2/config.json
|
|
226
|
+
python run.py sample/CDK2/config.json --use_kernels --num_workers 4
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
See `sample/CDK2/config.json` for the configuration file format.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Benchmark Dataset
|
|
234
|
+
|
|
235
|
+
The MF-PCBA benchmark dataset used in the paper is included in `mf-pcba_test.zip`.
|
|
236
|
+
See the paper for details on the evaluation protocol.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Running Tests
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Unit tests (no GPU required)
|
|
244
|
+
uv run pytest tests/ --ignore=tests/test_integration.py -v
|
|
245
|
+
|
|
246
|
+
# Integration tests (requires GPU + Boltz-2 weights)
|
|
247
|
+
uv run pytest tests/test_integration.py -m gpu -v
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Reference
|
|
253
|
+
Furui, K, & Ohue, M. Boltzina: Efficient and Accurate Virtual Screening via Docking-Guided Binding Prediction with Boltz-2. AI for Accelerated Materials Design - NeurIPS 2025. https://openreview.net/forum?id=OwtEQsd2hN
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from importlib.metadata import version as _v
|
|
2
|
+
|
|
3
|
+
__version__ = _v("boltzina")
|
|
4
|
+
|
|
5
|
+
# Heavy imports (torch, boltz, rdkit) are NOT loaded here.
|
|
6
|
+
# Import explicitly when needed:
|
|
7
|
+
# from boltzina.engine import Boltzina
|
|
8
|
+
# from boltzina.runner import BoltzinaRunner, RunnerConfig
|