From 190c57cf82e5815631ed396927f89cc0c612fbdc Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Tue, 2 Apr 2024 12:08:01 +0200 Subject: [PATCH] Set MotionCor2 path based on the loaded cuda version. Fixes #275. --- EM/relion/modulefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/EM/relion/modulefile b/EM/relion/modulefile index 9042d98..bd88c8d 100644 --- a/EM/relion/modulefile +++ b/EM/relion/modulefile @@ -44,4 +44,22 @@ setenv RELION_RESMAP_EXECUTABLE /opt/psi/EM/ResMap/1.1.4/bin/ResMap # 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 + +# See MC2 compatibility matrix: https://intranet.psi.ch/en/bio/motioncor2 +if {[string match "8.0*" $env(CUDA_VERSION)]} { + setenv RELION_MOTIONCOR2_EXECUTABLE "/opt/psi/EM/MotionCor2/1.3.2/bin/MotionCor2_1.3.2-Cuda80" +} elseif {[string match "11.0*" $env(CUDA_VERSION)]} { + setenv RELION_MOTIONCOR2_EXECUTABLE "/opt/psi/EM/MotionCor2/1.4.0/bin/MotionCor2" +} else { + setenv RELION_MOTIONCOR2_EXECUTABLE "/opt/psi/EM/MotionCor2/1.6.4/bin/MotionCor2" +} + +# relion 5 features +if {[file exists /opt/psi/EM/relion/$V/conda_env/$V]} { + setenv RELION_TOPAZ_EXECUTABLE /opt/psi/EM/relion/$V/conda_env/$V/bin/topaz + setenv RELION_PYTHON_EXECUTABLE /opt/psi/EM/relion/$V/conda_env/$V/bin/python +} +if {[file exists /opt/psi/EM/relion/$V/torch]} { + setenv RELION_TORCH_HOME_PATH /opt/psi/EM/relion/$V/torch +} +