本家様https://github.com/keitaroyam/servalcat

Servalcat(Structure refinement and validation for crystallography and single particle analysis)
deepL先生訳「結晶構造解析と単粒子解析のための構造の精密化と検証」

gitのサイトに書かれているように

pip install servalcat

でインストール可能の様子.

ここではpyenv/minicondaでservalcat向けの環境を作ってそこにservalcat を用意してみた

[root@centos7 ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
 
[root@centos7 ~]# git clone https://github.com/yyuu/pyenv.git /apps/pyenv
[root@centos7 ~]# export PYENV_ROOT=/apps/pyenv
[root@centos7 ~]# export PATH=$PYENV_ROOT/bin:$PATH
[root@centos7 ~]# pyenv install miniconda3-4.7.12
[root@centos7 ~]# pyenv global miniconda3-4.7.12
[root@centos7 ~]# pyenv versions
  system
* miniconda3-4.7.12 (set by /apps/pyenv/version)
 
[root@centos7 ~]# export PATH=$PYENV_ROOT/versions/miniconda3-4.7.12/bin/:$PATH
 
[root@centos7 ~]# conda config --add channels conda-forge
[root@centos7 ~]# conda config --remove channels defaults
[root@centos7 ~]# conda info
 
     active environment : None
       user config file : /root/.condarc
 populated config files : /root/.condarc
          conda version : 4.7.12
    conda-build version : not installed
         python version : 3.7.4.final.0
       virtual packages : __cuda=12.0
       base environment : /apps/pyenv/versions/miniconda3-4.7.12  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /apps/pyenv/versions/miniconda3-4.7.12/pkgs
                          /root/.conda/pkgs
       envs directories : /apps/pyenv/versions/miniconda3-4.7.12/envs
                          /root/.conda/envs
               platform : linux-64
             user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.4 Linux/3.10.0-1160.el7.x86_64 centos/7.9.2009 glibc/2.17
                UID:GID : 0:0
             netrc file : None
           offline mode : False
 
[root@centos7 ~]#
[root@centos7 ~]# conda update conda -y
 
(以上でpyenv/miniconda環境の構築が終わって、次にservalcat環境を作る)
[root@centos7 ~]# conda create -n servalcat pip
[root@centos7 ~]# source activate servalcat
(servalcat) [root@centos7 ~]# pip install servalcat
(servalcat) [root@centos7 ~]# conda deactivate
[root@centos7 ~]#

EnvironmentModules

[root@centos7 ~]# vi /apps/modulefiles/servalcat
#%Module1.0
set          root /apps/pyenv/versions/miniconda3-4.7.12/envs/servalcat
prepend-path PATH $root/bin
 
[root@centos7 ~]#

使ってみる

REFMAC5との連携があるので、ccp4のロードも行う

[saber@centos7 ~]$ module use --append /apps/modulefiles/     <-- この部分は$HOME/.bashrcらに記載すれば宜しいかと
[saber@centos7 ~]$ module load ccp4
[saber@centos7 ~]$ module load servalcat
 
[saber@centos7 ~]$ servalcat
usage: servalcat [-h] [--skip_test] [-v]
                 {sfcalc,shiftback,refine_spa,refine_cx,fsc,fofc,trim,translate,localcc,sigmaa,util,refmac5} ...
 
A tool for model refinement and map calculation for cryo-EM SPA.
 
positional arguments:
  {sfcalc,shiftback,refine_spa,refine_cx,fsc,fofc,trim,translate,localcc,sigmaa,util,refmac5}
 
options:
  -h, --help            show this help message and exit
  --skip_test           Skip installation test
  -v, --version         show program's version number and exit
 
# Finished on 2022-12-21 23:50:18.340847
 
[saber@centos7 ~]$

offline環境へ持っていく

[root@centos7 ~]# conda activate servalcat
(servalcat) [root@centos7 ~]# pip freeze > requirements.txt
 
(servalcat) [root@centos7 ~]# cat requirements.txt
gemmi==0.5.7
numpy==1.24.0
pandas==1.5.2
python-dateutil==2.8.2
pytz==2022.7
scipy==1.9.3
servalcat==0.2.122
six==1.16.0
 
(servalcat) [root@centos7 ~]# mkdir servalcat-packages
 
(servalcat) [root@centos7 ~]# pip download -d ./servalcat-packages -r ./requirements.txt
Collecting gemmi==0.5.7
  Using cached gemmi-0.5.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting numpy==1.24.0
  Using cached numpy-1.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Collecting pandas==1.5.2
  Using cached pandas-1.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB)
