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).
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.
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“:
$ student gaussian
Running Gaussian at HPC systems
To setup required environment variables for Gaussian, please use following command:
|module load gaussian/g09d01
|module load gaussian/g16a03-avx2
|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
gv at the frontend node
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:
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:
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 SLURM queuing system. To allow easy use of Gaussian, we have prepared some sample SLURM scripts for your reference. Explanation is embedded in these files. Please note that our provided sample SLURM scripts will only recognize default input file extension
.gjf. You have to modify the scripts if other input file extension is used. Sample 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.
|Cores per node
|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
|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
Published works based on the usage of Gaussian must contain appropriate citation. Official citation guide is available at
- Gaussian 16 & GaussView 6 Citation: http://gaussian.com/citation/
- Gaussian 09 Citation: http://gaussian.com/g09citation/
- Gaussian 03 Citation: http://gaussian.com/g03citation/