本家様 https://github.com/3dem/model-angelo

ModelAngelo is an automatic atomic model building program for cryo-EM maps.

作ってみた

[root@centos7 ~]# cd /apps/src
 
[root@centos7 src]# git clone https://github.com/3dem/model-angelo
[root@centos7 src]# cd model-angelo
[root@centos7 model-angelo]#

「model-angelo」フォルダにある「install_script.sh」を実行すれば構築は完了っぽいのですが、中身を見るとこのスクリプトの中からcondaを実行するようなので
condaを実行できるようにしておきます

ここではtopazとかで既にanacondaを使ってるのでそれを使います. ドキュメントではminiconda3を勧めてますが

export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
export PATH=$PYENV_ROOT/versions/anaconda3-2022.05/bin:$PATH

アプリのインストールとともにモデルファイルの取得もできるようで、そのための環境変数「TORCH_HOME」を定義しておきます。
ここでは「/apps/ModelAngelo」にモデルファイルを配置させます

[root@centos7 model-angelo]# mkdir /apps/ModelAngelo
 
[root@centos7 model-angelo]# export TORCH_HOME=/apps/ModelAngelo

これで準備ができたので「install_script.sh」を実行する.

[root@centos7 model-angelo]# source install_script.sh --download-weights
Downloading weights as well because flag -w or --download-weights was specified
Collecting package metadata (current_repodata.json): done
Solving environment: done
 
 
(「conda create -n model_angelo python=3.9 -y」が実行されている)
 
 
 
Downloading and Extracting Packages
_libgcc_mutex-0.1    | 3 KB      | ######################################################################################################################################## | 100%
_openmp_mutex-5.1    | 21 KB     | ######################################################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate model_angelo
#
# To deactivate an active environment, use
#
#     $ conda deactivate
 
Collecting package metadata (current_repodata.json): done
Solving environment: done
 
 
(「conda install -y pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch」が実行されている)
 
 
Downloading and Extracting Packages
pytorch-mutex-1.0    | 3 KB      | ######################################################################################################################################## | 100%
numpy-1.23.1         | 11 KB     | ######################################################################################################################################## | 100%
blas-1.0             | 6 KB      | ######################################################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: / By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html
 
done
 
(「$python_exc -mpip install -r requirements.txt」が実行されている)
(「$python_exc setup.py install」が実行されている)
 
 
 
Writing weights to /apps/ModelAngelo
Please make sure you have set the environment variable TORCH_HOME
to a suitable directory, visible to all relevant users!
Setting up bundle with name: original for the first time.
100%|????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????| 2.58G/2.58G [2:04:04<00:00, 373kB/s]
Bundle original successfully installed.
Setting up language model bundle with name: esm1b_t33_650M_UR50S for the first time.
100%|?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????| 7.29G/7.29G [04:50<00:00, 27.0MB/s]
100%|?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????| 3.10k/3.10k [00:00<00:00, 4.69MB/s]
Successful!
Path to model is /apps/ModelAngelo/hub/checkpoints/model_angelo/original
Please make sure you have set the environment variable TORCH_HOME
to a suitable directory, visible to all relevant users!
Setting up bundle with name: original_no_seq for the first time.
100%|????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????| 2.05G/2.05G [1:38:19<00:00, 373kB/s]
Bundle original_no_seq successfully installed.
Successful!
Path to model is /apps/ModelAngelo/hub/checkpoints/model_angelo/original_no_seq
 
(model_angelo) [root@centos7 model-angelo]#
(model_angelo) [root@centos7 model-angelo]# source deactivate
 
[root@centos7 model-angelo]#

モデルファイルを置くようにした「/apps/ModelAngelo」は下記のようになる

[root@centos7 ~]# cd /apps/ModelAngelo/
[root@centos7 ModelAngelo]# ls -lhR
.:
total 0
drwxr-xr-x. 3 root root 25 Oct 16 02:44 hub
 
./hub:
total 0
drwxr-xr-x. 3 root root 107 Oct 16 04:53 checkpoints
 
./hub/checkpoints:
total 7.3G
-r-xr-xr-x. 1 root root 3.1K Oct 16 04:53 esm1b_t33_650M_UR50S-contact-regression.pt
-r-xr-xr-x. 1 root root 7.3G Oct 16 04:53 esm1b_t33_650M_UR50S.pt
drwxr-xr-x. 4 root root   45 Oct 16 06:31 model_angelo
 
./hub/checkpoints/model_angelo:
total 0
drwxr-xr-x. 4 root root 70 Oct 16 04:48 original
drwxr-xr-x. 4 root root 70 Oct 16 06:31 original_no_seq
 
