HPC Grid Tutorial: How to Run a Gaussian Job

Follow these steps to create a script to run Gaussian jobs. 

1. Your .bashrc file located in your home directory must be modified. Log on to the Grid and from your home directory type: vim .bashrc

2. Press 'i' to insert and edit the file.

Under '# User specific aliases and functions' add the following lines: 

source /wsu/apps/groups/hbsq/gaussian/g16b01/g16.bashrc

source /wsu/apps/groups/hbsq/gaussian/g16b01/em64t/g16/bsd/g16.profile

Press 'Esc' and type ':wq' to save and quit.

3. After modifying your .bashrc file you must log out and log back in in order for the revised file to be activated. 

4. Check to see that the files were sourced correctly to run Gaussian by typing: g16

If it says 'Entering Gaussian System, Link 0=g16' it is working correctly, press Ctrl + C to quickly abort it.

If it says '-wsush: g16: command not found' then check your .bashrc file to make sure files are sourced correctly. 

5. Copy the sample Gaussian script to your home directory: cp -R /wsu/el7/scripts/tutorial/gaussian_job.gjf . 

6. Modify this sample script to run a Gaussian calculation on a compute node with X cpu cores and Y memory in queue Q. Type: vim gaussian_job.gjf

7. Be sure to save files as a .gjf file. Do not run Gaussian jobs directly on Warrior, submit the job using the following syntax: qsub scriptName.gjf 

Below are the contents of the sample script. Note: spacing displayed on this page may appear larger than what it is, reference the actual script file for correct spacing.


#PBS -l select=1:ncpus=X:mem=Ygb

## One node is requested, as multi-node Gaussian jobs are not available. X number of processors and Y GB of memory are requested.

#PBS -j oe

## Request that the output and error files be joined together.

#PBS -q Q

## Request queue Q to run on


JOB=[insert calculation name here]

OLDJOB=[if reading information from a checkpoint file, insert that files name here]

DIR=[insert path here]



g16 /$DIR/$JOB.log

## Insert path for Log output file to be written. 



## Causes Link 0 to delete scratch files at the end of a successful run, including any files that were named explicitly preceding this directive.


## Locates and names the checkpoint file.


## The contents of the checkpoint file specified by %OldChk are copied to the checkpoint file of the current job steb at the start of the job step. This allows data to be picked up from a previous calculation without destroying anything on the checkpoint file from it. 


## The number of processors to be shared.


## The amount of memory to be used by Gaussian; Y GB


## Insert path for checkpoint output file to be written.

# hf/3-21g geom=connectivity


Title Card Required


0 1

C                 -0.95839520    1.01783059    0.00000000

H                 -0.60174078    0.00902059    0.00000000

H                 -0.60172236    1.52222878    0.8736515

H                 -0.60172236    1.52222878  -0.87365150

H                 -2.02839520    1.01784378    0.00000000


1 2 1.0 31.0 4 1.0 5 1.0






[ -a $JOB.chk ] && mv -f $JOB.chk $HOME

## Copy files back from $TMPDIR


  • If you are generating your input files on a Windows machine it must be converted to UNIX with the 'dos2unix' command.
  • Format checkpoint files in an interactive job, not on Warrior.
  • Checkpoint files are binary and need to be formatted before viewing.
  • If a log file is not created or has a size of zero bytes, this is generally an issue with path name or the version of Gaussian being run. Be sure to check both.
  • Leave additional blank lines at the end of a calculation script, this helps with an error that may occur if there aren't any.
  • Gaussian jobs must always run inside of $TMPDIR to minimize file I/O. This not only speeds up the actual calculation, but also prevents the Grid's network from becoming overwhelmed.
  • For more information regarding Gaussian, the Gaussian website is a good resource for supportFAQs and tipstutorial videos and much more.