本家様 https://dock.docking.org/Overview_of_DOCK/index.htm
言わずもがななDock.
ここでは DOCK 3.7 を扱います.
付属のtest(ligand-test.sh)を実行するにはamsolが必要なのですが、これが古いg77とかでないとコンパイルできないようでSingularityとかのコンテナで作った方がいいみたい.
新しい DOCK 6は最新でも行けるのかも(未確認です)
DOCK 3.7 †
https://dock.compbio.ucsf.edu/DOCK3.7/
https://sites.google.com/site/dock37wiki
ライセンスコードが必要で
https://dock.compbio.ucsf.edu/Online_Licensing/dock_license_application.html
にて申請して、取得した情報を元にプログラムを取得します
ここでは「dock.3.7_source.tar.gz」(317M)を得ました
これを展開
[root@centos7 ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@centos7 ~]# cd /apps/
[root@centos7 apps]# tar xf src/dock.3.7_source.tar.gz
「DOCK-3.7.5/」として展開されます
[root@centos7 apps]# cd DOCK-3.7.5/
[root@centos7 DOCK-3.7.5]# ls -l
total 24
drwxr-xr-x. 2 root root 4096 Jan 8 2021 analysis
drwxr-xr-x. 2 root root 181 Jan 8 2021 bin
drwxr-xr-x. 4 root root 4096 Jan 8 2021 common
drwxr-xr-x. 7 root root 94 Jan 8 2021 docking
drwxr-xr-x. 3 root root 38 Jan 8 2021 install
drwxr-xr-x. 13 root root 203 Jan 8 2021 ligand
drwxr-xr-x. 23 root root 4096 Jan 8 2021 proteins
-rw-r--r--. 1 root root 2737 Jan 8 2021 README.md
drwxr-xr-x. 3 root root 4096 Jan 8 2021 test
-rw-r--r--. 1 root root 789 Jan 8 2021 TRICKS.md
[root@centos7 DOCK-3.7.5]#
dockのre-compile †
この取得した「dock.3.7_source.tar.gz」(317M)には一応binaryが入ってます.
ただ、実行すると下記のようなメッセージが流れて大丈夫かなと思ってしまいます
[root@centos7 DOCK-3.7.5]# docking/DOCK/bin/dock64
Warning: ieee_inexact is signaling
FORTRAN STOP
[root@centos7 DOCK-3.7.5]#
多分そのままでも大丈夫なのだろうが、一応「/apps/DOCK-3.7.5/install/README.md」にコンパイル方法が記載されているのでre-compileしてみた
[root@centos7 ~]# yum install compat-gcc-44-gfortran zlib-devel csh
[root@centos7 ~]# cd /apps/DOCK-3.7.5/docking/DOCK/src/libfgz
[root@centos7 libfgz]# make COMPILER=gnu
[root@centos7 libfgz]# cd ../i386/
[root@centos7 i386]# vi Makefile.gnu
ここで提供されている「Makefile.gnu」を修正します
| --- Makefile.gnu.orig 2021-01-08 04:17:38.000000000 +0900
+++ Makefile.gnu 2023-04-11 10:26:47.825704240 +0900
@@ -48,7 +48,7 @@
# Intrnsics needed for built-ins
FFLAGS_COMMON = -std=$(F_VERSION) $(ARCH) -fall-intrinsics -fconvert=swap
CFLAGS_COMMON = $(ARCH)
-FFLAGS = $(FFLAGS_COMMON) -g $(OPT) -static
+FFLAGS = $(FFLAGS_COMMON) -g $(OPT)
CFLAGS = $(CFLAGS_COMMON) -g $(OPT)
# FFLAGS for Profiling. Add in -g symbols
FFLAGS_PROF = $(FFLAGS_COMMON) $(OPTPROF) -g -Mprof=func
|
その上でコンパイルします
[root@centos7 i386]# make COMPILER=gnu
:
[root@centos7 i386]# ls -l dock64
-rwxr-xr-x. 1 root root 1051248 Apr 11 10:31 dock64
[root@centos7 i386]# file dock64
dock64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=8fa0f8d49506ec5f589232e5cede99eda53a5faf, not stripped
[root@centos7 i386]# ldd dock64
linux-vdso.so.1 => (0x00007ffffa3b7000)
libz.so.1 => /lib64/libz.so.1 (0x00007f215879c000)
libgfortran.so.3 => /lib64/libgfortran.so.3 (0x00007f215847a000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2158178000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2157f62000)
libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007f2157d26000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2157958000)
/lib64/ld-linux-x86-64.so.2 (0x00007f21589b2000)
[root@centos7 i386]#
(差し替え)
[root@centos7 i386]# mv /apps/DOCK-3.7.5/docking/DOCK/bin/dock64 /apps/DOCK-3.7.5/docking/DOCK/bin/_dock64
[root@centos7 i386]# mv ./dock64 /apps/DOCK-3.7.5/docking/DOCK/bin/dock64
作ったdock64を試してみる.
幸い「dock.3.7_source.tar.gz」にはテストセットが用意されているのでそれを使ってみる.
ただ、これってpython2を要求してるので、pyenv/anacondaでpython2環境を作ってそこで実行させてみる
dock3.7 test環境の構築 †
いつものように
git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
pyenv install anaconda3-2023.03
pyenv global anaconda3-2023.03
export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
(既に構築済みなら)
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
そしてpython2な環境を作る
[root@centos7 ~]# conda create -n dock-test python=2 numpy scipy
[root@centos7 ~]# source activate dock-test
(dock-test) [root@centos7 ~]# conda install -c test_org_002 bsddb <-- bsddbのインストール
(dock-test) [root@centos7 ~]# pip install requests matplotlib <-- requests と matplotlib のインストール
この dock-test 実行環境で各種テストを行うことになります.
テスト実施 †
ただ...正直そのままでは動きません. 足りないコマンドとかがありますので.
- amsol
こちらは「/apps/DOCK-3.7.5/ligand/amsol/amsol7.1」に置かれるのですが、実態が存在してないです.
なのでソースを取得して作り直します
同封されている 「/apps/DOCK-3.7.5/ligand/amsol/README」からamsol7.1.tar.xz(1.4MB)を取得します
[root@centos7 ~]# cd /apps/src/amsol
[root@centos7 amsol]# tar xf ../amsol7.1.tar.xz
[root@centos7 amsol]# cd amsol7.1/
[root@centos7 amsol7.1]# ./amsol.compile
Do you wish to configure manually or have me guess? (man, auto) [auto]: man <- manを入力
Input the machine on which you wish to compile : linux <-- linuxと入力
What would you like to name the executable file? amsol7.1 <-- amsol7.1 と入力
The supported choices are as follows: m <-- m と入力
[root@centos7 amsol7.1]#
[root@centos7 amsol7.1]# sed -i 's/g77/gfortran/' Makefile
[root@centos7 amsol7.1]# vi new/amsol.f
OPEN(19,NAME='fort.19') BJL1003
OPEN(20,NAME='fort.20') BJL1003
↓
OPEN(19,file='fort.19') BJL1003
OPEN(20,file='fort.20') BJL1003
[root@centos7 amsol7.1]#
[root@centos7 amsol7.1]# make
[root@centos7 amsol7.1]# ls -l amsol7.1
-rwxr-xr-x. 1 root root 1528192 Apr 11 10:50 amsol7.1
[root@centos7 amsol7.1]# file amsol7.1
amsol7.1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=8291f41f5270ca20adc9cbc3feecb51f0a7d2f06, not stripped
[root@centos7 amsol7.1]# rm -f /apps/DOCK-3.7.5/ligand/amsol/amsol7.1
[root@centos7 amsol7.1]# cp ./amsol7.1 /apps/DOCK-3.7.5/ligand/amsol/amsol7.1
- reduce
こちらは「/apps/DOCK-3.7.5/proteins/Reduce/reduce」にある. 32bit向けにコンパイルされており、パッケージを揃えば一応は動く.
っがソースから作ってみる
1
2
3
4
5
6
7
| [root@centos7 ~]# cd /apps/src/
[root@centos7 src]# git clone https://github.com/rlabduke/reduce
[root@centos7 src]# cd reduce/
[root@centos7 reduce]# mkdir build && cd build
[root@centos7 build]# cmake3 ..
[root@centos7 build]# make
[root@centos7 build]# cp reduce_src/reduce /apps/DOCK-3.7.5/proteins/Reduce/reduce
|
その上でテストを実施
テストは「/apps/DOCK-3.7.5/test/」にて提供されている
[root@centos7 ~]# ls -l /apps/DOCK-3.7.5/test/
total 52
-rwxr-xr-x. 1 root root 928 Jan 8 2021 all-test.sh
-rwxr-xr-x. 1 root root 2027 Jan 8 2021 analysis-test.sh
-rwxr-xr-x. 1 root root 23 Jan 8 2021 cleanup.sh
-rwxr-xr-x. 1 root root 802 Jan 8 2021 cov-test.sh
drwxr-xr-x. 7 root root 88 Jan 8 2021 data
-rwxr-xr-x. 1 root root 1073 Jan 8 2021 ligand-test.sh
-rwxr-xr-x. 1 root root 486 Jan 8 2021 local-test.sh
-rwxr-xr-x. 1 root root 403 Jan 8 2021 protein-addh-test.sh
-rwxr-xr-x. 1 root root 476 Jan 8 2021 protein-flex-sge-test.sh
-rwxr-xr-x. 1 root root 469 Jan 8 2021 protein-flex-tesh.sh
-rwxr-xr-x. 1 root root 401 Jan 8 2021 protein-sge-test.sh
-rwxr-xr-x. 1 root root 391 Jan 8 2021 protein-test.sh
-rwxr-xr-x. 1 root root 1294 Jan 8 2021 smiles-ligand-test.sh
-rwxr-xr-x. 1 root root 488 Jan 8 2021 submit-test.sh
[root@centos7 ~]#
それぞれを実行すると 「run」ディレクトリを作ってそこに結果を置いてくれます。
この中を読んで、どうやってdockが動くのか勉強する箇所って感じかな.
local-test.sh †
まずはDOCKコマンドをテストしてみます
[root@centos7 ~]# source activate dock-test
(dock-test) [root@centos7 ~]# cd /apps/DOCK-3.7.5/test/
(dock-test) [root@centos7 test]# ./local-test.sh
別のターミナルでtopを打つとこんな感じ

