本家様 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が出来なかった.

Rockylinux9

既定の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

2025y02m01d_040541601.png

Rockylinux8

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」で起動します

2025y02m01d_043609002.png

centos7では?

基本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 と同じ

ubuntu24.04

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

2025y02m01d_195740885.png

もし「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 で用意した方がいいのかも

ubuntu22.04

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

2025y02m01d_053045320.png

最新の60件
2025-04-27 2025-04-26 2025-04-25 2025-04-24 2025-04-17 2025-04-15 2025-04-13 2025-04-02 2025-04-01 2025-03-31 2025-03-29 2025-03-28 2025-03-27 2025-03-26 2025-03-23 2025-03-22 2025-03-20 2025-03-17 2025-03-16 2025-03-15 2025-03-06 2025-03-03 2025-03-01 2025-02-18 2025-02-17 2025-02-14 2025-02-12 2025-02-03 2025-02-02 2025-01-27 2025-01-26 2025-01-25 2025-01-24 2025-01-23

edit


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