PC GAMESS Tutorial
Introduction
This tutorial illustrates how to set up and analyze quantum chemistry calculations with the program PC GAMESS under Linux. As the name implies, PC GAMESS program is a derivative of computational chemistry program GAMESS that has been optimized for Intel-compatible x86, AMD64, and EM64T architectures. Under Windows, a graphical user interface RUNpcg by Ernst Schumacher can be used to generate and launch PC GAMESS calculations. The RUNpcg program also works under Linux after installing Wine. This tutorial assumes a more typical Linux setup that lacks Wine.
General Structure of a PC GAMESS input file
The example below illustrates a general structure of a simple input file for PC GAMESS. The file requests a single point MP2 energy calculation of a symmetric water molecule using Dunning's cc-pVTZ basis set.
$contrl scftyp=rhf runtyp=energy mplevl=2 d5=.t. coord=cart nprint=-5 $end
$system mwords=64 timlim=600 $end
$basis extfil=.t. gbasis=cc-pvtz $end
$guess guess=huckel $end
$d5 d5=.t. f7=.t. g9=.t. $end
$data
Water cc-pVTZ single point energy calculation
Cnv 2
O 8 0.000000 0.000000 0.117613
H 1 0.000000 0.757348 -0.470450
H 1 0.000000 -0.757348 -0.470450
$end
Notice that the calculation is controlled by keywords, such as scftyp=rhf. Keywords that control similar aspects of a calculation are combined into groups. Each group starts from a new line after a single whitespace character. The most important keyword groups are:
- contrl keywords specify the wavefunction and the type of calculation to be performed. This group can also be used to specify units in molecular geometry (units=angs are default), molecular charge (icharg=0 by default) and multiplicity (mult=1 by default) and molecular geometry coordinate style (coord=unique by default). The example above specifies a single point energy calculation on restricted Hartree-Fock wavefunction including second-order Moller-Plesset correction to the energy. Most keywords in this group are extensively described in the US GAMESS documentation. The d5=.t. keyword is unique to PC GAMESS and request that orbitals are treated as spherical harmonics. This is appropriate for the correlation consistent basis sets such as cc-pVTZ.
- system keywords specify memory and CPU time limits. Default values (2 megawords or RAM, 10 minutes CPU time) are not suitable for larger calculations. The line above requests 64 megawords and 600 minutes of CPU time. The estimation of appropriate memory is a bit tricky because the total machine memory is usually measured in megabytes or gigabytes, not in megawords. On modern 64-bit machines (i.e. AMD64, Intel EM64T and newer processors running 64-bit operating system) a word is 64 bits wide. Eight bits make one byte. Thus, requesting 64 megawords of memory translates to 512 megabytes:
64,000,000 (words) * 64 (bits/word) / (8 bits/byte) = 512,000,000 (bytes).
It is reasonable to request 50-80% of total RAM if you are running a single calculation on a workstation. Requesting more than the available physical RAM is not advised.
- basis keywords specify the basis set to be used. The basis set is given as an argument to the gbasis keyword. Some basis sets, such as Pople 6-31G(d,p) can be explicitly specified as illustrated here. Other basis sets, such as Dunning's correlation consistent basis sets must be called from an external file as shown in the example above. Custom basis sets for each atom can be defined like in this example.
- guess keywords relate to the generation of initial guesses orbitals for the Hartree-Fock calculation. For a new calculation, guess=huckel is appropriate. When continuing an existing calculation, guess=moread can be used to read in the previously converged wavefunction.
- d5 keywords control how d, f, and g basis functions are handeled by the program. For correlation consistent basis sets, true values for d5, f7, and g9 are appropriate.
- data keyword group is quite complex. The first line in this group is reserved for the comments and the second line for symmetry specification (water has C2v symmetry). Now the things get tricky. If the molecule is asymmetric, the molecular geometry specification follows the second line (which should contain C1 for symmetry). If the molecule is symmetric, leave a blank line between the symmetry specification and the geometry specification. The coord=cart keyword above allows to enter XYZ coordinates for all the atoms, which may be the easiest option for beginners.
Running PC GAMESS calculation
PC GAMESS needs to know about names and whereabouts of files such as
- the input file: specify an existing file name with -i flag
- the output file: specify a new or existing file name with -o flag
- the basis set file: specify an existing basis set file with -b flag
- the auxiliary libraries (.ex files): specify a file path with -ex flag
Thus, if you have saved the input file as water_vtz_mp2.inp and if the PC GAMESS files are installed in /usr/local/pcg you can enter
pcgamess -i water_vtz_mp2.inp -o water_vtz_mp2.out -b /usr/local/pcg/cc-pvtz.bas -ex /usr/local/pcg
More about symmetry in PC GAMESS and US GAMESS
PC GAMESS and US GAMESS allow several different ways to specify molecular geometry of symmetric molecules. In fact, the automatic symmetry handeling in the previous example has significant limitations when carrying out more advanced calculations. A better way to specify the molecular geometry of symmetric molecules is to provide only the positions of unique atoms (coord=unique) in a standard coordinate system. Now, the XYZ order becomes important. You may need to swap XYZ coordinate values of all atoms such that the molecule is in the standard orientation. The standard orientation in PC GAMESS and US GAMESS is defined as one in which:
- the Z-axis is the principal axis of rotation
- the X-axis is a perpendicular two-fold axis
- the XZ plane is a vertical plane of symmetry (sigmav )
- the XY plane is a horizontal plane of symmetry (sigmah)
The example below illustrates an input for MP2/cc-pVTZ calculation of water using only unique coordinates. Note how the contrl keywords span two lines.
$contrl scftyp=rhf runtyp=energy mplevl=2 d5=.t.
icharg=0 mult=1 coord=unique nprint=-5 $end
$system mwords=64 timlim=600 $end
$basis extfil=.t. gbasis=cc-pvtz $end
$guess guess=huckel $end
$d5 d5=.t. f7=.t. g9=.t. $end
$mp2 method=2 $end
$data
Water cc-pVTZ single point energy calculation
Cnv 2
O 8.0 0.000000 0.000000 0.117613
H 1.0 0.757348 0.000000 -0.470450
$end
In the water example above, the main axis of rotation (Z) passes through the oxygen and the two hydrogens lie on the XZ-plane. Notice that only one hydrogen position is given in the example above because the second position (-0.757348 0.000000 -0.470450) can be generated by applying the appropriate symmetry generators.
Performance Considerations
One of the appeal of PC GAMESS is that you are likely to achieve very high performance on modern PC hardware with the right set of keywords. The performance of various parts can be further tuned by picking an algorithm best suited for a given problem size and computer hardware. There are lots of tuning options but one common performance-enhancing trick is:
- When performing MP2 calculations with small molecules (less than 500 basis functions), stay with the default conventional method ($mp2 method=2 $end).
- When performing MP2 calculations with large molecules (more than 500 basis functions), switch to the new direct method ($mp2 method=1 $end)