SLURM script file for ORCA

The following script file can be used to run an ORCA input file (e.g. thi_05.inp) through the SLURM queueing system on one of the compute nodes having at least eight compute cores. In order for this script to work the actual input file "thi_05.inp" is expected to be located in the current working directory:

#!/bin/bash -l
# Section for defining queue-system variables:
# SLURM-section
#SBATCH --job-name=thi_05
#SBATCH --output=thi_05.slurmout
#SBATCH --partition=debug_1,cluster8
#SBATCH --nodes=1
#SBATCH --ntasks=8
#SBATCH --ntasks-per-socket=4
#SBATCH --cpus-per-task=1
#SBATCH --threads-per-core=1
#SBATCH --mem-per-cpu=2000
######################################
# Section for defining job variables and settings:
LD_LIBRARY_PATH="/usr/local/openmpi-2.1.1/build/lib64"
PATH="/bin:/usr/bin:/usr/local/openmpi-2.1.1/build/bin"
export ORCA_DIR=/scr1/orca_4_0_0_2_linux_x86-64/
export PATH=$PATH:$ORCA_DIR
LaunchDir=$PWD;

#create a local working directory for the ORCA calculation
ORCA_SCRDIR="/scr1/"$USER"/"$SLURM_JOB_ID""
mkdir -p $ORCA_SCRDIR

#Copy the input file to the local working directory
cp $LaunchDir/$SLURM_JOB_NAME.inp  $ORCA_SCRDIR/$SLURM_JOB_NAME.inp

#Start ORCA
/scr1/orca_4_0_0_2_linux_x86-64/orca  $ORCA_SCRDIR/$SLURM_JOB_NAME.inp > $LaunchDir/$SLURM_JOB_NAME.out

# after ORCA is finished move the gbw file back to the home directory and generate molden input
mv $ORCA_SCRDIR/$SLURM_JOB_NAME.gbw $LaunchDir/$SLURM_JOB_NAME.gbw
/scr1/orca_4_0_0_2_linux_x86-64/orca_2mkl $LaunchDir/$SLURM_JOB_NAME  -molden

# After finishing successfully clean up the local working directory
rm -rf $ORCA_SCRDIR

exit 0

The ORCA output file generated by this script is named "thi_05.out". After finishing the actual calculation the binary summary file "thi_05.gbw" is moved to the working directory. Using the utility program orca_2mkl the .gbm file is used to generate an input file for gmolden (in this case named "thi_05.molden.input") in order to inspect the molecular orbitals of the system.


last changes: 04.04.2020, HZ
questions & comments to: zipse@cup.uni-muenchen.de