From CAC Wiki
Revision as of 14:55, 27 May 2016 by Hasch (Talk | contribs) (Scratch files)

Jump to: navigation, search

Gamess (US)

This is an introduction to the usage of the electronic-structure code "Gamess" on the HPCVL clusters. It is meant as an initial pointer to more detailed information, and to get started. It does not replace study of the manual.


The "General Atomic and Molecular Electronic Structure System" (GAMESS) is a quantum chemistry software package that was assembled from various older codes (in particular, HONDO) by M. Dupuis, D. Spangler, and J. J. Wendoloski of the National Resources for Computations in Chemistry (NRCC). The code has undergone great changes since then and is maintained now by the Gordon Research Group at Iowa State University.

Gamess performs a great many of standard quantum chemical calculations. These include:

  • RHF, UHF, ROHF, GVB, or MCSCF self-consistent calculations.
  • CI or MP2 corrections to the energy.
  • Semi-empirical MNDO, AM1, or PM3 methods.
  • Analytic energy gradients for SCF, MP2 or CI.
  • Geometry optimizations, saddle point searches, and vibrational frequencies.
  • Intrinsic reaction paths, gradient extremal curves, and dynmic reaction coordinates.
  • Many molecular properties, such as densities, electrostatic potentials, dipole moments, etc.
  • Modelling of solvent effects and electric fields.

For a complete list of capabilities of GAMESS, consult this table or look at the Gamess documentation.

Gamess is described in General Atomic and Molecular Electronic Structure System; M.W.Schmidt, K.K.Baldridge, J.A.Boatz, S.T.Elbert, M.S.Gordon, J.H.Jensen, S.Koseki, N.Matsunaga, K.A.Nguyen, S.Su, T.L.Windus, M.Dupuis, J.A.Montgomery; J. Comput. Chem. 14, 1347-1363 (1993)


Advances in electronic structure theory: GAMESS a decade later; M.S.Gordon, M.W.Schmidt pp. 1167-1189 in Theory and Applications of Computational Chemistry: the first forty years; C.E.Dykstra, G.Frenking, K.S.Kim, G.E.Scuseria (editors), Elsevier, Amsterdam, 2005.

Location of the program and setup

The program resides in /opt/gamess and is called gamess.01.x. You also find some test examples in the program directory, which are useful to get an idea of the input format for the program. You are not allowed to copy the executable or any part of the distribution onto your local machine. However you can easily obtain the program yourself. See the GAMESS source code distribution page.

Unlike other programs, no special setup is needed to run Gamess. All environment variables etc. are set with an execution script that will be described in the next section. However, it is a good idea to put the directory with the Gamess program into the path, i.e. set the PATH environment variable. This is best done through the usepackage utility, simply by typing
use gamess 

Scratch files

The script rungms sets a scratch space directory to /scratch/$USER and all temporary files and intermediate output will be placed in that directory. The program also requires a local temporary directory right below your home directory called $USER/scr. Make sure that you move files that you want to keep from there before running Gamess again with the same case_name. The second run requires that some temporary files be removed before re-run and will fail if they are still present in the scratch directory. For instance, if your username is "hpc9876", you will need "/scratch/hpc9876" and "/home/hpc9876/scr". Note that the former is automatically created when you obtain an account, but the latter has to be made by you explicitly.

Running Gaussian from a command line

To run Gaussian on our systems, you have to belong to a user group g98 (it's called that for historical reason, but it applies to all versions of Gaussian). You need to read our license agreement and signed a statement to be included in this user group. Once you are, you can access the executables.

A computation is performed by preparing an input file and pipe it to standard input of the program g09. Standard output should be caught in a log-file. We suggest you use the extensions .g09 for input files and .log for results.

Interactively, the command line to invoke Gaussian is thus:

 g09 < test.g09 >test.gout 

This will only work if you are a member of the g98 group and have set the environment correctly. Note that the interactive execution of Gaussian is only meant for test runs.

Gaussian input files are explained in the "User's Reference". It is impossible to give an outline here. Sample files can be found in


Note: It is absolutely essential to have a good idea about the size and complexity of your calculations before you start a Gaussian job. Many of the methods mentioned above have terrible scaling properties, i.e. the computational cost grows very quickly with the number of electrons, degrees of freedom, or number of basis functions used. We suggest you start with a small basis set and a cheap method, and then slowly increase those parameters.

Submitting (parallel) Gaussian jobs

If you want to run Gaussian on several processors on our machines, you have to include a line in your input file:


where we assume that you want to use 8 processors (cores, threads).

It is mandatory to submit a Gaussian job script through our scheduling software (see our Scheduler Help File for details).

Here is a "bare bones" sample of a Gaussian submission script:

#! /bin/bash
#$ -S /bin/bash
#$ -q abaqus.q
#$ -l qname=abaqus.q
#$ -cwd
#$ -V
#$ -M hpcXXXX@localhost
#$ -m be
#$ -o STD.out
#$ -e STD.err
#$ -pe 8
g09 < sample.g09 > sample.log
  • The first 6 lines of the script make sure the right shell is used, the program executes on the correct cluster, and all necessary setup is done.
  • An email address for notifications is specified in the #$ -M line. We suggest "hpcXXXX@localhost" (hpcXXXX stands for the username). Place a file .forward containing your actual email address into your home directory.
  • The -o and -e lines are used to tell the system where to write "standard output" and "standard error", i.e. the screen output.
  • The #$ -pe 8 line specifies the number of processors the scheduler will allocate (8 in this example). It is crucial to choose the same number as specified in the %nrocs= line of the input file.

The script (let's call it is submitted by the qsub command:


This must be done from the working directory, i.e. the directory that contains the input file and is supposed to contain the output. Also make sure that you have set up gaussian (use g09) before you submit a job.


Gaussian is a licensed program. The license held by the Centre for Advanced Computing is limited to our computers at our main site. That means that any of our users can use the program on our machines (but nowhere else), whether they are located at Queen's or not.

We require users of Gaussian to sign a statement in which they state that they are informed about the terms of the license to be included in the Gaussian user group named "g98". Please fax the completed statement to (613) 533-2015 or scan/email to

Where can I get more detailed information ?