The Gaussian Computational Chemistry Program

Adapted from

Gaussian is a complicated Fortran program which can perform a variety of computational tasks such as computing energies, optimizing geometries, computing vibrational frequencies, etc., and with a variety of computational methods, including simple Molecular Mechanics (force-field) approaches, Semi-empirical wavefunction-type methods, Hartree-Fock Self-Consistent Field methods, so-called "post-Hartree-Fock" or "correlated" methods, and Density Functional Theory approaches. Here you will learn how to:

Gaussian Input Files

Gaussian input is always in the form of a unformatted text or ASCII file, usually called 'jobname'.com. For historical reasons (Gaussian has been around for more than 25 years, and new versions try to be partly compatible with older ones, so the input format has not changed much), the order of the different items in the file has to be followed very rigorously, because otherwise Gaussian does not understand the input (typically, it tries to find piece of information 'A' where you have written 'B', and that makes no sense). When this happens, the job stops, and you get a rude & incomprehensible message in the Gaussian Output (or logfile). Whenever this happens, consult the following section!!:

There are two types of lines of input in Gaussian:

Here is a sample Gaussian Input File:

The sections indicated in this file are the most common input groups. In the order in which they should appear in Gaussian, these are:

Back to Top

Gaussian Commands

As mentioned above, the command line tells Gaussian what to do. It will generally need to specify the following things:

Theoretical Method and Basis Set

This is often put as the first item in the Command Section. It is written as: method/basis set. The methods you may meet include Hartree-Fock (written more simply as "HF"), MP2, the density functional theory approach called "B3LYP", or the semi-empirical "PM3" method. You will always need to specifiy a basis set, except for semiempirical computations, where no basis is needed. Basis sets you might need to use include STO-3G, 3-21G, 6-31G, 6-31+G, 6-31+G**, aug-cc-pVDZ, ... You can read about the methods and basis sets in the Ab Initio Background Section.

Job Type and Options.

If you do not specifiy anything else than the method and basis set, Gaussian will perform the default job-type, a single-point energy computation at the geometry specified. This can also be done by adding the keyword "SP". Here is a list of jobtypes you will need, and some indications on options you will need:

Back to Top

Geometry Specification

There are two main ways of specifying the molecular geometry: Cartesian coordinates, and internal (or Z-matrix) coordinates. The former are more compact, but they cannot readily be set up by hand. The latter, whilst they are longer, can be used to specify any molecule's geometry in a text file. In the past, this is how the geometry of most (all !) molecules was entered into programs such as Gaussian. Nowadays, most large molecules are built using graphical programs such as GaussView, and are then saved in Cartesian or (more rarely) Z-matrix format. This is what you will do in the project about the Diels-Alder reaction. However, for the triatomic system F + H2, Z-matrix format is simple to use and more straightforward, so it is described here.

Cartesian Geometry Specification

Geometries in Cartesian coordinates are entered simply as follows:

label1  x1  y1  z1
label2  x2  y2  z2
label3  x3  y3  z3

(As shown in the ethene example, above). Note that the unit of distance is Angstrom.

Z-Matrix Geometry Specification

A Z-matrix describes a geometry in terms of atom-atom distances, atom-atom-atom angles, and dihedral angles between two planes formed by four atoms. Graphically, this looks like this:

The image on the right shows the meaning of the dihedral angle d1234: looking down the central 2-3 bond, it is the angle between bonds 1-2 and 3-4 (this is also the angle between the planes defined respectively by atoms 1, 2 and 3 and 2, 3 and 4).

The corresponding Z-matrix would be:

 atom2  1  r12
 atom3  2  r23  1  a123
 atom4  3  r34  2  a234  1  d1234