Collecting python-dateutil==2.8.2
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz==2022.7
  Using cached pytz-2022.7-py2.py3-none-any.whl (499 kB)
Collecting scipy==1.9.3
  Using cached scipy-1.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.4 MB)
Collecting servalcat==0.2.122
  Using cached servalcat-0.2.122-py3-none-any.whl (114 kB)
Collecting six==1.16.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Saved ./servalcat-packages/gemmi-0.5.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./servalcat-packages/numpy-1.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./servalcat-packages/pandas-1.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./servalcat-packages/python_dateutil-2.8.2-py2.py3-none-any.whl
Saved ./servalcat-packages/pytz-2022.7-py2.py3-none-any.whl
Saved ./servalcat-packages/scipy-1.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./servalcat-packages/servalcat-0.2.122-py3-none-any.whl
Saved ./servalcat-packages/six-1.16.0-py2.py3-none-any.whl
Successfully downloaded gemmi numpy pandas python-dateutil pytz scipy servalcat six
 
(servalcat) [root@centos7 ~]# ls -l servalcat-packages/
total 65136
-rw-r--r--. 1 root root  3097735 Dec 22 00:20 gemmi-0.5.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root 17266259 Dec 22 00:20 numpy-1.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root 12013615 Dec 22 00:20 pandas-1.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root   247702 Dec 22 00:20 python_dateutil-2.8.2-py2.py3-none-any.whl
-rw-r--r--. 1 root root   499364 Dec 22 00:20 pytz-2022.7-py2.py3-none-any.whl
-rw-r--r--. 1 root root 33430216 Dec 22 00:20 scipy-1.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root   114766 Dec 22 00:20 servalcat-0.2.122-py3-none-any.whl
-rw-r--r--. 1 root root    11053 Dec 22 00:20 six-1.16.0-py2.py3-none-any.whl
 
(servalcat) [root@centos7 ~]#

Singularity

Singularityならファイルとして実行環境を扱えるので、ある意味便利

