GAUSSIANΒΆ

Webpage: GAUSSIAN

Two versions of the GAUSSIAN package g09 and g16, as well as the GaussView editor are installed on the local cluster. To load the desired package, use the module command:

module load gaussian/g16

To run GAUSSIAN one needs a control file, in this case my_gaussian_job.com:

%chk=my_gaussian_job.chk
%mem=58Gb
%nprocs=20
#p opt cam-b3lyp/6-311g(d,p)

water molecule optimization

0 1
O  -0.464   0.177   0.0
H  -0.464   1.137   0.0
H   0.441  -0.143   0.0
<empty/line>

Do not foget an empty line at the end of the control file.

The submission script is cluster-specific. It has to load modules, create a scratch space and run the executable:

module load gaussian/g16
mkdir -p temp
g16 my_gaussian_job.com

The control file my_gaussian_job.com has to be accesible from the nodes. The good practice is to rsync the input files to the scratch space of the node, run the job, and then rsync the output back.

A complete example script that runs Gaussian job:

#!/bin/bash
#
#SBATCH -J my_gaussian_job
#SBATCH -e my_gaussian_job.e
#SBATCH -o my_gaussian_job.o
#
#SBATCH --mail-user=your_username@mpip-mainz.mpg.de
#SBATCH --mail-type=FAIL
#
#SBATCH --mem=60000
#SBATCH --ntasks-per-node=20
#SBATCH --partition=CPU_Std20
#SBATCH --time=24:00:00

ulimit -s unlimited
ulimit -t unlimited

job=${SLURM_JOB_NAME}
workdir=${SLURM_SUBMIT_DIR}

#---------Define TEMP directory and JOB directory------------------------------
#------------------------------------------------------------------------------
TMPDIR=/usr/scratch/$USER
mkdir -p $TMPDIR/$SLURM_JOB_ID
JOBDIR=$TMPDIR/$SLURM_JOB_ID

#---------Write job run details at the begining of output----------------------
#------------------------------------------------------------------------------
echo "Node running the job is: ${SLURM_JOB_NODELIST}" >> $workdir/$job.out
echo "TEMP Job directory is: ${JOBDIR}" >> $workdir/$job.out
echo "PWD is: ${workdir}" >> $workdir/$job.out
echo "Slurm Job ID is: ${SLURM_JOB_ID}" >>  $workdir/$job.out
echo " " >> $workdir/$job.out
echo "----------Output from Gaussian starts now----------" >> $workdir/$job.out
echo " " >> $workdir/$job.out

#---------Go to TEMP and bring input files from JOBDIR-------------------------
#-------(MUST change to your MPIP machine number pckrXYZ)----------------------
cd $JOBDIR

rsync -ar pckrXYZ:$workdir/$job.com $JOBDIR/
rsync -ar pckrXYZ:$workdir/$job.chk $JOBDIR/
rsync -ar pckrXYZ:$workdir/$job.gbs $JOBDIR/

#---------Gaussian 16 binaries and scratch space-------------------------------
#------------------------------------------------------------------------------
export g16root=/sw/linux/gaussian/g16
export GAUSS_SCRDIR=$JOBDIR
. $g16root/g16/bsd/g16.profile

#---------Run the code---------------------------------------------------------
#------------------------------------------------------------------------------
g16  < $job.com >> $workdir/$job.out

#---------Copy files: from job_dir BACK to your work_dir-----------------------
#------------------------------------------------------------------------------
rsync -ar $JOBDIR/*.chk $workdir

#---------Clean up: remove JOBDIR from the scratch space-----------------------
#------------------------------------------------------------------------------
rm -rf $JOBDIR