Skip to Content

Gaussian

 

What is Gaussian ?

Gaussian 16 is the latest in the Gaussian series of numerical chemistry programs. It provides state-of-the-art capabilities for electronic structure modeling.

Gaussian 16 is licensed softwarea and access requires registration. Please email hpc.admin to request access to Gaussian.

Gaussian 16 User Guide

Running Gaussian in batch mode

There is an issue with Gaussian where it runs multiple threads, effectively using all available resources on the host. For this reason, please ensure Gaussian is submitted with the #SBATCH --exclusive  directive set in your job script, giving you exclusive access to the allocated host. 

Example job scripts

Exclusive

Create a basic job script called gaussian.sub

  • This one uses a node exclusively (the preferred option).  It might take longer to get started because it has to wait for a node to be free
  • in order to run in parallel within the node, the line %nprocshared=22 must be included in the Gaussian input file, where the number is up to the maximum cores available on the node

#!/bin/bash
#SBATCH --mail-type=END,FAIL        
#Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=<username>@uea.ac.uk     # Where to send mail
#SBATCH -p compute-24-96                  # Submit to compute-24-96 queue
#SBATCH --exclusive
#SBATCH --ntasks=24                         
# all slots on the node
#SBATCH --job-name=gaussian-test_job     # Set job name
#SBATCH -o gaussian-test-%j.out             # Write job output to gaussian-test-(job_number).out
#SBATCH -e gaussian-test-%j.err             # Write job error to gaussian-test-(job_number).err
#set the environment
module add gaussian/16B01
#  run the code
g16 gauss_opt.inp

This script will run Gaussian in an exclusive session on a compute node. This can then be submitted as follows:

sbatch gaussian.sub

Specify the number of slots used

  • This one runs across 8 slots - you can change that up to 24 slots
  • for this more limited parallel run %nprocshared must equal #SBATCH --ntasks value

#!/bin/bash
#SBATCH --mail-type=END,FAIL        
#Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=<username>@uea.ac.uk     # Where to send mail
#SBATCH -p compute-24-96                      # Submit to compute-24-96 queue
#SBATCH --ntasks=8                          # number of slots used
#SBATCH --mem 20G                          # maximum memory
#SBATCH --job-name=gaussian-test_job     # Set job name
#SBATCH -o gaussian-test-%j.out             # Write job output to gaussian-test-(job_number).out
#SBATCH -e gaussian-test-%j.err             # Write job error to gaussian-test-(job_number).err
#set the environment
module add gaussian/16B01
#  run the code
g16 gauss_opt.inp

This script will run Gaussian with a specified number of slots on a compute node. This can then be submitted as follows:

sbatch gaussian.sub

Gaussian module file

/gpfs/software/ada/modules/che/gaussian/16B01:
module-whatis   "Gaussian 16 B01"
set             root            /gpfs/software/ada/gaussian/16-b01
setenv         g16root /gpfs/software/ada/gaussian/16-b01
setenv         GAUSS_SCRDIR /tmp/
setenv         GAUSS_EXEDIR /gpfs/software/ada/gaussian/16-b01/g16/bsd:/gpfs/softw
are/ada/gaussian/16-b01/g16/local:/gpfs/software/ada/gaussian/16-b01/g16/extras:/gpfs/so
ftware/ada/gaussian/16-b01/g16
setenv         GAUSS_ARCHDIR /gpfs/software/ada/gaussian/16-b01/g16/arch
setenv         GAUSS_LEXEDIR /gpfs/software/ada/gaussian/16-b01/g16/linda-exe
setenv         GV_DIR /gpfs/software/ada/gaussian/16-b01/gv
setenv         _DSM_BARRIER SHM
setenv         PGI_TERM trace,abort
setenv         G16BASIS /gpfs/software/ada/gaussian/16-b01/g16/basis
setenv         GAUSS_BSDDIR /gpfs/software/ada/gaussian/16-b01/g16/bsd
append-path     PATH /gpfs/software/gaussian/ada/16-b01/g16/bsd:/gpfs/software/ada/gaussian/16-b01/g16/local:/gpfs/software/ada/gaussian/16-b01/g16/extras:/gpfs/software/ada/gaussian/16-b01/g16:/gpfs/software/gaussian/ada/16-b01/gv
prepend-path     LD_LIBRARY_PATH /gpfs/software/ada/gaussian/16-b01/g16/bsd:/gpfs/so
ftware/ada/gaussian/16-b01/g16/local:/gpfs/software/ada/gaussian/16-b01/g16/extras:/gpfs
/software/ada/gaussian/16-b01/g16
append-path     LD_LIBRARY_PATH /gpfs/software/ada/gaussian/16-b01/gv/lib

Using Gaussview

You will need to set the X display to your local machine. This is dependent on your PC - see Connecting to ADA

Start an interactive session, add the gaussian module, then start gview.

[s154@login01 ~/UserJobs/gaussian]$ interactive
Job <49536> is submitted to queue <interactive>.
<<waiting for dispatch >>
<<starting on c0033>>
[s154@c0033 ~]$ module add gaussian
[s154@c0033 ~]$ gview

If you job is very graphically intense you probably should try using our visualisation nodes.