Home

   Introduction

   Why Research?

   Tips for using G98

  
Lab News Award Winner!

Background:
   Summary of Methods Used

   The Basics of Spectroscopy

Simple Example:
   Theory

   The Vibrations

Research Topics:
   Fatty Acid Methyl Esters (FAMEs)

  The Spectra and the Vibrations

 Non-Planar Porphyrins

  Links
  Publications
  References

School of Chemistry
The Queen's University of Belfast

Gaussian 98 – some hints for doing calculations

Dr. Roma E. Oakes


Gaussian 98 is an excellent programme that is able to do complex calculations and produce output that can be readily understood. However, like all programmes, it can have it's little idiosyncrasies that irritate and confuse the user. The best sources of information on how to use the programme are the two manuals that are shipped with the programme, if you cannot find what you need within those the next best source is the Gaussian website. Unfortunately, there are many simple procedures which are either missing from the manuals or where the instructions are either incorrect or incomprehensible (or both). Therefore you may find the following hints and tips useful.

We stress that the information here is intended to supplement the manuals and web-based material rather than replace them.

Contents

Some Things That You Really Should Do Before You Start

Getting Rid Of The Error Message When Opening Gaussview

Adding A New Basis Set

Freezing A Parameter

Setting Up A Batch File

Dealing with Negative Frequencies

Inexpensive Integrals

Geometry Optimizations

How To Produce A Potential Energy Surface

How To Get A Good Guess for FC

To Add Extra Basis Functions To Only Certain Specified Atoms

Using freqchk

Visualising Molecular Orbitals and Potential Energy Surfaces.

Other Useful Things


Some Things That You Really Should Do Before You Start!

Before you start to use Gaussian 98 there are just a few things you should do to try to minimize problems later on.

  • Using Windows Explorer, left click on the G98W directory. If G98W is installed in drive C then you should see seven folders, these are;
    1. data
    2. examples
    3. exercise
    4. help
    5. quick
    6. scratch
    7. tests
  • You should save all your work files into the 'Scratch' directory, doing this means that the programme knows where they are. At the end of a successful job you can then move your files into a folder of your choice.
  • Don't put spaces in file names or folders as your computer will get lost!
  • If a job crashes or if you kill it manually then some files are left behind in the Scratch directory - these all start with the letters 'gxx.'. For example, there will be a file that is named gxx.rwf. These left-over files can take up a lot of space and you can safely delete them. When a job finishes successfully then these files are automatically deleted by G98W.
  • When you run a job you will find that you have created three different types of file, these are;
    1. the *.gjf file - this is the file that you created by drawing the molecule and setting up the calculation.
    2. the *.log file (or *.out file) - this contains all the results and shows the progress of the calculation. You can see an updated log file during the course of a calculation by opening Gaussview, file, open, navigate to the Scratch directory (where you have saved your files!!) and double click on *.log file with the appropriate name. This opens a Gaussview window with your molecule in it, so go to 'results', 'view file' to see how the job is progressing.
    3. the *.chk file - this is the most extensive file; it contains all of the detailed electronic information about the molecule and the information that the computer needs to perform different tasks. It is important to save this file, you can use it to restart jobs, visualize MO's as well as using it as the input for a second calculation. This file cannot be read by opening it in WordPad or other such programmes, you open it using Gaussview.

      The key message here is; ALWAYS save the checkpoint file! The default in G98W is not to save this file, so you have to actively tell the programme to save it. In the calculation setup box there is a small window called 'Link 0 Commands'. Make sure that you put the file name beside '%chk=', otherwise the .chk file will not be saved.


Getting Rid Of The Error Message When Opening Gaussview

GaussViewW (GVW) was released before Windows 2000 and there is a minor change in the Windows Registry entry for WordPad so that GVW cannot locate it. There are two options, live with the error and modify a GVW script or, two, modify the registry so that GVW can locate WordPad. Both work but if you are uncomfortable modifying the registry the first is safer.

  • Option 1

    Edit the script g98w\editor.bat and change the line

    start/wait notepad %2

    to

    start/wait notepad %1

    For large files notepad can activate WordPad.

  • Option 2

    Use the RegEdit utility in Windows to locate the entry for word pad,

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths\WORDPAD.EXE

    and change the type from REG_EXPAND_SZ to REG_SZ. Then the string

    "%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE"

    must be modified and %ProgramFiles% replaced by the actual path to the WindowsNT directory. Exit RegEdit and GVW should then locate WordPad correctly. As should other applications.


