SLURM script file for ORCA

test
 1#!/bin/bash -l
 2# Section for defining queue-system variables:
 3# SLURM-section
 4#SBATCH --job-name=thi_05
 5#SBATCH --output=thi_05.slurmout
 6#SBATCH --partition=debug_1,cluster8
 7#SBATCH --nodes=1
 8#SBATCH --ntasks=8
 9#SBATCH --ntasks-per-socket=4
10#SBATCH --cpus-per-task=1
11#SBATCH --threads-per-core=1
12#SBATCH --mem-per-cpu=2000
13######################################
14# Section for defining job variables and settings:
15LD_LIBRARY_PATH="/usr/local/openmpi-2.1.1/build/lib64"
16PATH="/bin:/usr/bin:/usr/local/openmpi-2.1.1/build/bin"
17export ORCA_DIR=/scr1/orca_4_0_0_2_linux_x86-64/
18export PATH=$PATH:$ORCA_DIR
19LaunchDir=$PWD;
20
21#create a local working directory for the ORCA calculation
22ORCA_SCRDIR="/scr1/"$USER"/"$SLURM_JOB_ID""
23mkdir -p $ORCA_SCRDIR
24
25#Copy the input file to the local working directory
26cp $LaunchDir/$SLURM_JOB_NAME.inp  $ORCA_SCRDIR/$SLURM_JOB_NAME.inp
27
28#Start ORCA
29/scr1/orca_4_0_0_2_linux_x86-64/orca  $ORCA_SCRDIR/$SLURM_JOB_NAME.inp > $LaunchDir/$SLURM_JOB_NAME.out
30
31# after ORCA is finished move the gbw file back to the home directory and generate molden input
32mv $ORCA_SCRDIR/$SLURM_JOB_NAME.gbw $LaunchDir/$SLURM_JOB_NAME.gbw
33/scr1/orca_4_0_0_2_linux_x86-64/orca_2mkl $LaunchDir/$SLURM_JOB_NAME  -molden
34
35# After finishing successfully clean up the local working directory
36rm -rf $ORCA_SCRDIR
37
38exit 0