From d9d6ec9f988db01c177ee37a60fda2b1d641a8a8 Mon Sep 17 00:00:00 2001 From: Greta Assmann Date: Wed, 3 Apr 2024 16:13:27 +0200 Subject: [PATCH] relion5.0 update --- EM/relion/README.md | 2 ++ EM/relion/build | 52 ++++++++++++++++++++++++++++++++++++++++ EM/relion/files/variants | 4 +++- EM/relion/modulefile | 6 +++-- 4 files changed, 61 insertions(+), 3 deletions(-) diff --git a/EM/relion/README.md b/EM/relion/README.md index a03e1ac..095d00f 100644 --- a/EM/relion/README.md +++ b/EM/relion/README.md @@ -11,3 +11,5 @@ and MKL, but this would require additional openmpi variants. After running ./build, install relion scripts from the repository at https://git.psi.ch/lsm-hpce/relion-scripts + +From version 5.0-beta on, a conda env is required. conda env is build in the folder $SRC\_DIR/conda\_envs. Also, weights for BLUSH, MODEL-ANGELO and CLASS-RANKER are downloaded in the installation step. diff --git a/EM/relion/build b/EM/relion/build index 22c5302..6e3c435 100755 --- a/EM/relion/build +++ b/EM/relion/build @@ -2,11 +2,23 @@ pbuild::add_to_group 'EM' pbuild::use_cmake +PROFILE="no" +SP="no" pbuild::prep() { + local BRANCH if [[ "$V" =~ beta$ ]]; then BRANCH="ver${V_MAJOR}.${V_MINOR}" + + elif [[ "$V" =~ profile$ ]]; then + BRANCH="${V_PKG}" + PROFILE="yes" + + elif [[ "$V" =~ sp$ ]]; then + BRANCH="ver${V_MAJOR}.${V_MINOR}" + SP="yes" + else BRANCH="${V_PKG}" fi @@ -15,6 +27,46 @@ pbuild::prep() { } pbuild::pre_configure() { + + # Section will be switched on for -profile version + #----------------------------------------------------------- + if [[ "$PROFILE" == "yes" ]]; then + pbuild::add_configure_args "-DCMAKE_BUILD_TYPE=BENCHMARKING" + fi + #------------------------------------------------------------ + + + # Section will be switched on for single-precision version + # Safe memory usage for multibody refinements + #------------------------------------------------------------ + if [[ "$SP" == "yes" ]]; then + pbuild::add_configure_args "-DDoublePrec_CPU=OFF" + fi + #------------------------------------------------------------ + + + + # The following section will only work for versions >= 5.0-beta + # ------------------------------------------------------------- + if [[ "$V_MAJOR" -ge "5" ]]; then + + #download blush weights + wget ftp://ftp.mrc-lmb.cam.ac.uk/pub/dari/blush_v1.0.ckpt.gz -P "$PREFIX/torch/hub/checkpoints/relion_blush" \ + && gunzip "$PREFIX/torch/hub/checkpoints/relion_blush/blush_v1.0.ckpt.gz" + mv "$PREFIX/torch/hub/checkpoints/relion_blush/blush_v1.0.ckpt" "$PREFIX/torch/hub/checkpoints/relion_blush/v1.0.ckpt" + touch "$PREFIX/torch/hub/checkpoints/relion_blush/v1.0_installed.txt" + + #Set Torch Home + pbuild::add_configure_args "-DTORCH_HOME_PATH=$PREFIX/torch" + + #Conda + conda env create -f "$SRC_DIR/environment.yml" -p "$PREFIX/conda_env/$P_$V" + pbuild::add_configure_args "-DPYTHON_EXE_PATH=$PREFIX/conda_env/$P_$V/bin/python" + fi + + #--------------------------------------------------------------- + + # CMake-based build pbuild::add_configure_args "-DFORCE_OWN_FFTW=ON" diff --git a/EM/relion/files/variants b/EM/relion/files/variants index c7e3efa..bbe791e 100644 --- a/EM/relion/files/variants +++ b/EM/relion/files/variants @@ -13,4 +13,6 @@ relion/3.1.3 stable gcc/9.2.0 openmpi/4.0.5_slurm cuda/11.0.3 b:cmake/3.15.5 b:t relion/4.0-beta deprecated gcc/9.2.0 openmpi/4.0.5_slurm cuda/11.0.3 b:cmake/3.15.5 b:tiff/4.0.9 b:git/2.22.0 relion/4.0.0 unstable gcc/11.2.0 openmpi/4.1.3_slurm cuda/11.5.1 b:cmake/3.23.2 b:tiff/4.3.0 b:git/2.37.0 relion/4.0.1 unstable gcc/10.4.0 openmpi/4.1.4_slurm cuda/11.5.1 b:cmake/3.23.2 b:tiff/4.3.0 b:git/2.37.0 - +relion/4.0.1-profile unstable gcc/10.4.0 openmpi/4.1.4_slurm cuda/11.5.1 b:cmake/3.23.2 b:tiff/4.3.0 b:git/2.37.0 +relion/5.0-beta unstable gcc/10.4.0 openmpi/4.1.4_slurm cuda/11.5.1 b:cmake/3.23.2 b:tiff/4.3.0 b:git/2.37.0 anaconda/2019.07 +relion/5.0-sp unstable gcc/10.4.0 openmpi/4.1.4_slurm cuda/11.5.1 b:cmake/3.23.2 b:tiff/4.3.0 b:git/2.37.0 anaconda/2019.07 diff --git a/EM/relion/modulefile b/EM/relion/modulefile index 9042d98..44b6f71 100644 --- a/EM/relion/modulefile +++ b/EM/relion/modulefile @@ -3,7 +3,7 @@ module-whatis "3D reconstructions or 2D class averages in electron cryo-microscopy (cryo-EM)" module-url "https://www2.mrc-lmb.cam.ac.uk/relion/index.php/Main_Page" module-license "GPLv2 license" -module-maintainer "Spencer Bliven " +module-maintainer "Greta Assmann " module-help " RELION (for REgularised LIkelihood OptimisatioN, pronounce rely-on) is a @@ -41,7 +41,9 @@ setenv RELION_SUMMOVIE_EXECUTABLE /opt/psi/EM/Summovie/1.0.2/bin/sum_movie_openm setenv RELION_CTFFIND_EXECUTABLE /opt/psi/EM/ctffind4/4.1.8/bin/ctffind setenv RELION_GCTF_EXECUTABLE /opt/psi/EM/Gctf/1.06/bin/Gctf setenv RELION_RESMAP_EXECUTABLE /opt/psi/EM/ResMap/1.1.4/bin/ResMap - +setenv RELION_TOPAZ_EXECUTABLE /opt/psi/EM/relion/5.0-sp/conda_env/5.0-beta/bin/topaz +setenv RELION_PYTHON_EXECUTABLE /opt/psi/EM/relion/5.0-sp/conda_env/5.0-beta/bin/python +setenv RELION_TORCH_HOME_PATH /opt/psi/EM/relion/5.0-sp/torch # Version-specific variables setenv RELION_QSUB_TEMPLATE /opt/psi/EM/relion/$V/scripts/multi_gpu.sh setenv RELION_MOTIONCOR2_EXECUTABLE /opt/psi/EM/MotionCor2/1.4.0/bin/MotionCor2