Boltz をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
本家様 [[https://github.com/jwohlwend/boltz>+https://gith...
pipy [[https://pypi.org/project/boltz/>+https://pypi.org/...
pipyの内容から Python <3.13, >=3.10 が動作条件っぽい
生体分子(タンパク質、核酸、リガンドなど)の構造予測・相...
モデルファイルはオープンソースで商用利用可能. タンパク-リ...
AlphaFoldはMultiple Sequence Alignment(MSA)は必須。Boltz...
[[msa]]を立ててみた.
環境
#code(nonumber){{
[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.5 (Blue Onyx)
[root@rockylinux9 ~]# uname -r
5.14.0-503.14.1.el9_5.x86_64
[root@rockylinux9 ~]# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 570.172.0...
GCC version: gcc version 11.5.0 20240719 (Red Hat 11.5.0...
[root@rockylinux9 ~]#
}}
下準備
#code(nonumber){{
git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
pyenv install anaconda3-2024.10-1
}}
構築
#code(nonumber){{
[root@rockylinux9 ~]# source /apps/pyenv/versions/anacond...
[root@rockylinux9 ~]# conda create -n Boltz-2 pip python=...
[root@rockylinux9 ~]# conda activate Boltz-2
(Boltz-2) [root@rockylinux9 ~]# cd /apps/src
(Boltz-2) [root@rockylinux9 src]# git clone https://githu...
(Boltz-2) [root@rockylinux9 src]# cd boltz
(Boltz-2) [root@rockylinux9 boltz]#
(Boltz-2) [root@rockylinux9 boltz]# pip install -e .[cuda]
(Boltz-2) [root@rockylinux9 boltz]# conda list
:
biopython 1.84 pypi_0...
boltz 2.2.0 pypi_0...
:
python 3.12.11 h9e4cc4f_0_cpyt...
:
rdkit 2025.3.3 pypi_0...
:
torch 2.7.1 pypi_0...
:
(Boltz-2) [root@rockylinux9 boltz]# conda deactivate
[root@rockylinux9 boltz]#
}}
***environment-modules [#rf1d758d]
「/apps/modulefiles/boltz-2」
#code(nonumber){{
#%Module
module load PyMOL
set root /apps/pyenv/versions/anaconda3-2024.10-...
prepend-path PATH $root/bin
}}
「boltz --help」
#code(nonumber){{
Usage: boltz [OPTIONS] COMMAND [ARGS]...
Boltz1.
Options:
--help Show this message and exit.
Commands:
predict Run predictions with Boltz-1.
}}
「boltz predict --help」
#code(nonumber){{
Usage: boltz predict [OPTIONS] DATA
Run predictions with Boltz-1.
Options:
--out_dir PATH The path where to save the...
--cache PATH The directory where to dow...
model. Default is ~/.boltz.
--checkpoint PATH An optional checkpoint, wi...
Boltz-1 model by default.
--devices INTEGER The number of devices to u...
Default is 1.
--accelerator [gpu|cpu|tpu] The accelerator to use for...
is gpu.
--recycling_steps INTEGER The number of recycling st...
prediction. Default is 3.
--sampling_steps INTEGER The number of sampling ste...
prediction. Default is 200.
--diffusion_samples INTEGER The number of diffusion sa...
prediction. Default is 1.
--step_scale FLOAT The step size is related t...
which the diffusion proces...
distribution.The lower the...
among samples (recommended...
Default is 1.638.
--write_full_pae Whether to dump the pae in...
Default is True.
--write_full_pde Whether to dump the pde in...
Default is False.
--output_format [pdb|mmcif] The output format to use f...
Default is mmcif.
--num_workers INTEGER The number of dataloader w...
prediction. Default is 2.
--override Whether to override existi...
Default is False.
--seed INTEGER Seed to use for random num...
Default is None (no seedin...
--use_msa_server Whether to use the MMSeqs2...
generation. Default is Fal...
--msa_server_url TEXT MSA server url. Used only ...
is set.
--msa_pairing_strategy TEXT Pairing strategy to use. U...
--use_msa_server is set. O...
and 'complete'
--help Show this message and exit.
}}
***テスト [#c7c30c1c]
git にあるサンプルファイル「/apps/src/boltz/examples/affi...
#code(nonumber){{
[illya@rockylinux9 ~]$ cp /apps/src/boltz/examples/affini...
[illya@rockylinux9 ~]$ module load boltz-2
[illya@rockylinux9 ~]$ cat affinity.yaml
version: 1 # Optional, defaults to 1
sequences:
- protein:
id: A
sequence: MVTPEGNVSLVDESLLVGVTDEDRAVRSAHQFYERLIGLWA...
- ligand:
id: B
smiles: 'N[C@@H](Cc1ccc(O)cc1)C(=O)O'
properties:
- affinity:
binder: B
[illya@rockylinux9 ~]$
[illya@rockylinux9 ~]$ boltz predict affinity.yaml --out...
}}
「--cache」でmodelファイルの参照先を指定するが、なにも指...
っで「$HOME/.boltz」に何もないと自動的にモデルがダウンロ...
自分向けのフォルダなので自由に使えるが、サイズは 12GB に...
ユーザ毎に12GBが消費されるのが避けたいなら共通の場所に置...
どうも、そのフォルダは実行時に生成・更新されるファイルが...
どんなファイルが置かれるかは「/apps/src/boltz/src/boltz/m...
なので
#code(nonumber){{
mkdir /apps/boltz ; cd /apps/boltz
wget https://model-gateway.boltz.bio/boltz1_conf.ckpt
wget https://model-gateway.boltz.bio/boltz2_conf.ckpt
wget https://model-gateway.boltz.bio/boltz2_aff.ckpt
wget https://huggingface.co/boltz-community/boltz-1/resol...
wget https://huggingface.co/boltz-community/boltz-2/resol...
tar xf mols.tar
[root@rockylinux9 boltz]# ls -l /apps/boltz/
total 9909400
-rw-r--r--. 1 root root 3595352714 Nov 28 2024 boltz1_...
-rw-r--r--. 1 root root 2062139170 Jun 6 22:17 boltz2_...
-rw-r--r--. 1 root root 2286561469 Jun 6 22:15 boltz2_...
-rw-r--r--. 1 root root 345859128 Nov 18 2024 ccd.pkl
drwxr-sr-x. 2 22478 20626 1105920 Feb 19 03:01 mols
-rw-r--r--. 1 root root 1855662080 Jun 6 22:14 mols.tar
[root@rockylinux9 boltz]#
[root@rockylinux9 boltz]# chmod 777 /apps/boltz
}}
とする。
&size(10){「chmod 777」は微妙なので、各ホームディレクトリ...
っで下記で実行します
#code(nonumber){{
[illya@rockylinux9 ~]$ boltz predict affinity.yaml --out...
}}
結果は「out/boltz_results_affinity/predictions/affinity/a...
&ref(2025y09m15d_142925067.png,nolink,80%);
***Bolts-gui [#dba9ce6f]
本家様 [[https://github.com/ravishar313/boltz-gui>+https:...
&color(red){製作中};
下準備 npm のインストール. npmは18以上が必要なので
#code(nonumber){{
[root@rockylinux8 ~]# cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
[root@rockylinux8 ~]# dnf module list nodejs
Last metadata expiration check: 0:10:33 ago on Mon 23 Jun...
Rocky Linux 8 - AppStream
Name Stream Profiles ...
nodejs 10 [d][e] common [d], develop...
nodejs 12 common [d], develop...
nodejs 14 common [d], develop...
nodejs 16 common [d], develop...
nodejs 18 common [d], develop...
nodejs 20 common [d], develop...
nodejs 22 common, development...
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@rockylinux8 ~]#
[root@rockylinux8 ~]# dnf module install nodejs:18 <-...
}}
あとは各自のユーザディレクトリで作ってください
#code(nonumber){{
[saber@rockylinux8 ~]$ echo $PATH
/home/saber/.local/bin:/home/saber/bin:/usr/local/bin:/us...
[saber@rockylinux8 ~]$ curl -LsSf https://astral.sh/uv/in...
downloading uv 0.7.13 x86_64-unknown-linux-gnu
no checksums to verify
installing to /home/saber/.local/bin
uv
uvx
everything's installed!
[saber@rockylinux8 ~]$ uv --version
uv 0.7.13
[saber@rockylinux8 ~]$
}}
boltz-guiパッケージの取得
#code(nonumber){{
[saber@rockylinux8 ~]$ git clone https://github.com/ravis...
}}
backend の準備
#code(nonumber){{
[saber@rockylinux8 ~]$ cd boltz-gui/backend/
[saber@rockylinux8 backend]$ uv sync
}}
backend の起動
#code(nonumber){{
[saber@rockylinux8 ~]$ cd boltz-gui/backend/
[saber@rockylinux8 backend]$ source .venv/bin/activate
(boltz-gui) [saber@rockylinux8 backend]$ uv run run_serve...
(boltz-gui) [saber@rockylinux8 backend]$ uv run run_serve...
Starting Boltz GUI Server...
Server will be available at: http://localhost:6969
API documentation: http://localhost:6969/docs
Health check: http://localhost:6969/health
Press Ctrl+C to stop the server
INFO: Will watch for changes in these directories: ['...
INFO: Uvicorn running on http://0.0.0.0:6969 (Press C...
INFO: Started reloader process [2120] using WatchFiles
INFO: Started server process [2122]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO:watchfiles.main:11 changes detected
:
(終了するには CTRL+C で止めて)
^CINFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [2122]
INFO: Stopping reloader process [2120]
(boltz-gui) [saber@rockylinux8 backend]$ deactivate
[saber@rockylinux8 backend]$
}}
backend の起動後に 別のターミナルを開いて frontend の準備
#code(nonumber){{
[saber@rockylinux8 ~]$ cd boltz-gui/frontend/
[saber@rockylinux8 frontend]$ npm install
}}
frontend を起動します
#code(nonumber){{
[saber@rockylinux8 frontend]$ npm run dev
(終了するには CTRL+C で止めます)
}}
終了行:
本家様 [[https://github.com/jwohlwend/boltz>+https://gith...
pipy [[https://pypi.org/project/boltz/>+https://pypi.org/...
pipyの内容から Python <3.13, >=3.10 が動作条件っぽい
生体分子(タンパク質、核酸、リガンドなど)の構造予測・相...
モデルファイルはオープンソースで商用利用可能. タンパク-リ...
AlphaFoldはMultiple Sequence Alignment(MSA)は必須。Boltz...
[[msa]]を立ててみた.
環境
#code(nonumber){{
[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.5 (Blue Onyx)
[root@rockylinux9 ~]# uname -r
5.14.0-503.14.1.el9_5.x86_64
[root@rockylinux9 ~]# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 570.172.0...
GCC version: gcc version 11.5.0 20240719 (Red Hat 11.5.0...
[root@rockylinux9 ~]#
}}
下準備
#code(nonumber){{
git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
pyenv install anaconda3-2024.10-1
}}
構築
#code(nonumber){{
[root@rockylinux9 ~]# source /apps/pyenv/versions/anacond...
[root@rockylinux9 ~]# conda create -n Boltz-2 pip python=...
[root@rockylinux9 ~]# conda activate Boltz-2
(Boltz-2) [root@rockylinux9 ~]# cd /apps/src
(Boltz-2) [root@rockylinux9 src]# git clone https://githu...
(Boltz-2) [root@rockylinux9 src]# cd boltz
(Boltz-2) [root@rockylinux9 boltz]#
(Boltz-2) [root@rockylinux9 boltz]# pip install -e .[cuda]
(Boltz-2) [root@rockylinux9 boltz]# conda list
:
biopython 1.84 pypi_0...
boltz 2.2.0 pypi_0...
:
python 3.12.11 h9e4cc4f_0_cpyt...
:
rdkit 2025.3.3 pypi_0...
:
torch 2.7.1 pypi_0...
:
(Boltz-2) [root@rockylinux9 boltz]# conda deactivate
[root@rockylinux9 boltz]#
}}
***environment-modules [#rf1d758d]
「/apps/modulefiles/boltz-2」
#code(nonumber){{
#%Module
module load PyMOL
set root /apps/pyenv/versions/anaconda3-2024.10-...
prepend-path PATH $root/bin
}}
「boltz --help」
#code(nonumber){{
Usage: boltz [OPTIONS] COMMAND [ARGS]...
Boltz1.
Options:
--help Show this message and exit.
Commands:
predict Run predictions with Boltz-1.
}}
「boltz predict --help」
#code(nonumber){{
Usage: boltz predict [OPTIONS] DATA
Run predictions with Boltz-1.
Options:
--out_dir PATH The path where to save the...
--cache PATH The directory where to dow...
model. Default is ~/.boltz.
--checkpoint PATH An optional checkpoint, wi...
Boltz-1 model by default.
--devices INTEGER The number of devices to u...
Default is 1.
--accelerator [gpu|cpu|tpu] The accelerator to use for...
is gpu.
--recycling_steps INTEGER The number of recycling st...
prediction. Default is 3.
--sampling_steps INTEGER The number of sampling ste...
prediction. Default is 200.
--diffusion_samples INTEGER The number of diffusion sa...
prediction. Default is 1.
--step_scale FLOAT The step size is related t...
which the diffusion proces...
distribution.The lower the...
among samples (recommended...
Default is 1.638.
--write_full_pae Whether to dump the pae in...
Default is True.
--write_full_pde Whether to dump the pde in...
Default is False.
--output_format [pdb|mmcif] The output format to use f...
Default is mmcif.
--num_workers INTEGER The number of dataloader w...
prediction. Default is 2.
--override Whether to override existi...
Default is False.
--seed INTEGER Seed to use for random num...
Default is None (no seedin...
--use_msa_server Whether to use the MMSeqs2...
generation. Default is Fal...
--msa_server_url TEXT MSA server url. Used only ...
is set.
--msa_pairing_strategy TEXT Pairing strategy to use. U...
--use_msa_server is set. O...
and 'complete'
--help Show this message and exit.
}}
***テスト [#c7c30c1c]
git にあるサンプルファイル「/apps/src/boltz/examples/affi...
#code(nonumber){{
[illya@rockylinux9 ~]$ cp /apps/src/boltz/examples/affini...
[illya@rockylinux9 ~]$ module load boltz-2
[illya@rockylinux9 ~]$ cat affinity.yaml
version: 1 # Optional, defaults to 1
sequences:
- protein:
id: A
sequence: MVTPEGNVSLVDESLLVGVTDEDRAVRSAHQFYERLIGLWA...
- ligand:
id: B
smiles: 'N[C@@H](Cc1ccc(O)cc1)C(=O)O'
properties:
- affinity:
binder: B
[illya@rockylinux9 ~]$
[illya@rockylinux9 ~]$ boltz predict affinity.yaml --out...
}}
「--cache」でmodelファイルの参照先を指定するが、なにも指...
っで「$HOME/.boltz」に何もないと自動的にモデルがダウンロ...
自分向けのフォルダなので自由に使えるが、サイズは 12GB に...
ユーザ毎に12GBが消費されるのが避けたいなら共通の場所に置...
どうも、そのフォルダは実行時に生成・更新されるファイルが...
どんなファイルが置かれるかは「/apps/src/boltz/src/boltz/m...
なので
#code(nonumber){{
mkdir /apps/boltz ; cd /apps/boltz
wget https://model-gateway.boltz.bio/boltz1_conf.ckpt
wget https://model-gateway.boltz.bio/boltz2_conf.ckpt
wget https://model-gateway.boltz.bio/boltz2_aff.ckpt
wget https://huggingface.co/boltz-community/boltz-1/resol...
wget https://huggingface.co/boltz-community/boltz-2/resol...
tar xf mols.tar
[root@rockylinux9 boltz]# ls -l /apps/boltz/
total 9909400
-rw-r--r--. 1 root root 3595352714 Nov 28 2024 boltz1_...
-rw-r--r--. 1 root root 2062139170 Jun 6 22:17 boltz2_...
-rw-r--r--. 1 root root 2286561469 Jun 6 22:15 boltz2_...
-rw-r--r--. 1 root root 345859128 Nov 18 2024 ccd.pkl
drwxr-sr-x. 2 22478 20626 1105920 Feb 19 03:01 mols
-rw-r--r--. 1 root root 1855662080 Jun 6 22:14 mols.tar
[root@rockylinux9 boltz]#
[root@rockylinux9 boltz]# chmod 777 /apps/boltz
}}
とする。
&size(10){「chmod 777」は微妙なので、各ホームディレクトリ...
っで下記で実行します
#code(nonumber){{
[illya@rockylinux9 ~]$ boltz predict affinity.yaml --out...
}}
結果は「out/boltz_results_affinity/predictions/affinity/a...
&ref(2025y09m15d_142925067.png,nolink,80%);
***Bolts-gui [#dba9ce6f]
本家様 [[https://github.com/ravishar313/boltz-gui>+https:...
&color(red){製作中};
下準備 npm のインストール. npmは18以上が必要なので
#code(nonumber){{
[root@rockylinux8 ~]# cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
[root@rockylinux8 ~]# dnf module list nodejs
Last metadata expiration check: 0:10:33 ago on Mon 23 Jun...
Rocky Linux 8 - AppStream
Name Stream Profiles ...
nodejs 10 [d][e] common [d], develop...
nodejs 12 common [d], develop...
nodejs 14 common [d], develop...
nodejs 16 common [d], develop...
nodejs 18 common [d], develop...
nodejs 20 common [d], develop...
nodejs 22 common, development...
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@rockylinux8 ~]#
[root@rockylinux8 ~]# dnf module install nodejs:18 <-...
}}
あとは各自のユーザディレクトリで作ってください
#code(nonumber){{
[saber@rockylinux8 ~]$ echo $PATH
/home/saber/.local/bin:/home/saber/bin:/usr/local/bin:/us...
[saber@rockylinux8 ~]$ curl -LsSf https://astral.sh/uv/in...
downloading uv 0.7.13 x86_64-unknown-linux-gnu
no checksums to verify
installing to /home/saber/.local/bin
uv
uvx
everything's installed!
[saber@rockylinux8 ~]$ uv --version
uv 0.7.13
[saber@rockylinux8 ~]$
}}
boltz-guiパッケージの取得
#code(nonumber){{
[saber@rockylinux8 ~]$ git clone https://github.com/ravis...
}}
backend の準備
#code(nonumber){{
[saber@rockylinux8 ~]$ cd boltz-gui/backend/
[saber@rockylinux8 backend]$ uv sync
}}
backend の起動
#code(nonumber){{
[saber@rockylinux8 ~]$ cd boltz-gui/backend/
[saber@rockylinux8 backend]$ source .venv/bin/activate
(boltz-gui) [saber@rockylinux8 backend]$ uv run run_serve...
(boltz-gui) [saber@rockylinux8 backend]$ uv run run_serve...
Starting Boltz GUI Server...
Server will be available at: http://localhost:6969
API documentation: http://localhost:6969/docs
Health check: http://localhost:6969/health
Press Ctrl+C to stop the server
INFO: Will watch for changes in these directories: ['...
INFO: Uvicorn running on http://0.0.0.0:6969 (Press C...
INFO: Started reloader process [2120] using WatchFiles
INFO: Started server process [2122]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO:watchfiles.main:11 changes detected
:
(終了するには CTRL+C で止めて)
^CINFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [2122]
INFO: Stopping reloader process [2120]
(boltz-gui) [saber@rockylinux8 backend]$ deactivate
[saber@rockylinux8 backend]$
}}
backend の起動後に 別のターミナルを開いて frontend の準備
#code(nonumber){{
[saber@rockylinux8 ~]$ cd boltz-gui/frontend/
[saber@rockylinux8 frontend]$ npm install
}}
frontend を起動します
#code(nonumber){{
[saber@rockylinux8 frontend]$ npm run dev
(終了するには CTRL+C で止めます)
}}
ページ名:
1