./hub/checkpoints/model_angelo/original:
total 8.0K
drwxr-xr-x. 3 root root  60 Oct 16 04:48 c_alpha
-rw-r--r--. 1 root root 752 Oct 16 04:48 config.json
drwxr-xr-x. 3 root root  67 Oct 16 04:48 gnn
-rw-r--r--. 1 root root  29 Oct 16 04:48 success.txt
 
./hub/checkpoints/model_angelo/original/c_alpha:
total 701M
-rw-r--r--. 1 root root 701M Oct 16 04:48 chkpt.torch
-rw-r--r--. 1 root root 9.0K Oct 16 04:48 model.py
drwxr-xr-x. 2 root root   34 Oct 16 04:48 __pycache__
 
./hub/checkpoints/model_angelo/original/c_alpha/__pycache__:
total 8.0K
-rw-r--r--. 1 root root 6.2K Oct 16 04:48 model.cpython-39.pyc
 
./hub/checkpoints/model_angelo/original/gnn:
total 2.2G
-rw-r--r--. 1 root root 2.2G Oct 16 04:48 chkpt_301201.torch
-rw-r--r--. 1 root root  400 Oct 16 04:48 model.py
drwxr-xr-x. 2 root root   34 Oct 16 04:48 __pycache__
 
./hub/checkpoints/model_angelo/original/gnn/__pycache__:
total 4.0K
-rw-r--r--. 1 root root 957 Oct 16 04:48 model.cpython-39.pyc
 
./hub/checkpoints/model_angelo/original_no_seq:
total 8.0K
drwxr-xr-x. 2 root root  41 Oct 16 06:31 c_alpha
-rw-r--r--. 1 root root 752 Oct 16 06:31 config.json
drwxr-xr-x. 2 root root  48 Oct 16 06:31 gnn
-rw-r--r--. 1 root root  29 Oct 16 06:31 success.txt
 
./hub/checkpoints/model_angelo/original_no_seq/c_alpha:
total 701M
-rw-r--r--. 1 root root 701M Oct 16 06:31 chkpt.torch
-rw-r--r--. 1 root root 9.0K Oct 16 06:31 model.py
 
./hub/checkpoints/model_angelo/original_no_seq/gnn:
total 1.6G
-rw-r--r--. 1 root root 1.6G Oct 16 06:31 chkpt_529999.torch
-rw-r--r--. 1 root root  417 Oct 16 06:31 model.py
[root@centos7 ModelAngelo]#

EnvironmentModules

[root@centos7 ~]# vi /apps/modulefiles/ModelAngelo
#%Module
prepend-path PATH /apps/pyenv/versions/anaconda3-2022.05/envs/model_angelo/bin
 
[root@centos7 ~]#
[illya@centos7 ~]$ module use --append /apps/modulefiles
[illya@centos7 ~]$ module load ModelAngelo
 
 
 
[illya@centos7 ~]$ model_angelo build -h
usage: model_angelo build [-h] --volume-path VOLUME_PATH --fasta-path FASTA_PATH [--output-dir OUTPUT_DIR] [--mask-path MASK_PATH] [--device DEVICE] [--config-path CONFIG_PATH]
                          [--model-bundle-name MODEL_BUNDLE_NAME] [--model-bundle-path MODEL_BUNDLE_PATH]
 
Welcome to ModelAngelo! Have a look around...
This is the build command, so you need:
1) A cryo-EM map .mrc file, passed to --volume-path/--v/-v
2) A FASTA file with all potential amino acid sequences found in the map,
   passed to --fasta-path/--f/-f
You can also provide a mask for the volume using --mask-path/--m/-m
You can also input a custom config file with --config-path/--c/-c
 
optional arguments:
  -h, --help            show this help message and exit
 
Main arguments:
  These are the only arguments a typical user will need.
 
  --volume-path VOLUME_PATH, -v VOLUME_PATH, --v VOLUME_PATH
                        input volume
  --fasta-path FASTA_PATH, -f FASTA_PATH, --f FASTA_PATH
                        input sequence FASTA file
  --output-dir OUTPUT_DIR, -o OUTPUT_DIR, --o OUTPUT_DIR
                        path to output directory
 
Additional arguments:
  These are sometimes useful.
 
  --mask-path MASK_PATH, -m MASK_PATH, --m MASK_PATH
                        path to mask file
  --device DEVICE, -d DEVICE, --d DEVICE
                        compute device, pick one of {cpu, gpu_number}. Default set to find an available GPU.
 
Advanced arguments:
  These should *not* be changed unless the user is aware of what they do.
 
  --config-path CONFIG_PATH, -c CONFIG_PATH, --c CONFIG_PATH
                        config file
  --model-bundle-name MODEL_BUNDLE_NAME
                        Inference model bundle name
  --model-bundle-path MODEL_BUNDLE_PATH
                        Inference model bundle path. If this is set, --model-bundle-name is not used.
[illya@centos7 ~]$

トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2022-10-16 (日) 07:01:29 (43d)