本家様 http://blake.bcm.edu/emanwiki/EMAN2

バージョン番号が良く分からなかったが
EMAN2.1、EMAN2.2、EMAN2.3とかはメジャーバージョン.
EMAN2.11とEMAN2.12は「EMAN2.1」のマイナーバージョンアップ版の位置付けみたい.

EMAN2.1 ------------> EMAN2.2 --------> EMAN2.3 --------> EMAN2.9
  +-- EMAN2.11          +-- EMAN2.21      +-- EMAN2.31      +-- EMAN2.91
  +-- EMAN2.12          +-- EMAN2.22

macOSについてはEMAN2/macOS
EMAN2/windowsPC

eman2.91

20210308にリリース https://cryoem.bcm.edu/cryoem/downloads/view_eman2_version/32
サイトから「eman2.91_sphire1.4_sparx.linux64.sh」をダウンロードします
「eman2.91_sphire1.4_sparx_huge.linux64.sh」は関連ライブラリを含んだ完全版. ネットに繋げられないクローズドな計算機向けみたい

[root@c ~]# bash /apps/src/eman2.91_sphire1.4_sparx.linux64.sh
 
Welcome to EMAN2-SPHIRE-SPARX combined
 
EMAN2-SPHIRE-SPARX will now be installed into this location:
/root/eman2-sphire-sparx
 
  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below
 
[/root/eman2-sphire-sparx] >>>  /apps/eman2.91        <--- インストール先を指定
PREFIX=/apps/eman2.91
 :
(必要なパッケージがダウンロードされ、インストールが進む)
 :
by running conda init? [yes|no]
[no] >>> no
 
 
You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:
 
eval "$(/apps/eman2.91/bin/conda shell.YOUR_SHELL_NAME hook)"
 
To install conda's shell functions for easier access, first activate, then:
 
conda init
 
If you'd prefer that conda's base environment not be activated on startup,
   set the auto_activate_base parameter to false:
 
conda config --set auto_activate_base false
 
Thank you for installing EMAN2-SPHIRE-SPARX!
[root@c ~]#

動作テスト

[saber@c ~]$ e2version.py
EMAN 2.91 final ( GITHUB: 2021-03-08 11:36 - commit: 81caed2 )
Your Python version is: 3.7.9
 
[saber@c ~]$ e2speedtest.py
This could take a few minutes. Please be patient.
Initializing
....................
....................
....................
....................
....................
....................
....................
....................
 
Your machines speed factor = 0.6262 +- 0.0575 (0.0367 +- 0.00371 sec)
 
[saber@c ~]$ e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24
1 images, processing 0-0 stepping by 1
1 images
 
[saber@c ~]$ e2display.py test.hdf   <-- ここだけ表示されない時があった..

eman2.31

EMAN2のサイトから「eman2.31_sphire1.3.linux64.sh」をダウンロードします
そして

[root@c ~]# bash /apps/src/eman2.31_sphire1.3.linux64.sh
 
Welcome to EMAN2 2.31
 
EMAN2 will now be installed into this location:
/root/EMAN2
 
  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below
 
[/root/EMAN2] >>> /apps/eman2.31           <-- インストール先を指定
PREFIX=/apps/eman2.31
 :
 :
INSTALLATION IS NOW COMPLETE
 
Please, go to http://blake.bcm.edu/emanwiki/EMAN2/Install/BinaryInstallAnaconda
for detailed installation instructions, testing and troubleshooting information.
If this installation is on a Linux cluster,
you will require additional steps before installation is complete!
 
cat: /apps/eman2.31/.messages.txt: No such file or directory
installation finished.
Do you wish the installer to initialize EMAN2
in your /root/.bashrc ? [yes|no]
[no] >>> no                              <-- yesでも構わないが、、、noにしてます
 
Initializing EMAN2 in /root/.bashrc
A backup will be made to: /root/.bashrc-eman2.bak
 
 
For this change to become active, you have to open a new terminal.
 
Thank you for installing EMAN2!
[root@c ~]#

eman2.31を使うにはPATH(/apps/eman2.31/bin)を加えればいいのだが、このpathに含まれるopenmpiには注意が必要

[root@c ~]# /apps/eman2.31/bin/ompi_info | grep "dl support"
              dl support: no
[root@c ~]#

とdl(dlopen)が無効化されているopenmpiです。
relionでコンパイル時に使用しているOS提供のopenmpiとかでは

[root@c ~]# module load mpi
[root@c ~]# ompi_info |grep "dl support"
              dl support: yes
[root@c ~]#

とdl(dlopen)が有効である。
なのでEnvironmentModulesを使ってrelionとは排他的に実行できるようにする必要があるみたい
こんな感じで「conflict」を使って制御する

[root@c ~]# /etc/modulefiles/eman/2.31
#%Module1.0
conflict mpi
conflict relion
conflict eman
 
