diff --git a/LifeSciences/README.md b/LifeSciences/README.md index be58fcda9c55c61ba9f6cf4d2e006a8b0ba5e83c..48a7bc1081058ebb6004cbcbad493444dbeda2bf 100644 --- a/LifeSciences/README.md +++ b/LifeSciences/README.md @@ -7,8 +7,10 @@ Life Sciences Software List: - repositories: eigensoft-7.2.1 - repositories: redundans-v0.13c - repositories: bamtools-2.5.2 +- repositories: pymol-v2.5.0 - repositories: flye-2.9 - repositories: Manta-1.6.0 - repositories: hmmer-3.3.2 - repositories: Muscle-5.1 - repositories: 3d-dna-180922 + diff --git a/LifeSciences/pymol-v2.5.0/build.sh b/LifeSciences/pymol-v2.5.0/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..20dd711830504d4eadca5ec8483b55ba6de9e094 --- /dev/null +++ b/LifeSciences/pymol-v2.5.0/build.sh @@ -0,0 +1,116 @@ +#!/bin/bash +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash build.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +[[ ! "$1" =~ ^/.* || "$1" = "/" ]] && echo "请输入正确的构建路径" && exit 1 +[[ ! "$2" =~ ^/.* || "$2" = "/" ]] && echo "请输入正确的安装路径" && exit 1 + +create_dir() +{ + local path=$1 + [[ "$path" =~ .*/$ ]] && path=${path%/*} + if [[ ! -d "$path" && ! -f "$path" ]]; then mkdir -p $path; else path=$path`date "+%y%m%d%H%M%S"` && mkdir -p $path; fi + echo $path +} + +buildpath=$(create_dir $1) +installpath=$(create_dir $2) + +yum install -y m4 environment-modules systemd-devel +source /etc/profile +module purge + +set -e +dep_dir="dependency" +bash $dep_dir/bisheng-compiler-2.1.0.sh $buildpath $installpath +module use $installpath/bisheng-compiler-2.1.0 +module load $installpath/bisheng-compiler-2.1.0/bisheng_modulefiles + +bash $dep_dir/hmpi-1.1.1.sh $buildpath $installpath +module use $installpath/hmpi-1.1.1 +module load $installpath/hmpi-1.1.1/hmpi_modulefiles + +bash $dep_dir/zlib-1.2.11.sh $buildpath $installpath +module use $installpath/zlib-1.2.11 +module load $installpath/zlib-1.2.11/zlib_modulefiles + +bash $dep_dir/hdf5-1.12.1.sh $buildpath $installpath +module use $installpath/hdf5-1.12.1 +module load $installpath/hdf5-1.12.1/hdf5_modulefiles + +bash $dep_dir/pnetcdf-1.12.2.sh $buildpath $installpath +module use $installpath/pnetcdf-1.12.2 +module load $installpath/pnetcdf-1.12.2/pnetcdf_modulefiles + +bash $dep_dir/netcdf-c-4.8.1.sh $buildpath $installpath +module use $installpath/netcdf +module load $installpath/netcdf/netcdf_modulefiles + +bash $dep_dir/netcdf-fortran-4.5.3.sh $buildpath $installpath +module use $installpath/netcdf +module load $installpath/netcdf/netcdf_modulefiles + + +bash $dep_dir/GTest.sh $buildpath $installpath + +bash $dep_dir/cJSON.sh $buildpath $installpath + +bash $dep_dir/msgpack-c.sh $buildpath $installpath + +bash $dep_dir/mmtf-cpp.sh $buildpath $installpath + +bash $dep_dir/glm-0.9.9.8.sh $buildpath $installpath + +bash $dep_dir/Python-3.7.6.sh $buildpath $installpath +module use $installpath/python3 +module load $installpath/python3/python3_modulefiles + +bash $dep_dir/Pmw.sh $buildpath $installpath + + +bash pymol-v2.5.0.sh $buildpath $installpath + + +mkdir -p pkg/pymol-v2.5.0-hpc && cp -r $installpath/* pkg/pymol-v2.5.0-hpc/ +cat>"pkg/pymol-v2.5.0-hpc/run.sh"< /dev/null +current_dir=\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" &> /dev/null && pwd) +for d in \$(ls \$current_dir) +do + [[ ! \$d =~ "pymol" && ! \$d =~ "gTest" && ! \$d =~ "cjson" && ! \$d =~ "msgpack-c" && ! \$d =~ "mmtf-cpp" && ! \$d =~ "glm-0.9.9.8" && ! -f "\$current_dir/\$d" ]] && cd \$current_dir/\$d && module use \$(pwd) && module load \$(pwd)/*modulefiles +done + +cd \$current_dir +[[ ! -d "$installpath/hdf5-1.12.1/lib/" ]] && { +mkdir -p $installpath/hdf5-1.12.1/lib/; \ +ln -sf \$current_dir/hdf5-1.12.1/lib/libhdf5_hl.so $installpath/hdf5-1.12.1/lib/; \ +ln -sf \$current_dir/hdf5-1.12.1/lib/libhdf5.so $installpath/hdf5-1.12.1/lib/ +} +[[ ! -d "$installpath/netcdf" ]] && mkdir -p $installpath/netcdf && cp -r \$current_dir/netcdf/* $installpath/netcdf/ +[[ ! -d "$installpath/hmpi-1.1.1" ]] && mkdir -p $installpath/hmpi-1.1.1 && cp -r \$current_dir/hmpi-1.1.1/* $installpath/hmpi-1.1.1/ + +cp -rf \$current_dir/gTest/lib64/* /usr/lib/ +cp -rf \$current_dir/gTest/include/* /usr/include/ +cp -rf \$current_dir/cjson/lib64/* /usr/lib/ +cp -rf \$current_dir/msgpack-c/lib/* /usr/lib/ +cp -rf \$current_dir/mmtf-cpp/include/* /usr/include/ +cp -rf \$current_dir/glm-0.9.9.8/include/* /usr/include/ + +cat \${current_dir}/pymol/bin/pymol +sed -i '/exec/d' \${current_dir}/pymol/bin/pymol +sed -i '\$a\\exec "'\${current_dir}'/python3/bin/python3" "'\${current_dir}'/pymol/lib/python3.7/site-packages/pymol/__init__.py" "\$@"' \${current_dir}/pymol/bin/pymol +ln -s \${current_dir}/pymol/bin/pymol /usr/local/bin/pymol +EOF + +cd pkg/ && tar zcvf pymol-v2.5.0-hpc.tar.gz pymol-v2.5.0-hpc + +rm -rf $buildpath $installpath + diff --git a/LifeSciences/pymol-v2.5.0/dependency/GTest.sh b/LifeSciences/pymol-v2.5.0/dependency/GTest.sh new file mode 100644 index 0000000000000000000000000000000000000000..046e56a461f919e17ca7cc5688ade4afe5447a66 --- /dev/null +++ b/LifeSciences/pymol-v2.5.0/dependency/GTest.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash GTest.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +[[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]] && echo "请输入正确的构建路径" && exit 1 +[[ ! "$2" =~ ^/.* || ! -d "$2" || "$2" = "/" ]] && echo "请输入正确的安装路径" && exit 1 + +buildpath=$1 +installpath=$2 +[[ "$buildpath" =~ .*/$ ]] && buildpath=${buildpath%/*} +[[ "$installpath" =~ .*/$ ]] && installpath=${installpath%/*} +[[ "$buildpath" == "$installpath" ]] && echo "构建路径与安装路径需为不同路径" && exit 1 + +set -e +yum install -y wget tar environment-modules cmake + +wget -t 0 -c -P $buildpath https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz +tar -xvf $buildpath/release-1.11.0.tar.gz -C $buildpath && rm -rf $buildpath/release-1.11.0.tar.gz + +cd $buildpath/googletest-release-1.11.0 +mkdir build +cd build +export CC=clang +export CXX=clang++ +export FC=flang +cmake .. -DCMAKE_INSTALL_PREFIX=$installpath/gTest +make && make install + +cp -rf $installpath/gTest/lib64/* /usr/lib/ +cp -rf $installpath/gTest/include/* /usr/include/ + diff --git a/LifeSciences/pymol-v2.5.0/dependency/Pmw.sh b/LifeSciences/pymol-v2.5.0/dependency/Pmw.sh new file mode 100644 index 0000000000000000000000000000000000000000..72178da1c9391c4d2fa59f1378feeb0e7c49902a --- /dev/null +++ b/LifeSciences/pymol-v2.5.0/dependency/Pmw.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash Pmw.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +if [[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]]; then echo "请输入正确的构建路径"; exit 1; fi +if [[ ! "$2" =~ ^/.* || ! -d "$2" || "$2" = "/" ]]; then echo "请输入正确的安装路径"; exit 1; fi + +buildpath=$1 +installpath=$2 +if [[ "$1" =~ .*/$ ]]; then buildpath=${buildpath%/*}; fi +if [[ "$2" =~ .*/$ ]]; then installpath=${installpath%/*}; fi +if [[ "$buildpath" = "$installpath" ]]; then echo "构建路径和安装路径相同,请重新输入"; exit 1; fi + +set -e +yum install -y wget tar environment-modules libatomic + +wget -t 0 -c -P $buildpath https://udomain.dl.sourceforge.net/project/pmw/Pmw-2.1.tar.gz +tar -xvf $buildpath/Pmw-2.1.tar.gz -C $buildpath && rm -rf $buildpath/Pmw-2.1.tar.gz +cd $buildpath/Pmw-2.1 +$installpath/python3/bin/python3 setup.py build install --prefix=$installpath/python3 + diff --git a/LifeSciences/pymol-v2.5.0/dependency/PyQT5.sh b/LifeSciences/pymol-v2.5.0/dependency/PyQT5.sh new file mode 100644 index 0000000000000000000000000000000000000000..24a9fa4d38b26c6a7143cc93cc017a958547eb46 --- /dev/null +++ b/LifeSciences/pymol-v2.5.0/dependency/PyQT5.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash PyQT5.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +if [[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]]; then echo "请输入正确的构建路径"; exit 1; fi +if [[ ! "$2" =~ ^/.* || ! -d "$2" || "$2" = "/" ]]; then echo "请输入正确的安装路径"; exit 1; fi + +buildpath=$1 +installpath=$2 +if [[ "$1" =~ .*/$ ]]; then buildpath=${buildpath%/*}; fi +if [[ "$2" =~ .*/$ ]]; then installpath=${installpath%/*}; fi +if [[ "$buildpath" = "$installpath" ]]; then echo "构建路径和安装路径相同,请重新输入"; exit 1; fi + +set -e +yum install -y wget tar environment-modules libatomic +yum groupinstall "Development Tools" -y +yum install -y qt5-qtbase qt5-qtbase-devel +yum install -y qt5-qtquickcontrols2-devel +yum install -y qt5-qtquickcontrols qt5-qtdeclarative-devel +yum install -y qt5* + +export PATH=/usr/lib64/qt5/bin/:$PATH + +$installpath/python3/bin/pip3 install PyQt5 + diff --git a/LifeSciences/pymol-v2.5.0/dependency/Python-3.7.6.sh b/LifeSciences/pymol-v2.5.0/dependency/Python-3.7.6.sh new file mode 100644 index 0000000000000000000000000000000000000000..59ded5724ff77adaf34748c1094141994ebe2460 --- /dev/null +++ b/LifeSciences/pymol-v2.5.0/dependency/Python-3.7.6.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash Python-3.7.6.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +if [[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]]; then echo "请输入正确的构建路径"; exit 1; fi +if [[ ! "$2" =~ ^/.* || ! -d "$2" || "$2" = "/" ]]; then echo "请输入正确的安装路径"; exit 1; fi + +buildpath=$1 +installpath=$2 +if [[ "$1" =~ .*/$ ]]; then buildpath=${buildpath%/*}; fi +if [[ "$2" =~ .*/$ ]]; then installpath=${installpath%/*}; fi +if [[ "$buildpath" = "$installpath" ]]; then echo "构建路径和安装路径相同,请重新输入"; exit 1; fi + +set -e +yum install -y gcc make wget openssl openssl-devel readline readline-devel zlib* libffi-devel tar +yum install -y zlib-devel bzip2-devel ncurses-devel sqlite-devel tk-devel gdbm-devel xz-devel + +wget -t 0 -c -P $buildpath https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz +tar -xvf $buildpath/Python-3.7.6.tgz -C $buildpath && rm -rf $buildpath/Python-3.7.6.tgz +cd $buildpath/Python-3.7.6 +./configure --prefix=$installpath/python3 CC=clang CXX=clang++ FC=flang +make -j$(nproc) +make install + +cat>"$installpath/python3/python3_modulefiles"<"$installpath/bisheng-compiler-2.1.0/bisheng_modulefiles"<"$installpath/hdf5-1.12.1/hdf5_modulefiles"<"$installpath/hmpi-1.1.1/hmpi_modulefiles"<"$installpath/netcdf/netcdf_modulefiles"<"$installpath/pnetcdf-1.12.2/pnetcdf_modulefiles"<"$installpath/zlib-1.2.11/zlib_modulefiles"<"$installpath/pymol/pymol_modulefiles"<