diff --git a/EM/dynamo/1.1.514/config b/EM/dynamo/1.1.514/config new file mode 100644 index 0000000..845f362 --- /dev/null +++ b/EM/dynamo/1.1.514/config @@ -0,0 +1,3 @@ +# Google drive file hash, from https://wiki.dynamo.biozentrum.unibas.ch/w/index.php/Downloads +DYNAMO_ID=1gZA97VTDVOTurtwX7Nw7F3VcEvfWcm3J + diff --git a/EM/dynamo/README.md b/EM/dynamo/README.md new file mode 100644 index 0000000..cef3056 --- /dev/null +++ b/EM/dynamo/README.md @@ -0,0 +1,24 @@ +# Dynamo + +## Installation + +Installation was only partially automated in the build script. Currently only the 'prep' step is implemented. Future versions will add more commands to the build script. + +Installation should be done on merlin with an -adm account + +1. Add new version to `files/variants` +2. Add google drive download link to `$V/config`. +3. Run `build ` +4. module load dynamo/$V +5. Compile stand-alone: `dynamo_setup_linux.sh` +6. Compile MPI: `source dynamo_setup_cluster.sh mpic++ dynamo_activate_linux_shipped_MCR.sh` +7. Compile Cuda: + + cd $DYNAMO_ROOT/cuda + make clean + ./config.sh + grep CUDA_ROOT makefile + make all + make extended + + diff --git a/EM/dynamo/build b/EM/dynamo/build new file mode 100755 index 0000000..f4e547a --- /dev/null +++ b/EM/dynamo/build @@ -0,0 +1,68 @@ +#!/usr/bin/env modbuild + +pbuild::add_to_group 'EM' +pbuild::use_cmake + +# config provides DYNAMO_ID +test -f "$V/config" || { echo "$V/config not found"; exit 1; } +source "$V/config" + + +pbuild::prep() { + # Download tarball and expand to $PREFIX + # Download links are on google drive, which requires a script (gdrivedl.py) + # to handle setting session cookies + + local GDRIVEDL="${PMODULES_TMPDIR:-/tmp}/gdrivedl.py" + + bootstrap () { + # Download gdrivedl to bootstrap the download process + if ! [ -f "$GDRIVEDL" ]; then + # Use sbliven fork; adds CLI options + wget -O "$GDRIVEDL" 'https://raw.githubusercontent.com/sbliven/gdrivedl/master/gdrivedl.py' + fi + } + + download_dynamo() { + local DYNAMO_ID="$1" + #local DYNAMO_LINK="https://drive.google.com/u/0/uc?export=download&id=${DYNAMO_ID}" + local OUT="$2" + + bootstrap + + python "$GDRIVEDL" "$DYNAMO_ID" -O "$OUT" --quiet + } + + unpack() { + local -r file="$1" + local -r dir="${2:-${SRC_DIR}}" + ( + if [[ -n "${dir}" ]]; then + mkdir -p "${dir}" + cd "${dir}" + fi + tar -xv --strip-components 1 -f "${file}" + ) + } + + : DYNAMO_ID=${DYNAMO_ID:?DYNAMO_ID not set in config file} + TAR_FILE="$PMODULES_DISTFILESDIR/dynamo-${V_PKG}.tar" + mkdir -p "${PMODULES_DISTFILESDIR}" + download_dynamo "$DYNAMO_ID" "$TAR_FILE" + mkdir -p "$PREFIX" + unpack "$TAR_FILE" "$PREFIX/bin" +} + +pbuild::configure() { + : +} + +pbuild::compile() { + # Could force compilation here, but I'm going to do it manually the first time + : +} + +pbuild::install() { + : +} + diff --git a/EM/dynamo/files/variants b/EM/dynamo/files/variants new file mode 100644 index 0000000..d7b2939 --- /dev/null +++ b/EM/dynamo/files/variants @@ -0,0 +1 @@ +dynamo/1.1.514 unstable b:psi-python36/5.0.1 gcc/9.3.0 openmpi/4.0.4_slurm cuda/11.1.0 matlab/2019a diff --git a/EM/dynamo/modulefile b/EM/dynamo/modulefile new file mode 100644 index 0000000..f8c12ce --- /dev/null +++ b/EM/dynamo/modulefile @@ -0,0 +1,32 @@ +#%Module1.0 + +module-whatis "a software environment for subtomogram averaging of cryo-EM data" +module-url "https://wiki.dynamo.biozentrum.unibas.ch/w/index.php/Main_Page" +module-license "GPLv2 license" +module-maintainer "Spencer Bliven " + +module-help " +Dynamo is a software environment for subtomogram averaging of cryo-EM data. In +a full workflow, you would organize tomograms in catalogues, use them to pick +particles and create alignment and classification projects to be run on +different computing environments. + +Cite: + +1. Dynamo: A flexible, user-friendly development tool for subtomogram averaging + of cryo-EM data in high-performance computing environments. Castaño-Díez D, + Kudryashev M, Arheit M, Stahlberg H., J Struct Biol. 2012. +2. Dynamo Catalogue: Geometrical tools and data management for particle picking + in subtomogram averaging of cryo-electron tomograms Castaño-Díez D, Kudryashev + M, Stahlberg H., in J Struct Biol. 2017 Feb; 197(2):135-144 +3. The Dynamo package for tomography and subtomogram averaging: components for + MATLAB, GPU computing and EC2 Amazon Web Services Castaño-Díez D. in Acta + Crystallographica Section D: Structural Biology 73 (6). +4. Protocols for Subtomogram Averaging of Membrane Proteins in the Dynamo + Software Package Navarro PP, Stahlberg H and Castaño-Díez D (2018). Front. Mol. + Biosci. 5:82. +" + +setenv DYNAMO_ROOT "$PREFIX/bin" +# merlin-specific +setenv MCR_CACHE_ROOT "/scratch/$::env(USER)"