set EMAN2DIR /apps/eman2.31
setenv EMAN2DIR $EMAN2DIR
prepend-path PATH $EMAN2DIR/bin
[root@c ~]#

ソースコードから作ってみる

上記の「eman2.31_sphire1.3.linux64.sh」はpython2.7が内包されpre-buildされています。
なのでCentOS8で標準である python3.6 に関係なく(PATHの設定が必要なものの)そのまま使えます。
もちろん mpirun も

ここではCentOS8でソースコードから eman2.31 を作ってみる。

方針としては

  • システム由来の python3 を使ってコンパイル
  • pyenv/anaconda でeman2.31を動かす python3 仮想環境を作ってそこに入れる

の2通りがあるかと思う。ここではcrYOLO,Cinderella,JANNI,topaz,PyEMのように
後者の pyenv/anaconda でpython3 実行仮想環境を用意して、そこにインストールを行ってみる。
PyEM#w42b9b88と内容が被ります

まずは pyenv/anaconda の敷設 *既にあるなら不要

git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
eval "$(pyenv init - --no-rehash)"
 
pyenv install anaconda3-5.3.1
pyenv global anaconda3-5.3.1
pyenv versions
export PATH=$PYENV_ROOT/versions/anaconda3-5.3.1/bin/:$PATH
conda update conda

次に、eman2.31向けの python3 実行仮想環境を作る

[root@centos8 ~]# conda create -n eman2 python=3.7
[root@centos8 ~]# source activate eman2
(eman2) [root@centos8 ~]#

これでeman2.31向けの python3 実行仮想環境に移った。

eman2のソースコードを入手します. 取得はgitで.

(eman2) [root@centos8 ~]# cd /apps/src
(eman2) [root@centos8 src]# git clone https://github.com/cryoem/eman2
(eman2) [root@centos8 src]# cd eman2/
(eman2) [root@centos8 eman2]# git checkout -b v2.31 refs/tags/v2.31
(eman2) Switched to a new branch 'v2.31'
(eman2) [root@centos8 eman2]# git branch
  master
* v2.31
(eman2) [root@centos8 eman2]#

その後、コンパイル場所を作って、移って

(eman2) [root@centos8 eman2]# mkdir b && cd b
(eman2) [root@centos8 b]#

cmakeでconfigureしてみると

(eman2) [root@centos8 b]# cmake ..

ここでパッケージが足りないとか言われます。
下記パッケージをインストールしました.

(CentOSのパッケージインストール)
(eman2) [root@centos8 ~]# dnf --enablerepo=PowerTools install gsl-devel libtiff-devel libjpeg-turbo-devel libpng-devel freeglut-devel
 
hdf5-devel ftgl-devel  PyQt5 boost-devel
 
(eman2.31向けの python3 実行仮想環境へのpythonパッケージのインストール)
(eman2) [root@centos8 ~]# conda install fftw numpy boost  
 
 
 
future pyopengl pyqt=5 matplotlib
(eman2) [root@centos8 ~]# conda install -c conda-forge hdf5 
 
 
bsddb3              <-- conda-forgeリポジトリから
(eman2) [root@centos8 ~]# conda install -c cryoem ftgl                          <-- cryoemリポジトリから

これが終わって再び cmake で configure します

(eman2) [root@centos8 ~]# cd /apps/src/eman2/b
(eman2) [root@centos8 b]# cmame ..
 
(eman2) [root@centos8 b]# make
(eman2) [root@centos8 b]# make install

eman2のバイナリーが、「/apps/pyenv/versions/anaconda3-5.3.1/envs/eman2/bin」にインストールされます

使い方は

[illya@centos8 ~]$ export PYENV_ROOT=/apps/pyenv
[illya@centos8 ~]$ export PATH=$PYENV_ROOT/bin:$PATH
[illya@centos8 ~]$ eval "$(pyenv init - --no-rehash)"
[illya@centos8 ~]$ export PATH=$PYENV_ROOT/versions/anaconda3-5.3.1/bin/:$PATH
 
[illya@centos8 ~]$ source activate eman2
(eman2) [illya@centos8 ~]$

として「e2projectmanager.py」と実行します。

あるいはEnvironmentModulesを活用して「/etc/modulefiles」に

[root@centos8 ~]# /etc/modulefiles/eman2/2.31
#%Module1.0
set EMAN2DIR /apps/pyenv/versions/anaconda3-5.3.1/envs/eman2
setenv EMAN2DIR $EMAN2DIR
prepend-path PATH $EMAN2DIR/bin

と用意して、

[illya@centos8 ~]$ module load eman2/2.31
 
[illya@centos8 ~]$ e2projectmanager.py

とするのが良いかもしれない

eman2.31向けのmpirunを用意する

計算はthreadsで行えるので特段必要なのかな?とも思いますが、複数の計算機を使って計算を行うには
mpiが必要で、ここではソースから作ったeman2.31向けの openmpi を調理します


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2021-03-12 (金) 20:02:35 (740d)