Adding A New Basis Set

When adding a new basis set you should only include definitions for atoms that are actually in the molecule.

For G98W

  1. Draw molecule as normal - using gaussview
  2. Select 'Gaussian' on the 'calculate' menu
  3. Select your usual parameters in the calculation setup dialog box, but select a 'blank' for the basis set.
  4. In the 'additional keywords' box type in the model chemistry together with the keyword gen, e.g. rb3lyp/gen
  5. Click on edit, you'll be asked to save the file first.
  6. Add the text for the new basis set in the 'molecule specification' box at the end of the existing text - leave a blank line between the sets of text. Check that the route section is correct, there may be two instances of the model chemistry. Save
  7. Click okay
  8. Submit

For G98 Linux

  1. Draw molecule as normal - using gaussview
  2. Select 'Gaussian' on the 'calculate' menu
  3. Select the usual parameters in the calculation setup dialog box, but select a 'blank' for the basis set.
  4. In the 'additional keywords' box type in the model chemistry together with the keyword gen, e.g. rb3lyp/gen
  5. Click 'edit' then go to the bottom of the existing text and place the cursor there. Then select 'include file' from the 'file' menu and navigate to the new basis set, select it - it will be added to the input file - remove the '!' symbol and do not leave a blank line between text. Make sure that in the route section there is only one instance of the model chemistry. Save
  6. Click okay
  7. Submit

It's also a good idea to add the keyword "gfinput" as this will echo the basis set in the output and therefore you can compare to what you are trying to include, to make sure that everything was read in correctly.


