#!/bin/bash #SBATCH -p gpu #SBATCH -J alphafold #SBATCH -M gmerlin6 #SBATCH --gpus=1 #SBATCH -n 1 #SBATCH -c 10 # sLURM Options can be overwritten by specifing in the sbatch command! # # Alphafold submission script for the merlin cluster # Usage: sbatch [slurm_opts] alphafold_merlin.sh [options] fasta_file # # OPTIONS # All alphafold options are set automatically, but can be overwritten. # Some common options: # # --max_template_date=YYYY-MM-DD (default: today) # --output_dir (default: current directory # --helpfull List all options # # 2024-02-08 Spencer Bliven, Greta Assmann # export ALPHAFOLD_DATA=/data/project/bio/shared/alphafold/versions/v2.3.2/latest source /opt/psi/MX/alphafold/ALPHAFOLD_VERSION/miniconda/etc/profile.d/conda.sh conda activate "${ALPHAFOLD_ENV:?"Error: ALPHAFOLD_ENV not set. Try 'module use MX unstable; module load alphafold'"}" export ALPH_TMP_DIR=/scratch/${SLURM_JOBID} mkdir -p $ALPH_TMP_DIR export TF_FORCE_UNIFIED_MEMORY=1 export XLA_PYTHON_CLIENT_MEM_FRACTION="4.0" echo "hostname=$(hostname)" echo "python=$(which python)" echo "ALPHAFOLD_DATA=$(realpath "$ALPHAFOLD_DATA")" echo "Alphafold version=$(which alphafold_merlin.sh)" echo "$ALPHAFOLD_ENV" python "${ALPHAFOLD_DIR:?Error loading module}/bin/alphafold_runner.py" -v 0 "$@" squeue -j $SLURM_JOB_ID rm -rf $ALPH_TMP_DIR