(atom5  4  r45  3  a345  2  d2345

The atoms referred to in the Z-matrix do not have to be in order as shown here. To make this all a bit less abstract, here is a valid Z-matrix for H2O:

H  1  0.96
H  1  0.96  2  105.

Note that the decimal point is included in the angle specification (which is in degrees). This is very important. Without the decimal point, Gaussian interprets that number as an integer, where it is expecting a real number. This will lead to rude (and incomprehensible) error messages... (yet again !)

With a dihedral angle of 0 or 180 degrees, the four atoms are coplanar. Here is an example Z-matrix for formaldehyde CH2O:

O  1  1.35
H  1  1.1   2  122.
H  1  1.1   2  122.  3  180.

The numerical values for lengths and angles in the two previous examples can be replaced by variables. The value that these variables take must then be defined in a separate, multiple-lined input section situated just after the z-matrix. So the formaldehyde example above could be rendered instead as:

O  1  rCO
H  1  rCH  2 aHCO
H  1  rCH  2 aHCO  3  d
rCO  1.35
rCH  1.1
aHCO 122.
d    180.

This is what Z-matrices generated by GaussView will look like.

Back to Top

Running a Gaussian Job

To be able to rund a Gaussian job on Minerva, you should be a member of the Gaussian user group.

Before running a Gaussian job you have to issue the following commands (once per session):

When you have created your input file using your favorite text editor, you should save it under the name 'jobname'.com. Then you can run the calculations, by typing:

g09 < input-file > output-file &

Back to Top

Reading Gaussian Output

Gaussian writes its output to a file called the logfile, which has the same name as the input file, but the '.log' extension. It writes to this file progressively as the job advances. When you open the file with a text editor, you actually open a copy of that file, so you can open the output file while the job is running to inspect the job progress, without that affecting the way the output is written. You should be very careful not to save the file if you have opened it in this way, however !!

The output is quite verbose, and the present discussion will focus on only a small part of the information you can find in the logfile.

The first few tens of lines of the output are taken up by system details and copyright information ... not very interesting !

Then you will see the following 'header':

 Gaussian 98:  SGI-G98RevA.6 19-Oct-1998

Shortly after that, your Command Section and Job Title will be echoed.

Then, you will see lots of details about your geometry. In the following block, for example, you will see the Cartesian Coordinate representation of your molecule (even if you input it as a Z-matrix):

                         Standard orientation:
 Center     Atomic     Atomic              Coordinates (Angstroms)
 Number     Number      Type              X           Y           Z
    1          6             0        0.000000   -0.677600    0.000000
    2          1             0       -0.924521   -1.216266    0.000000
    3          1             0        0.927705   -1.210763    0.000000
    4          6             0        0.000000    0.677600    0.000000
    5          1             0        0.924521    1.216266    0.000000
    6          1             0       -0.927705    1.210763    0.000000

Note that the atoms are represented by their atomic number, not by their symbol.

Then, the calculation will start. You will see details of the initial 'guess' wavefunction which Gaussian generates, then, if all goes well, a message stating that your wavefunction has converged. This will look different for different types of job.

After this section, the output will differ depending on whether you have asked for a geometry optimisation, a single-point, or a frequency job.

For a single-point job, or for the first step of a geometry optimisation, you will have some information on the wavefunction, e.g. the Mulliken charges, the overall dipole, etc. For the work on the Diels-Alder reaction, you will be interested in orbital energies. These are given in atomic units (Hartrees) and appear in the output in this region, in the following form:

  The electronic state is 1-A'.
 Alpha  occ. eigenvalues --   -1.27277  -1.09035  -0.82094  -0.65970  -0.60769
 Alpha  occ. eigenvalues --   -0.49878  -0.49658  -0.46789  -0.45542  -0.40803
 Alpha virt. eigenvalues --    0.00072   0.05192   0.05756   0.07565   0.10793
 Alpha virt. eigenvalues --    0.12388   0.16303   0.18013   0.24643

In this example, the energy of the Highest Occupied MO is -0.40803, whilst that of the Lowest Unoccupied (=virtual) MO is 0.00072.

If the job is not a geometry optimisation, this will more or less be the end of the output. If all has gone well, the ultimate lines of the logfile will be something like this:

 Job cpu time:  0 days  0 hours  0 minutes 13.3 seconds.
 File lengths (MBytes):  RWF=   10 Int=    0 D2E=    0 Chk=    5 Scr=    1
 Normal termination of Gaussian 98.

Otherwise, some or other error has occurred.

For a geometry optimisation, the energy gradient will be computed, and the geometry updated. There will be a convergence test, the results of which appear in the output as follows:

         Item               Value     Threshold  Converged?
 Maximum Force            0.080863     0.000450     NO
 RMS     Force            0.048414     0.000300     NO
 Maximum Displacement     0.181555     0.001800     NO
 RMS     Displacement     0.173872     0.001200     NO

All the four criteria need to be converged for the job to end. If they are not, there will be a new energy computation at the new geometry, and so on. As the optimisation proceeds, the Values should all decrease, and should start to drop below the Thresholds. Some of the 'NO's will be replaced by 'YES's. After the geometry has converged, there will be a message such as:

 Maximum Force            0.000048     0.000450     YES
 RMS     Force            0.000013     0.000300     YES
 Maximum Displacement     0.000999     0.001800     YES
 RMS     Displacement     0.000184     0.001200     YES
 Predicted change in Energy=-1.137258D-08
 Optimization completed.
    -- Stationary point found.
                         !   Optimized Parameters   !
                         ! (Angstroms and Degrees)  !
 ------------------------                            -------------------------
 ! Name  Definition              Value          Derivative Info.             !
 ! R1    R(1,6)                  1.3724         -DE/DX =    0.               !
 ! R2    R(1,9)                  1.087          -DE/DX =    0.               !
 ! R3    R(1,14)                 1.0957         -DE/DX =    0.               !
 ! R4    R(2,3)                  1.3856         -DE/DX =    0.               !

The final geometry will be presented in several ways, and will be followed by the wavefunction information as mentioned above.

For a frequency job, or an optimisation + frequency job as discussed earlier, there will be a further section to the output, summarising the results of the frequency run. This will look like this:

 Full mass-weighted force constant matrix:
 Low frequencies ---   -0.0010   -0.0008    0.0006  114.6950  189.0486  193.7753
 Low frequencies ---  929.2244 1074.4697 1116.6974
 Harmonic frequencies (cm**-1), IR intensities (KM/Mole),
 Raman scattering activities (A**4/AMU), Raman depolarization ratios,
 reduced masses (AMU), force constants (mDyne/A) and normal coordinates:
                     1                      2                      3
                    BU                     AU                     BG
 Frequencies --   929.2244              1074.4697              1114.7150
 Red. masses --     1.0406                 1.1607                 1.4837
 Frc consts  --     0.5294                 0.7895                 1.0862
 IR Inten    --     1.0153               142.6862                 0.0000
 Raman Activ --     0.0000                 0.0000                 7.4672
 Depolar     --     0.0000                 0.0000                 0.7500
 Atom AN      X      Y      Z        X      Y      Z        X      Y      Z
   1   6    -0.04   0.00   0.00     0.00   0.00  -0.08     0.00   0.00   0.15
   2   1     0.23  -0.44   0.00     0.00   0.00   0.50     0.00   0.00  -0.49
   3   1     0.23   0.44   0.00     0.00   0.00   0.49     0.00   0.00  -0.49
   4   6    -0.04   0.00   0.00     0.00   0.00  -0.08     0.00   0.00  -0.15
   5   1     0.23  -0.44   0.00     0.00   0.00   0.50     0.00   0.00   0.49
   6   1     0.23   0.44   0.00     0.00   0.00   0.49     0.00   0.00   0.49
                     4                      5                      6
                    AU                     AG                     AG
 Frequencies --  1140.4661              1385.7888              1434.9169
 Red. masses --     1.0078                 1.4914                 1.7488
 VIBRATIONAL TEMPERATURES:   1336.94  1545.91  1603.82  1640.87  1993.83
          (KELVIN)           2064.51  2305.24  2471.81  4795.66  4817.39
                             4933.10  4974.48
 Zero-point correction=                           0.054602 (Hartree/Particle)
 Thermal correction to Energy=                    0.057575
 Thermal correction to Enthalpy=                  0.058519
 Thermal correction to Gibbs Free Energy=         0.033080

This gives you the symmetry assignment of each vibrational mode, its frequency (in wavenumbers), its IR and Raman intensity, the motions of the atoms to which it corresponds, etc. It also gives you the total Zero-point energy, in atomic units, and lots of other information besides...

Last modified: 10/01/2014         Back to Top      Go to Mezei Lab Home page