本家様 http://pymol.org/
シュレーディンガー社様から販売されております. 一方でそのオープンソース版が存在していてここではそのオープンソース版を作ってみました.
https://github.com/schrodinger/pymol-open-source
有償版PyMOLはopen source版よりも機能が強化されてます
windowsOS向けopen source版は試してないです..
ver3.1.0になったので改めて作ってみた.
RHEL系はOSに直に作るのは難しいみたい. 直前の3.1.0a0ならいけたけど、今後はcondaの上で作る事にします.
ubuntu22はPyMOLのWorkflowに載っているのですんなり行ける. けどubuntu24.04はテストrunが出来なかった.
既定のpythonは3.9 で gcc は gcc-11.5
(OSパッケージの追加インストールと関連アプリのインストール)
dnf groupinstall "Development Tools" -y
dnf install epel-release -y
dnf install xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil -y
dnf --enablerepo=devel install cmake netcdf-devel glew-devel glm-devel libpng-devel libxml2-devel freetype-devel catch2-devel msgpack-devel -y
wget -nv https://anaconda.org/schrodinger/collada2gltf/2.1.4/download/linux-64/collada2gltf-2.1.4-h6bb024c_0.tar.bz2
bzip2 -cd collada2gltf-2.1.4-h6bb024c_0.tar.bz2 | tar xf - -C /usr/local
git clone --depth 1 https://github.com/rcsb/mmtf-cpp.git
cp -R mmtf-cpp/include/mmtf* /usr/local/include
(pyenv-anacondaの敷設)
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
[root@rockylinux9 ~]# source /apps/pyenv/versions/anaconda3-2024.10-1/etc/profile.d/conda.sh
[root@rockylinux9 ~]# conda create -n pymol-open-source python=3.10 openldap pyqt qt biopython msgpack-python -y
[root@rockylinux9 ~]# conda activate pymol-open-source
(pymol-open-source) [root@rockylinux9 ~]# cd /apps/src/
(pymol-open-source) [root@rockylinux9 src]# git clone https://github.com/schrodinger/pymol-open-source
(pymol-open-source) [root@rockylinux9 src]# cd pymol-open-source/
(pymol-open-source) [root@rockylinux9 pymol-open-source]# pip install --prefix=/apps/PyMOL .
(テスト確認)
pip install -v --config-settings testing=True --prefix=/apps/PyMOL '.[dev]'
export PATH=/apps/PyMOL/bin:$PATH
export PYTHONPATH=/apps/PyMOL/lib/python3.10/site-packages
pymol -ckqy testing/testing.py --run all
EnvironmentModules は下記になる.
/apps/modulefiles/PyMOL
#%Module1.0
set root /apps/PyMOL
prepend-path PATH $root/bin
prepend-path PYTHONPATH $root/lib/python3.10/site-packages
condaで仮想環境を作りpymolをコンパイルします。
(OSパッケージの追加インストールと関連アプリのインストール)
dnf groupinstall "Development Tools" -y
dnf install epel-release -y
dnf install xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil gcc-toolset-11 -y
dnf install --enablerepo=epel,devel cmake netcdf-devel glew-devel libpng-devel libxml2-devel freetype-devel catch-devel mmtf-cpp-devel -y
dnf remove glm-devel -y
dnf install https://dl.rockylinux.org/pub/rocky/9/devel/x86_64/os/Packages/g/glm-devel-0.9.9.8-3.el9.noarch.rpm -y
wget -nv https://anaconda.org/schrodinger/collada2gltf/2.1.4/download/linux-64/collada2gltf-2.1.4-h6bb024c_0.tar.bz2
bzip2 -cd collada2gltf-2.1.4-h6bb024c_0.tar.bz2 | tar xf - -C /usr/local
(pyenv-anacondaの敷設)
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
[root@rockylinux8 ~]# source /apps/pyenv/versions/anaconda3-2024.10-1/etc/profile.d/conda.sh
[root@rockylinux9 ~]# conda create -n pymol-open-source python=3.10 openldap pyqt qt biopython msgpack-python -y
[root@rockylinux8 ~]# conda activate pymol-open-source
(pymol-open-source) [root@rockylinux8 ~]# cd /apps/src/
(pymol-open-source) [root@rockylinux8 src]# git clone https://github.com/schrodinger/pymol-open-source
(pymol-open-source) [root@rockylinux8 src]# cd pymol-open-source/
(pymol-open-source) [root@rockylinux8 pymol-open-source]# source scl_source enable gcc-toolset-11
(pymol-open-source) [root@rockylinux8 pymol-open-source]# pip install --prefix=/apps/PyMOL .
(テスト確認)
pip install -v --config-settings testing=True --prefix=/apps/PyMOL '.[dev]'
export PATH=/apps/PyMOL/bin:$PATH
export PYTHONPATH=/apps/PyMOL/lib/python3.10/site-packages
pymol -ckqy testing/testing.py --run all
EnvironmentModules は下記のようにします
/apps/modulefiles/PyMOL
#%Module1.0
prepend-path PATH /apps/PyMOL/bin
prepend-path PYTHONPATH /apps/PyMOL/lib/python3.10/site-packages
これで「module use /apps/modulefiles」「module load PyMOL」として「pymol」で起動します
基本rockylinux8のようにconda仮想環境でpymolを用意します
(centos7なら)
yum install centos-release-scl-rh epel-release
yum install devtoolset-11
yum install --enablerepo=epel glew-devel netcdf-devel libpng-devel libxml2-devel freetype-devel cmake
yum install xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil
source scl_source enable devtoolset-11
git clone https://github.com/g-truc/glm
cd glm
git checkout 0.9.9.8
cp -r glm /usr/include
alternatives --install /usr/bin/cmake cmake /usr/bin/cmake3 1 <-- 「cmake」が必要なのでcmake3をcmakeにしてみた
OSパッケージ側はこれでokで、次にcondaになります
[root@centos7 ~]# conda create -n pymol-open-source python numpy qt pyqt
[root@centos7 ~]# conda activate pymol-open-source
(pymol-open-source) [root@rockylinux ~]# cd /apps/src
(pymol-open-source) [root@centos7 src]# git clone https://github.com/schrodinger/pymol-open-source
(pymol-open-source) [root@centos7 src]# cd pymol-open-source
(pymol-open-source) [root@centos7 pymol-open-source]# pip install .
:
Successfully installed pymol-3.1.0a0
:
(pymol-open-source) [root@centos7 pymol-open-source]# conda deactivate
[root@centos7 pymol-open-source]#
EnvironmentModules は rockylinux8 と同じ
Python 3.12.3
gcc 13.3.0
(準備)
apt-get update
apt-get install catch2 cmake libfreetype6-dev libglew-dev libglm-dev libmsgpack-dev libnetcdf-dev libpng-dev libxml2-dev python-is-python3 \
python3-biopython python3-dev python3-setuptools python3-numpy python3-pip git build-essential python3-qtpy -y
wget -nv https://anaconda.org/schrodinger/collada2gltf/2.1.4/download/linux-64/collada2gltf-2.1.4-h6bb024c_0.tar.bz2
bzip2 -cd collada2gltf-2.1.4-h6bb024c_0.tar.bz2 | tar xf - -C /usr/local
git clone --depth 1 https://github.com/rcsb/mmtf-cpp.git
cp -R mmtf-cpp/include/mmtf* /usr/local/include
っで構築
root@ubuntu22:~# mkdir -p /apps/src ; cd /apps/src
root@ubuntu22:/apps/src# git clone https://github.com/schrodinger/pymol-open-source
root@ubuntu22:/apps/src# cd pymol-open-source/
root@ubuntu22:/apps/src/pymol-open-source# pip install -v --prefix=/apps/PyMOL .
テスト確認を行ってみたが、「catch2/catch.hpp」が存在しないと言われてエラーになる. testing=Trueで求められる項目がコンパイルできないみたい.
rm -rf build/
pip install -v --config-settings testing=True --prefix=/apps/PyMOL '.[dev]'
(途中でコンパイルエラー)
export PATH=/apps/PyMOL/local/bin:$PATH
export PYTHONPATH=/apps/PyMOL/local/lib/python3.12/dist-packages
pymol -ckqy testing/testing.py --run all
environment-modules
「/apps/modulefiles/PyMOL」
#%Module1.0
prepend-path PATH /apps/PyMOL/local/bin
prepend-path PYTHONPATH /apps/PyMOL/local/lib/python3.12/dist-packages
もし「ERROR: Cannot uninstall numpy 1.26.4, RECORD file not found. Hint: The package was installed by debian」と表示されたら、OS提供の python3-numpy が原因でこれを除くといいみたい
ただ、OS提供のパッケージなので影響があるかもしれない.. pyenv/anaconda で conda で用意した方がいいのかも
Python 3.10.12
gcc 11.4.0
apt-get update
apt-get --no-install-recommends install catch2 cmake libfreetype6-dev libglew-dev libglm-dev libmsgpack-dev libnetcdf-dev libpng-dev libxml2-dev python-is-python3 \
python3-biopython python3-dev python3-setuptools python3-numpy python3-pip git build-essential python3-qtpy -y
wget -nv https://anaconda.org/schrodinger/collada2gltf/2.1.4/download/linux-64/collada2gltf-2.1.4-h6bb024c_0.tar.bz2
bzip2 -cd collada2gltf-2.1.4-h6bb024c_0.tar.bz2 | tar xf - -C /usr/local
git clone --depth 1 https://github.com/rcsb/mmtf-cpp.git
cp -R mmtf-cpp/include/mmtf* /usr/local/include
pip install --upgrade pip
root@ubuntu22:~# mkdir -p /apps/src ; cd /apps/src
root@ubuntu22:/apps/src# git clone https://github.com/schrodinger/pymol-open-source
root@ubuntu22:/apps/src# cd pymol-open-source/
root@ubuntu22:/apps/src/pymol-open-source# pip install -v --prefix=/apps/PyMOL .
(テスト確認)
rm -rf build/
pip install -v --config-settings testing=True --prefix=/apps/PyMOL '.[dev]'
export PATH=/apps/PyMOL/local/bin:$PATH
export PYTHONPATH=/apps/PyMOL/local/lib/python3.10/dist-packages
pymol -ckqy testing/testing.py --run all
environment-modules
「/apps/modulefiles/PyMOL」
#%Module1.0
prepend-path PATH /apps/PyMOL/local/bin
prepend-path PYTHONPATH /apps/PyMOL/local/lib/python3.10/dist-packages