[root@centos7 ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
 
[root@centos7 ~]# yum install epel-release
[root@centos7 ~]# yum install singularity apptainer-suid
 
[root@centos7 ~]# singularity build --sandbox servalcat docker://python:3.8.12-bullseye
 
[root@centos7 ~]#  singularity shell --writable servalcat
Apptainer>
Apptainer> pip install servalcat
Apptainer>
Apptainer> exit
exit
[root@centos7 ~]#
[root@centos7 ~]# singularity build servalcat.sif servalcat
[root@centos7 ~]# ls -lh servalcat.sif
-rwxr-xr-x. 1 root root 375M Dec 22 00:30 servalcat.sif
[root@centos7 ~]#

使ってみる

[illya@centos7 ~]$ singularity shell /apps/servalcat.sif
Apptainer> servalcat
usage: servalcat [-h] [--skip_test] [-v]
                 {sfcalc,shiftback,refine_spa,refine_cx,fsc,fofc,trim,translate,localcc,sigmaa,util,refmac5} ...
 
A tool for model refinement and map calculation for cryo-EM SPA.
 
positional arguments:
  {sfcalc,shiftback,refine_spa,refine_cx,fsc,fofc,trim,translate,localcc,sigmaa,util,refmac5}
 
optional arguments:
  -h, --help            show this help message and exit
  --skip_test           Skip installation test
  -v, --version         show program's version number and exit
 
# Finished on 2022-12-22 00:37:47.175981
 
Apptainer> servalcat --version
Servalcat 0.2.122 with Python 3.8.12 (gemmi 0.5.7, scipy 1.9.3, numpy 1.24.0, pandas 1.5.2)
 
# Finished on 2022-12-22 00:37:51.354880
 
Apptainer> exit
exit
[illya@centos7 ~]$

ぁrefmac5を忘れた...

ぇっとsingularity のbind機能を活かします

[illya@centos7 ~]$ singularity shell -B /apps:/apps /apps/servalcat.sif
Apptainer> 
Apptainer> source /apps/ccp4-8.0/bin/ccp4.setup-sh
Apptainer> 
Apptainer> which refmac5
/apps/ccp4-8.0/bin/refmac5
Apptainer>
Apptainer> servalcat --version
Servalcat 0.2.122 with Python 3.8.12 (gemmi 0.5.7, scipy 1.9.3, numpy 1.24.0, pandas 1.5.2)
 
# Finished on 2022-12-22 01:05:39.793055
 
Apptainer> exit
[illya@centos7 ~]$

これで行けるかな

pip未掲載の最新版を使いたい

https://github.com/keitaroyam/servalcat/actionsにてcommitされた時点で自動で作られたバイナリが用意されている
参照先: https://keitaroyam.github.io/posts/2023/05/01/servalcat_installation/

っでこれを使ってみる
最新(表の上位)をクリックします
2023y06m20d_230534412.png
「wheels2.zip」がダウンロードされます. これを計算機に運び込んで、展開します

[root@rockylinux9 ~]# cd /apps/src/
[root@rockylinux9 src]# mkdir servalcat
[root@rockylinux9 src]# cd servalcat/
[root@rockylinux9 servalcat]#
(「wheels2.zip」をコピー)
[root@rockylinux9 servalcat]# ls -lh
total 15M
-rw-r--r--. 1 root root 15M Jun 20 22:30 wheels2.zip
[root@rockylinux9 servalcat]#
(展開)
[root@rockylinux9 servalcat]# unzip wheels2.zip
 
[root@rockylinux9 servalcat]# ls -l
total 28884
-rw-r--r--. 1 root root  1071455 Jun 19 11:03 servalcat-0.4.27-cp310-cp310-macosx_10_9_x86_64.whl
-rw-r--r--. 1 root root   951255 Jun 19 11:03 servalcat-0.4.27-cp310-cp310-macosx_11_0_arm64.whl
-rw-r--r--. 1 root root  1129826 Jun 19 10:49 servalcat-0.4.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root  1071368 Jun 19 11:03 servalcat-0.4.27-cp311-cp311-macosx_10_9_x86_64.whl
-rw-r--r--. 1 root root   951175 Jun 19 11:03 servalcat-0.4.27-cp311-cp311-macosx_11_0_arm64.whl
-rw-r--r--. 1 root root  1130328 Jun 19 10:49 servalcat-0.4.27-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root  1048899 Jun 19 11:03 servalcat-0.4.27-cp37-cp37m-macosx_10_9_x86_64.whl
-rw-r--r--. 1 root root  1149270 Jun 19 10:49 servalcat-0.4.27-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root  1071352 Jun 19 11:03 servalcat-0.4.27-cp38-cp38-macosx_10_9_x86_64.whl
-rw-r--r--. 1 root root   951200 Jun 19 11:03 servalcat-0.4.27-cp38-cp38-macosx_11_0_arm64.whl
-rw-r--r--. 1 root root  1129859 Jun 19 10:49 servalcat-0.4.27-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root  1071427 Jun 19 11:03 servalcat-0.4.27-cp39-cp39-macosx_10_9_x86_64.whl
-rw-r--r--. 1 root root   951457 Jun 19 11:03 servalcat-0.4.27-cp39-cp39-macosx_11_0_arm64.whl
-rw-r--r--. 1 root root  1130342 Jun 19 10:49 servalcat-0.4.27-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
-rw-r--r--. 1 root root 14739449 Jun 20 22:30 wheels2.zip
[root@rockylinux9 servalcat]#

このwhlを入れます.
っがその前にcondaの環境を作ります

[root@rockylinux9 ~]# export PYENV_ROOT=/apps/pyenv
[root@rockylinux9 ~]# export PATH=$PYENV_ROOT/bin:$PATH
[root@rockylinux9 ~]# export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
 
[root@rockylinux9 ~]# conda create -n servalcat python=3.11
 
[root@rockylinux9 ~]# source activate servalcat
 
(servalcat) [root@rockylinux9 ~]# 
(servalcat) [root@rockylinux9 ~]# python -mpip install -U --find-link=/apps/src/servalcat/ servalcat
Looking in links: /apps/src/servalcat/
Processing /apps/src/servalcat/servalcat-0.4.27-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Collecting packaging (from servalcat)
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting numpy>=1.15 (from servalcat)
  Using cached numpy-1.25.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.6 MB)
