What is Gaussian?

Gaussian is a series of electronic structure programs. Starting from the basic laws of quantum mechanics, Gaussian predicts the energies, molecular structures, vibrational frequencies and numerous molecular properties for a broad range of molecular systems under a variety of conditions. It can be used to study molecular molecules and reactions, including both stable species and compounds which are difficult or impossible to observe experimentally (e.g. short-lived intermediates and transition structures).

Which version of Gaussian is available?

Gaussian can be run in SMP mode (parallelism within a node) and the TCP/Linda parallel mode(parallel with multiple nodes).

HPC2015 system only supports Gaussian 09(G09) and Gaussian 16(G16) job in SMP mode.

A small subset of job types could be speedup with TCP/Linda in which the processor load is distributed across multiple nodes on the cluster:

  • HF, CIS-Direct and DFT calculations: energies, optimizations and frequencies
  • TDDFT energies and gradients
  • MP2 energies and gradients
  • Portions of MP2 frequency and CCSD calculations

Permission of using Gaussian

Gaussian is available to faculty, staff and students at HKU subject to the License To Use Agreement between the Gaussian Inc. and The University of Hong Kong. Staff and students installing and/or using the Gaussian coordinated through ITS means they have agreed to observe and bound by the terms of the License To User Agreement signed between The University of Hong Kong and the Gaussian Inc.

In order to access Gaussian in the High Performance Computing (HPC) cluster systems, user should submit ITS form CF162f together with a signed Gaussian License to Use Agreement.

Upon receiving the signed agreement, users will be assigned to the Gaussian user group “gaussian” and/or “g16“. Otherwise you will not have permission to access Gaussian. You may check your group membership with command “groups“:

$ groups
$ student gaussian

Departments can send their request for software installation file via itssw@hku.hk with the signed Gaussian License to Use Agreement.

Running Gaussian at HPC systems

To setup required environment variables for Gaussian, please use following command:

System Gaussian version Revision Command Granted group Applicable queue(s)
HPC2015 Gaussian 09 D.01 module load gaussian/g09d01 gaussian gaussian
Gaussian 16 A.03 module load gaussian/g16a03-avx g16 gpu
module load gaussian/g16a03-avx2 gaussian
C.01 module load gaussian/g16c01-avx2

*For HPC2015 system: Users will be granted the right of using gaussian queue which is dedicated for gaussian job execution. User can submit SMP gaussian jobs(i.e. single node multicores) to queue gaussian only. For those who would like to use the GPU-accelerated features provided by G16, they can apply for using GPU resource. Except queue gaussian and gpu, other queues do not support Gaussian calculation.

 

System Gaussian version Revision Command
HPC2021 Gaussian 09 D.01 module load gaussian/g09d01
Gaussian 16 A.03 module load gaussian/g16a03-avx2
C.01 module load gaussian/g16c01-avx2

GaussView is a graphical user interface for the creation of Gaussian input files. GaussView 6 is available with G16.C01 module which can perform a confrontational search for conformations using the GMMX add-on module. User can launch the GaussView GUI via command gview or gv at the frontend node hpc2021-io1 or hpc2021-io2.

How to use Gaussian?

(A) Prepare Gaussian input file