ligand-test.sh †
「ligand-test.sh」を実行すると
(dock-test) [root@centos7 test]# ./ligand-test.sh
AMSOLEXE not set!
Please set the environmental variable AMSOLEXE to the location of amsol-mod4
Alternatively, move/link to the default: $DOCKBASE/ligand/amsol/amsol-mod4
(dock-test) [root@centos7 test]#
と言われ環境変数AMSOLEXE の定義が必要っぽい. なのでAMSOLEXEに値を入れて実行してみると...
(dock-test) [root@centos7 test]# AMSOLEXE=/apps/DOCK-3.7.5/ligand/amsol/amsol7.1 ./ligand-test.sh
WARNING: OE_DIR is not set, tests likely to fail!
Make sure you have openeye available in your python path
Press enter to proceed
:
ImportError: No module named openeye.oechem
:
(dock-test) [root@centos7 test]#
とOpenEYE様のライブラリが必要と言われる...無理.
all-test.sh †
全部のテストっぽい
(dock-test) [root@centos7 test]# ./all-test.sh
めも †
DOCKの使い方ですが、、testで何が行われているか、どのように下準備が行われてdockが動いているかの流れを把握するのが必須っぽい
その辺商用パッケージは可視化されどこにフォーカスしてdockをするとかが分かりやすい.
金額次第だけど、商用品の方がいいのでは?って思う. お手軽でちょいと試してみたいとか...なにがいいのか著者も答えを持ってないです..最低限GUI操作でお手軽さが必要かなとは思いますが...
って調べたらPyMOLとAutoDockの共演があった
https://www.youtube.com/watch?v=4qFUFkC69e8&ab_channel=shityakoff
こうゆうのでいいような気がする
あとこうゆうのとか
http://schubert.bio.uniroma1.it/dockingpie/index.html