From 4e437aefde40522b36433b1812519bca5c015b50 Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Thu, 3 Nov 2022 13:11:32 +0100 Subject: [PATCH] Install IMOD/4.11.20 This is the first version to use modbuild; IMOD/4.9.5 was installed manually. --- EM/IMOD/README.md | 14 +++++++++++++ EM/IMOD/build | 43 ++++++++++++++++++++++++++++++++++++++++ EM/IMOD/files/variants | 2 ++ EM/IMOD/modulefile | 45 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+) create mode 100644 EM/IMOD/README.md create mode 100755 EM/IMOD/build create mode 100644 EM/IMOD/files/variants create mode 100644 EM/IMOD/modulefile diff --git a/EM/IMOD/README.md b/EM/IMOD/README.md new file mode 100644 index 0000000..034c88d --- /dev/null +++ b/EM/IMOD/README.md @@ -0,0 +1,14 @@ +# IMOD + + +## Installation + +IMOD is shipped as a self-expanding installation script. Run `./build` to +install. + +## Known Issues + +The installation includes environment scripts which install into +`$IMOD_DIR/profile.d`. These are sourced in the modulefile. This means that the +module cannot be unloaded cleanly (eg IMOD remains in the PATH after +unloading). diff --git a/EM/IMOD/build b/EM/IMOD/build new file mode 100755 index 0000000..a8940a8 --- /dev/null +++ b/EM/IMOD/build @@ -0,0 +1,43 @@ +#!/usr/bin/env modbuild + +pbuild::add_to_group 'EM' + + +pbuild::prep() { + : ${CUDA_VERSION:?No CUDA_VERSION set} + local cuda="${CUDA_VERSION%.*}" + local filename="imod_${V_PKG}_RHEL7-64_CUDA${cuda}.sh" + local dst="$PMODULES_DISTFILESDIR/${filename}" + if [ -f "$dst" ]; then + echo "Found cached $dst" >&2 + else + ${curl:-curl} \ + --location \ + --fail \ + --output "$dst" \ + "https://bio3d.colorado.edu/imod/AMD64-RHEL5/$filename" + fi + } + +pbuild::configure() { + : +} + +pbuild::compile() { + : +} + +pbuild::install() { + : ${CUDA_VERSION:?No CUDA_VERSION set} + local cuda="${CUDA_VERSION%.*}" + local filename="imod_${V_PKG}_RHEL7-64_CUDA${cuda}.sh" + local dst="$PMODULES_DISTFILESDIR/${filename}" + + mkdir -p "$PREFIX/profile.d" + sh "$dst" \ + -yes \ + -dir "$PREFIX" \ + -script "$PREFIX/profile.d" + +} + diff --git a/EM/IMOD/files/variants b/EM/IMOD/files/variants new file mode 100644 index 0000000..196b2cd --- /dev/null +++ b/EM/IMOD/files/variants @@ -0,0 +1,2 @@ +IMOD/4.9.5 stable +IMOD/4.11.20 unstable cuda/10.1.105 diff --git a/EM/IMOD/modulefile b/EM/IMOD/modulefile new file mode 100644 index 0000000..d19b9e2 --- /dev/null +++ b/EM/IMOD/modulefile @@ -0,0 +1,45 @@ +#%Module1.0 + +module-whatis "IMOD is a set of image processing, modeling and display programs used for tomographic reconstruction and for 3D reconstruction of EM serial sections and optical sections." +module-url "http://bio3d.colorado.edu/imod/" +module-license "mostly GPLv2.0, with the exceptions, see http://bio3d.colorado.edu/imod/COPYRIGHT.txt" +module-maintainer "Spencer Bliven / Dmitry Ozerov " + +module-help " +IMOD is a set of image processing, modeling and display programs used for tomographic +reconstruction and for 3D reconstruction of EM serial sections and optical sections. +The package contains tools for assembling and aligning data within multiple types and +sizes of image stacks, viewing 3-D data from any orientation, and modeling and display +of the image files. IMOD was developed primarily by David Mastronarde, Rick Gaudette, +Sue Held, Jim Kremer, Quanren Xiong, and John Heumann at the University of Colorado. + +The development of IMOD has been supported by grants from the National Center for +Research Resources, the National Institute of General Medical Sciences, and the National +Institute for Biomedical Imaging and Bioengineering. IMOD and virtually all programs +contained within the IMOD package are Copyright (c) 1994-2017 by the Regents of the +University of Colorado. Other contributors are acknowledged in our Copyright and +Credits statement http://bio3d.colorado.edu/imod/COPYRIGHT.txt. + +Original publication: +> Kremer J.R., Mastronarde, D.N., and McIntosh, J.R. (1996) Computer +> visualization of three-dimensional image data using IMOD. J. Struct. Biol. +> 116:71-76. + +For tomographic reconstruction, see also: + +> Mastronarde, D.N. (1997) Dual-axis tomography: an approach with alignment +> methods that preserve resolution. J. Struct. Biol. 120:343-352. + +> Mastronarde, D.N. and Held, S.R. (2017) Automated tilt series alignment and +> tomographic reconstruction in IMOD. J. Struct. Biol. 197:102-113. +" + +switch [module-info mode] { + "load" { + puts stdout "source $PREFIX/profile.d/IMOD-linux.sh" + } + "unload" - + "remove" { + # Could unset IMOD variables here + } +}