Collecting scipy (from servalcat)
  Using cached scipy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.1 MB)
Collecting pandas>=0.24.2 (from servalcat)
  Using cached pandas-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting gemmi==0.6.2 (from servalcat)
  Using cached gemmi-0.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB)
Collecting python-dateutil>=2.8.2 (from pandas>=0.24.2->servalcat)
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz>=2020.1 (from pandas>=0.24.2->servalcat)
  Using cached pytz-2023.3-py2.py3-none-any.whl (502 kB)
Collecting tzdata>=2022.1 (from pandas>=0.24.2->servalcat)
  Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas>=0.24.2->servalcat)
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pytz, gemmi, tzdata, six, packaging, numpy, scipy, python-dateutil, pandas, servalcat
Successfully installed gemmi-0.6.2 numpy-1.25.0 packaging-23.1 pandas-2.0.2 python-dateutil-2.8.2 pytz-2023.3 scipy-1.10.1 servalcat-0.4.27 six-1.16.0 tzdata-2023.3
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
 
(servalcat) [root@rockylinux9 ~]#
(servalcat) [root@rockylinux9 ~]# conda deactivate
[root@rockylinux9 ~]#

そして

[root@rockylinux9 ~]# vi /apps/modulefiles/servalcat
#%Module1.0
set          root /apps/pyenv/versions/anaconda3-2023.03/envs/servalcat
prepend-path PATH $root/bin
 
[root@rockylinux9 ~]#

とEnvironment-moduleを整備して

[saber@rockylinux9 ~]$ module use /apps/modulefiles/
[saber@rockylinux9 ~]$ module load servalcat
[saber@rockylinux9 ~]$ servalcat --version
Servalcat 0.4.27 with Python 3.11.3 (gemmi 0.6.2, scipy 1.10.1, numpy 1.25.0, pandas 2.0.2)
 
# Finished on 2023-06-20 23:15:45.960244
 
[saber@rockylinux9 ~]$

となる

最新の60件
2024-12-08 2024-12-05 2024-12-04 2024-11-28 2024-11-23 2024-11-22 2024-11-15 2024-11-14 2024-11-12 2024-11-06 2024-11-05 2024-11-04 2024-11-02 2024-11-01 2024-10-29 2024-10-28 2024-10-27 2024-10-23 2024-10-18 2024-10-17 2024-10-15 2024-10-14 2024-10-13 2024-10-11 2024-10-10 2024-10-09 2024-10-08 2024-10-05 2024-10-04 2024-10-03 2024-10-02 2024-10-01 2024-09-30 2024-09-29 2024-09-28 2024-09-27 2024-09-22 2024-09-20 2024-09-17

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-06-20 (火) 23:15:59