本家様 https://github.com/mdtraj/mdtraj
ドキュメント https://www.mdtraj.org/
Read, write and analyze MD trajectories with only a few lines of Python code.
MDTraj is a python library that allows users to manipulate molecular dynamics (MD) trajectories. Features include:
Wide MD format support, including pdb, xtc, trr, dcd, binpos, netcdf, mdcrd, prmtop, and more.
Extremely fast RMSD calculations (4x the speed of the original Theobald QCP).
Extensive analysis functions including those that compute bonds, angles, dihedrals, hydrogen bonds, secondary structure, and NMR observables.
Lightweight, Pythonic API.
MDTraj includes a command-line application, mdconvert, for converting trajectories between formats.
とありまして、MDの結果解析向けですな.
っでこれをインストールしてみる
[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.2 (Blue Onyx)
[root@rockylinux9 ~]# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 535.43.02 Mon May 22 20:46:13 UTC 2023
GCC version: gcc version 11.3.1 20221121 (Red Hat 11.3.1-4) (GCC)
[root@rockylinux9 ~]#
mdtraj はpythonアプリ. なのでここでは「anaconda(or miniconda)」による実行環境を用意してこのmdtrajを動かします
っで、まずはOS提供のpython環境から離れるために「pyenv/anaconda(or miniconda)」を敷きます
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
conda update conda
既に「pyenv/anaconda」があるなら
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
その上で mdtraj の実行環境を作ります
[root@rockylinux9 ~]# conda create -n mdtraj python=3
[root@rockylinux9 ~]# source activate mdtraj
(mdtraj) [root@rockylinux9 ~]#
(mdtraj) [root@rockylinux9 ~]# conda install -c conda-forge mdtraj
(mdtraj) [root@rockylinux9 ~]# conda list
# packages in environment at /apps/pyenv/versions/anaconda3-2023.03/envs/mdtraj:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
astunparse 1.6.3 pyhd8ed1ab_0 conda-forge
blas 2.116 openblas conda-forge
blas-devel 3.9.0 16_linux64_openblas conda-forge
blosc 1.21.3 h6a678d5_0
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.5.7 hbcca054_0 conda-forge
hdf5 1.10.6 h3ffc7dd_1
ld_impl_linux-64 2.38 h1181459_1
libblas 3.9.0 16_linux64_openblas conda-forge
libcblas 3.9.0 16_linux64_openblas conda-forge
libffi 3.4.4 h6a678d5_0
libgcc-ng 12.2.0 h65d4601_19 conda-forge
libgfortran-ng 12.2.0 h69a702a_19 conda-forge
libgfortran5 12.2.0 h337968e_19 conda-forge
liblapack 3.9.0 16_linux64_openblas conda-forge
liblapacke 3.9.0 16_linux64_openblas conda-forge
libopenblas 0.3.21 pthreads_h78a6416_3 conda-forge
libstdcxx-ng 11.2.0 h1234567_1
libuuid 1.41.5 h5eee18b_0
libzlib 1.2.13 h166bdaf_4 conda-forge
llvm-openmp 16.0.4 h4dfa4b3_0 conda-forge
lz4-c 1.9.4 h6a678d5_0
lzo 2.10 h516909a_1000 conda-forge
mdtraj 1.9.7 py39h138c130_1 conda-forge
mock 5.0.2 pyhd8ed1ab_0 conda-forge
ncurses 6.4 h6a678d5_0
numexpr 2.8.4 py39hd2a5715_1
numpy 1.22.3 py39hc58783e_2 conda-forge
openblas 0.3.21 pthreads_h320a7e8_3 conda-forge
openssl 1.1.1u hd590300_0 conda-forge
packaging 23.1 pyhd8ed1ab_0 conda-forge
pandas 1.2.3 py39hde0f152_0 conda-forge
pip 23.1.2 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pytables 3.7.0 py39hf19a122_1
python 3.9.16 h7a1cb2a_2
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.9 2_cp39 conda-forge
pytz 2023.3 pyhd8ed1ab_0 conda-forge
readline 8.2 h5eee18b_0
scipy 1.8.1 py39he49c0e8_0 conda-forge
setuptools 59.8.0 py39hf3d152e_1 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
snappy 1.1.7 he1b5a44_1003 conda-forge
sqlite 3.41.2 h5eee18b_0
tk 8.6.12 h1ccaba5_0
tzdata 2023c h04d1e81_0
wheel 0.40.0 pyhd8ed1ab_0 conda-forge
xz 5.4.2 h5eee18b_0
zlib 1.2.13 h166bdaf_4 conda-forge
zstd 1.5.5 hc292b87_0
(mdtraj) [root@rockylinux9 ~]#
(mdtraj) [root@rockylinux9 ~]# conda deactivate
[root@rockylinux9 ~]#
environment-modules
[root@rockylinux9 ~]# vi /apps/modulefiles/mdtraj
#%Module1.0
set root /apps/pyenv/versions/anaconda3-2023.03/envs/mdtraj
prepend-path PATH $root/bin
[root@rockylinux9 ~]#
git には examples があって「*.ipynb」とあるので「Jupyter Notebook」経由で学習した方がいいのかなと.
っとなると実はroot配下に置かずに自分のホームディレクトリにconda環境を整備すれば...とかに...