The suffix of gaussian input file can be anything – by convention unix input is .com. The basic structure of a Gaussian input file includes several different sections:

  • Link 0 Commands: Locate and name scratch files. (not blank line terminated)
  • Route section (# lines): Specify desired calculation type, model chemistry and other options. (blank line terminated)
  • Title section: Brief description of the calculation. (blank line terminated)
  • Molecule specification: Specify molecular system to be studied. (blank line terminated)
  • Optional additional sections: Additional input needed for specific job types. (usually blank line terminated)

Most Gaussian jobs will include only the second, third and fourth sections. Here is an example input file, which request a single point energy calculation on water:


# HF/6-31G(d)             Route section

water energy              Title section

0   1                     Molecule specification
O  -0.464   0.177   0.0
H  -0.464   1.137   0.0
H   0.441  -0.143   0.0

Specify scratch file handling and location

Gaussian uses several scratch files in the course of its computation. They include:

  • The Checkpoint file: *.chk
  • The Read-Write file: *.rwf
  • The Two-Electron Integral file: *.int
  • The Two-Electron Integral Derivative file: *.d2e
  • The Scratch file: *.scr

These files can become extremely large and are stored in the scratch directory, designated by the GAUSS_SCRDIR environment variable. Since the program is accessing these files constantly, choosing a good scratch directory can improve the program performance. By default these scratch files are written to local /tmp on each node. Disk space of local /tmp varies from different cluster systems, information on the size of local /tmp on each machine is available in each system information web page. Use of the default setting, local /tmp, is strongly recommended since local temporary disk space will provide the highest I/O performance. However if disk space of /tmp is not big enough for the scratch files, please contact the system administrator for switching to larger network-based scratch directories.

By default these files are deleted at the end of a successful run. However if you wish to save the checkpoint file for later use in another Gaussian job (e.g. to restart a failed/incompleted job), this can be achieved by naming the checkpoint file. Here is an example:

%Chk=water

This command, which is placed at the beginning of the input file(before the route section), gives the checkpoint file water.chk residing in the current working directory. If disk space in the scratch directory is not big enough but space is available elsewise on the system, you can specify an alternate directory location and checkpoint filename as:

%Chk=/tmp/gaussian/water

A full list of Link 0 commands is available at http://gaussian.com/link0/ for your reference.

(B) Submit Gaussian jobs

Gaussian simulations can only be executed as batch jobs via submitting to the PBS/SLURM queuing system. To allow easy use of Gaussian, we have prepared some sample PBS/SLURM scripts for your reference. Explanation is embedded in these files. Please note that our provided sample PBS/SLURM scripts will only recognize default input file extension .com or .gjf. You have to modify the scripts if other input file extension is used. Sample PBS/SLURM scripts will be copied under your home directory once the Gaussian user group is activated.

The most updated Gaussian submission scripts are available in /share1/gaussian/sample/. User shall modify the “module load gaussian/XXXX” statement in the job script to select different Gaussian version/revision.

Running Gaussian in SMP mode (in single node)

Gaussian can be executed using all cores in the same node for speed up. This would be best choice as light-weighted threads running at multi-cores and the inter-thread communication is extremely fast. In order to do this, you must specify the request of number of cores of the node by editing the job script.

All cores in the node will participate in the calculation, with the data communication carried out through the shared memory.

HPC System Queue/Partition Cores per node
HPC2015 gaussian, gpu 20
HPC2021 intel, gpu 32
amd 64 or 128

* Remarks: Gaussian G09 & G16A03 support SMP with 64 cores in maximum.
Once all input file and job submission script are prepared, you can submit your job to the queuing system by command qsub or sbatch.

HPC2015 qsub -N [input file name] [PBS command file]
qsub -N water pbs-gaussian.cmd
Example: Gaussian input=water.com
qsub -N [input file name] -l nodes=1:ppn=P [PBS command file]
qsub -N water -l nodes=1:ppn=20 pbs-gaussian.cmd
Execute with one node and 20 cores per node
HPC2021 sbatch -J [input file name] [SLURM script]
sbatch -J water slurm-gaussian.cmd
Example: Gaussian input=water.com
sbatch -J [input file name] -c P [SLURM script]
sbatch -J water -c 32 slurm-gaussian.cmd
Execute with 32 cores per task

Running Gaussian with GPUs

Starting from Gaussian 16, NVIDIA GPUs are supported for accelerating calculations in Gaussian. GPUs are effective for large molecules DFT energies, gradients and frequencies(for both ground and excited states), but they are not effective for small jobs and post-SCF calculations such as MP2 or CCSD.

To use GPU(s) for Gaussian calculation, Link 0 commands %CPU and %GPUCPU are used. Please refer to Gaussian site http://gaussian.com/relnotes/ or sample job script pbs-gaussian_gpu.cmd(HPC2015) / slurm-gaussian_gpu.cmd(HPC2021).

Running Gaussian in parallel using TCP/Linda(with multiple nodes)

Gaussian can also be executed using more than one node by running on top of the TCP/Linda software platform. You have to specify the request of several nodes in the PBS script, for example:

#qsub -l nodes=N:ppn=P

It means “Please give me N nodes, and I need P cores per node”.

Please note that not all links in Gaussian can be efficiently executed in a parallel computing environment due to the high communication overhead. For most users 2 or 4 processors(i.e. N = 2 or 4) provide good speedup and any processors beyond that do not show significant performance improvements. User should test his specific problem before requesting for too many nodes for execution.

In short, you can modify the sample job command file or add options while submitting the job. All SMP or TCP/LINDA parallel directives for multicore/multinode parallelization will be added automatically.

 

Modification in Job command file Option of qsub command Description
#PBS -N filename -N filename Execute for input file filename.com
#PBS -l nodes=N:ppn=P -l nodes=N:ppn=P Request number of nodes(N) and processors per node (P)
#PBS -q gaussian -q gaussian Specify the queue name
#PBS -l walltime=20:00:00 -l walltime=20:00:00 Request the amount of time needed for the job

Citation

Published works based on the usage of Gaussian must contain appropriate citation. Official citation guide is available at

Additional Information

Official Gaussian website: http://www.gaussian.com/
Gaussian16 Users Reference: http://gaussian.com/man/
G09 User’s Reference archive: g09ur.tgz