Freezing A Parameter
  1. Draw molecule as normal - using gaussview
  2. Select 'Gaussian' on the 'calculate' menu
  3. Select the usual parameters in the calculation setup dialog box
  4. In the 'additional keywords' box type 'opt=modredundant'
  5. Click edit
  6. At the end of the geometry specification type the parameter that you want to freeze, e.g. for a dihedral angle it could be '1 2 3 4 165. F' 165 is the angle that you want to freeze it at (don't forget the full stop!). G98 knows it is a dihedral as there are 4 atoms specified. Do this for each parameter that you want to freeze - do each on a new line with no blank lines between them. Make sure that you leave a blank line between the sets of text i.e. the geometry specification and any other text that was there beforehand. Save
  7. Then click okay
  8. Submit

Choosing a dihedral value very different from the input geometry can cause problems (Gaussian will crash and tell you that 'it couldn't resolve a coordinate'). If this happens, it might be better to try the option of doing a relaxed potential energy surface scan. Essentially this is the same as doing optimizations at a series of frozen values of a given coordinate. For example, replacing "1 2 3 4 165. F" with "1 2 3 4 180. S 15 -5." would do 15 geometry optimizations. The first optimization with the dihedral at 180, then 175, etc in increments of -5 degrees. A summary of the scan is placed at the end of the log file.


Setting Up A Batch File

Lets say that you have four different calculations that you want to perform, they will be named test1, test2, test3 and test4. Set up the calculations as would like them to be performed, but when you get to the final 'submit' box you can cancel the calculation. You will now have four .gjf files with the appropriate names.

  1. Open G98W and click on 'utilities', 'edit batch file', a dialogue box opens.
  2. Click on 'add'.
  3. Type in your first filename test1.gjf, (make sure that you include the file extension .gjf as otherwise you will get an error message later) click 'ok'.
  4. G98W suggests the appropriately named *.out file name, click 'ok'.
  5. Click 'add' and repeat the procedure for each of your four files.
  6. When all you files have been entered, click on 'file', 'save as' and name your batch file e.g. 'myname' and click 'ok' (save your batch file, which has the extension *.bcf, in the same directory as the *.gjf files).
  7. Click on 'exit'.
  8. On the main G98W window click 'file', 'open' and navigate to the location of your .bcf file.
  9. Double click on this and then click 'exit' again.
  10. On the main G98W window click 'process', 'begin processing' and your batch file will start.

Note that if a calculation crashes, the process will not move on to the next job in the list automatically. By default, when an error occurs the batch file will stop completely. You can change this behavior by clicking on 'file' in the main G98W window, then 'preferences', 'process' and remove the check from the box ' end batch run on error'. This still does not allow the calculation to move on automatically but at least the batch file stays active and once you notice the error you can move on to the next job with a single click. For this reason it's probably best to set the order of the jobs so that the riskiest one is performed last. For instance, you may have performed optimizations on three molecules and need to run frequency calculations on them overnight, but you also have one job where you need to do both an optimization and a frequency job. The three calculations that consist of only one step should be set as the first three jobs in the batch, with the last one (which may crash and not optimize) set as the last job.


Dealing With Negative Frequencies

Use Gaussview to animate the negative frequency. Now you can see what is happening and how the atoms are moving. Very often it is a simple methyl rotation or the like. Then make a guess for where the minimum is for that imaginary frequency and optimise from there.

The grid may too coarse; the default grid is 'fine', to specify a finer grid use the keyword 'Integral(grid=ultrafine)'

You may need to use a different algorithm e.g. GDIIS instead of RFO.


Inexpensive Integrals

The message/warning from Gaussian reads

"Problem detected with inexpensive integrals. Switching to full accuracy and repeating last cycle."

The warning relates to convergence of the wavefunction. This is not an error message because this message only indicates that the program is switching to a more accurate integral evaluation. During the initial stages of direct scf, integrals are calculated with pretty loose tolerances and cut-offs to speed things up. However, this can lead to problems sometimes. Gaussian detects this and tightens up the integral evaluation if necessary. So the program just tells you that the cheap way of doing it didn't work and that it is therefore switching to the more accurate (but more time-consuming) method. This happens often. It is possible that the geometry optimization took a bad step, or maybe it is the first point of the optimization. The problem is probably related to the geometry, if the geometry looks reasonable you could try using "scf=NoVarAcc" which uses the full accuracy integrals from the beginning or use "scf=qc". "scf=qc" will almost certainly converge, but it takes a bit longer than the standard scf convergence method.


Geometry Optimisations

It is often assumed that, given the same starting geometry, then any program that has a choice as to how the geometry is entered should (in the end) produce the same optimised final geometry. If all calculations were done to infinite precision and all geometry optimisations were continued until the forces were exactly zero, and all optimisations used analytic first AND SECOND derivatives then optimisations starting from the same structure but using different coordinate systems would go to exactly the same place. In fact, because of differences in the Hessians, two optimisations with different coordinates started at the same point far from any minimum might fall down into different wells and to different minima. (This will not be the case if the two optimisations use analytic rather than approximated second derivatives at every point -- then every step should be the same regardless of coordinate system.) All of these considerations apply to comparing Cartesian with Internal coordinates and also to comparing two different sets of Internal coordinates.


How To Produce A Potential Energy Surface

Start with the .log file for the optimised molecule

  1. Go to 'view', 'show labels' and then 'view', 'z-matrix editor'.
  2. Select 'opt none' and all numbers in Opt columns will become 0
  3. Find the dihedrals that you want to vary and type 1 in opt3 column. Make sure that the carbons and hydrogens etc. are connected in the correct way, see diagram below;
  4. Original z-matrix.

    New z-matrix.

  5. In the main window select 'calculate', 'gaussian' and then 'scan'. Select model chemistry and basis set as normal, on warning select OK. If symmetry will break during scan process then check the 'ignore symm' box.
  6. Edit - then check that all variables are frozen except for the ones that you want to vary, i.e. D1, D2. Find these at the bottom of the molecular specification, then; D1 180. 18 -10. 18 = how many steps, -10. = size of each step and which direction. Do the same for D2. Don't forget the 'full stops'. Save, close, submit.


How To Get A Good Guess For FC

Set up molecule and do a freq=noraman job at a low level of theory, hf/3-21g is okay. These frequencies are meaningless but the second derivatives provide a good start for the Hessian. You can arrange for this to be performed automatically by firstly setting up the calculation as normal then;

  1. Go to 'edit' and bottom of input
  2. Leave a blank line then;
    • --link1--
    • %chk='same filename as given for freq job'
    • %mem='same mem as above'
    • #p opt=rcfc geom=allcheck guess=read b3lpy/6-31g*
  3. blank line
  4. Save, submit.

To Add Extra Basis Functions To Only Certain Specified Atoms
  1. View labels on molecule and make a note of those that you want to add extra basis functions to.
  2. Go to 'calculate', 'gaussian' and set up as usual but add keyword 'extrabasis', it's not necessary to select 'write connectivity'.
  3. Edit - go to end of molecular specification and type
  4. 6 9 31 32 etc (the labels of the molecules). Make sure to end line with 0

    d 1 1.0

    0.8 1.0

    ****

    blank line

This is all to add 'd' functions onto the specified atoms.

Save, submit.

You can also use opt=readfc to get the fc from the .chk file.


Using freqchk

Use freqchk to do isotopic substitutions, change pressure, temp etc.

The first thing to do is to move a copy of the .chk file into the G98W directory. Then open 'notepad' and write a script of the type shown below;

For something like methyl acetate you might have a file named meth.dat containing the following lines;

meth.chk
n
298.15
1
0
n
12
16
16
12
2
2
2
12
2
2
2

This script will deuterate all the hydrogens of the methyl groups. The first "n" is to skip doing Hyperchem files. Then give the temperature, pressure and 0 takes the default scaling. The second "n" is to turn off taking the most common isotopes and then you provide one line per atom with the mass numbers. The program will look up the exact mass and use that in the calculation.

Save this file in the G98W directory also.

Open a 'command prompt' window and change to the G98W directory Type 'freqchk meth.frq'

A new file will be created with the new data in it.


Visualising Molecular Orbitals and Potential Energy Surfaces.

These operations can be done in a variety of different ways.

You can view them both in GaussView using the .chk file and the 'surfaces' option in 'results'.
To view the potential energy surface, generate the ESP first, then the Total Density and then use the ESP and map on the Total Density.

The disadvantage of this is that it is quite slow and the file cannot be saved. You can print off a picture but once you close the file then you have to start from the begining again. Alternatively you can use one of several other programmes that are available FREE to download from the internet.

I mainly use one of two different programmes, one is gOpenMol. This is a very good package that allows you to view the MO's overlaid on the molecular framework and also to customise the electrostatic potential view. All the help files for this programme are on the gOpenMol website. However, it can take a little while to learn how to use it effectively. A new programme, just released, is Voxeltime Orbital Viewer. This is really easy to use and you can change the settings to view different levels of the orbital density.

Of course, it's not just as simple as opening the .log or .chk file from the Gaussian calculation. These files have to be converted into suitable formats first.

As with 'freqchk', the first thing to do is to move a copy of the .chk file into the   G98W directory. Then open the G98W interface and go to 'utilities', 'formchk'. Select the .chk file you want to work with and press enter. Now you will have a new file with a .fch extension.

Then go to 'utilities', 'cubgen'. A DOS screen will pop-up and you will have to answer several questions:
1   'Property' - here you specify 'HOMO', 'LUMO', 'ALL' or the specific number of the orbital that you want.
2   'Formatted checkpoint file' - here you put in the name of the .fch file that you generated earlier (you don't need to put in the .fch extension).
3   'Cube file' - The name of the output file, make sure that here you DO add the .cub extension.
4   'Approx points per side' - accept the default.
5   'header' - accept the default.

You will find that a .cub file has been created in the G98W directory. Now you can open Orbital Viewer, click on 'open' and browse to the .cub file generated. It will open in the Viewer and you can move it around to look at the molecular orbital from varous angles.


Other Useful Things

  1. If an optimisation has already been done use opt=calcfc to get fc for freq. job.
  2. Gaussian 98 prints the atomic coordinates in input (Z-matrix) orientation by default only if the number of atoms is less or equal 20. To force G98 to print the coordinates in all cases, use the IOP(99/14=1). It should print the final z-matrix at the end of the output.
  3. If you have a structure which has, (for instance), Oh symmetry but G98 can't get this Oh symmetry when doing geometry optimisation then you can use a loose tolerance to determine the symmetry. Add IOP(2/17=N), the default for N is 7, you can try numbers smaller than 7 until the program says "Aha.., this is Oh symmetry".
  4. For many transition metals e.g. Hg you will need to use a basis set modified with an electrostatic core potential (ECP) which, basically, removes the core electrons from the atom and replaces them with an empirical potential. G98 comes with the LANL2DZ basis and ECP built-in. If you want to use this basis set then set your input to look like the following:

    #P RHF/GEN Pseudo=read
    comments...
    charge multiplicity
    molecular specifications
    C N 0
    6-31+G(d')
    ****
    Hg 0
    LANL2DZ
    ****
    Hg 0
    LANL2DZ

    The important parts are the Gen and Pseudo=read - this tells Gaussian to look at the end of the input file for the basis set (which can be different for each atom) and the ECP. In the example above we've used carbon and nitrogen, you would put the element symbol for whatever atoms are in your molecule there.


please continue to the next page