Follow these steps to create a script to run Gaussian jobs.
Step 1
Your .bashrc file located in your home directory must be modified.
- Log on to the Grid and from your home directory and type
vim .bashr
.
Step 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.
Step 3
After modifying your .bashrc file you must log out and log back in in order for the revised file to be activated.
Step 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.

Step 5
Copy the sample Gaussian script to your home directory: cp /wsu/el7/scripts/tutorial/gaussian/torsion/gaussian_job.gjf
Step 6
Be sure to change the directory path with your own. Edit the script by typing vim gaussian_job.gjf
- Once edited, this sample script of a Gaussian calculation can be run by typing
sbatch gaussian_job.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.
#!/bin/bash
## Number of nodes
#SBATCH -N 1
## Number of cores
#SBATCH -n 4
## Memory
#SBATCH --mem=5GB
## Which QoS to submit to, this is required
#SBATCH -q secondary
## Output and error files
#SBATCH -o output_%j.out
#SBATCH -e errors_%j.err
## Maximum Time limit, this is required
#SBATCH -t 10:0:0
JOB=gaussian_job
CPU=4
DISK=5gb
DIR=/wsu/home/zz/zz99/zz9992
cd $TMPDIR
g16<< EOF > $DIR/$JOB.log
%nosave
%Chk=/$DIR/$JOB.chk
%nprocshared=4
%mem=5gB
%Chk=$DIR/$JOB.chk
#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 3 1.0 4 1.0 5 1.0
2
3
4
5
[ -a $JOB.chk ] && mv -f $JOB.chk $HOME
EOF
Notes:
- 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 support, FAQs and tips, tutorial videos and much more.