Commit 8c1392e8 authored by Adrian Nievergelt's avatar Adrian Nievergelt

icon slurm job from imod files

parent 0e1f738d
#!/bin/bash
#SBATCH -J iconGPU-reconst # the job's name
#SBATCH -t 30:00:00 # max. wall clock time 5s
#SBATCH -n 1 # number of tasks
#SBATCH -N 1
#SBATCH -c 2
#SBATCH -o /projects/project-nieverge/logs/iconGPU-reconst_%j.out # output file
#SBATCH --partition=gpu
#SBATCH --gres=gpu:2
#module load cuda/10 #make cuda available to this session's environemt
# USAGE: sbatch ICON_fromImodFiles.slurm iModDir
#numNodes=16
#totalSlices=3837 # zero referenced
module load cuda/9.2.148
module load fftw/3.3.4
baseDir="/projects/project-nieverge"
specimenThickness=500 # ~ 230nm for cilia
iconGPU="${baseDir}/bin/ICON_GPU_v1.2.9_CentOS64/bin/ICON-GPU"
iconMask="${baseDir}/bin/ICON_GPU_v1.2.9_CentOS64/bin/ICONMask3"
iconPreproc="${baseDir}/bin/ICON_GPU_v1.2.9_CentOS64/bin/ICONPreProcess"
cd $1
zShift=`grep -i "^AxisZShift" align.com |sed -e 's/^[[:alnum:]]\+\s\+//g'`
inputAli=`grep -i "InputProjections" tilt.com | sed -e 's/^[[:alnum:]]\+\s\+//g'`
baseDir=${inputAli%%.*}
tiltFile=`grep -i "^tiltfile" tilt.com |sed -e 's/^[[:alnum:]]\+\s\+//g'`
binFactor=`grep -i "^IMAGEBINNED" tilt.com |sed -e 's/^[[:alnum:]]\+\s\+//g'`
numSlicesFull=`grep -i "^FULLIMAGE" tilt.com |sed -e 's/^[[:alnum:]]\+\s\+[[:alnum:]]\+\s\+//g'`
numSlices=$((numSlicesFull/binFactor-1))
fullThickness=`grep -i "^THICKNESS" tilt.com |sed -e 's/^[[:alnum:]]\+\s\+//g'`
thickness=$((numSlicesFull/binFactor))
mkdir -p $baseDir
${iconPreproc} -i ${inputAli} -t ${tiltFile} -th ${specimenThickness} -o ${baseDir}_ipp.mrc
${iconGPU} -i ${baseDir}_ipp.mrc -t $2 -iter 80,160,80 -thr 0 -o ${baseDir} -s 0,${numSlices} -d 1
${iconMask} -i ${baseDir}/reconstruction -t ${tiltFile} -th ${thickness} -cf ${baseDir}/crossValidation/crossV.frc -ff ${baseDir}/crossValidation/fullRec.frc -o ${baseDir}_icon.rec -s 0,${numSlices} -z ${zShift}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment