Using External Basis Sets In GAMESS-US, Running Mixed Basis Set Calculations With Z-Matrix Inputs

The parameterization of the new nanoENGINEER-1 simulator is being performed for molecules containing H through Cl at the B3LYP/6-31+G(d,p) level of theory. Unfortunately, the 6-31+G(d,p) basis set is not available for the 4th row elements (Ga,Ge,As,Se,Br), meaning an alternate basis set is required (for the 4th row, that is). In GAMESS-US, this is simple if the input files are in Cartesian format. This same approach cannot be used in Z-matrix input formats. A (maybe THE only) way to call mixed basis sets for Z-matrices in GAMESS-US is provided here. The procedure involves making an external basis set file with the required basis sets, changing the $BASIS control to read the external file, and modifying rungms to read the external basis set file.

Below is a sample input file. The only noteworthy differences between it and any other input file are (a) the $BASIS line, which tells GAMESS-US to use the external file (EXTFIL=.TRUE.) and (b) the call to use external basis sets named STO2GBAS. In this external file, you can have multiple groups of elements and basis sets, but not multiple basis set types for the SAME ELEMENT in the same group (so far as I know at the moment). This means that the external basis set example file I have available here has Hydrogen (H) and F (Fluorine) STO-2G (STO2GBAS) and 3-21G (321GBASI) basis set groups, but that you CANNOT call the STO2GBAS Hydrogen basis set and 321GBASI Fluorine basis set.

 $ZMAT IZMAT(1)=1,1,2 $END
COMMENT: HF Z-matrix with mixed basis sets
F  1  HFDist


The edit to the rungms file is as follows. You will need to change the EXTBAS control from its default (/dev/null) to the location of the external basis set file (which I have named EXTFILE.txt). If the basis set file is in the same directory as your GAMESS-US executable, then change the EXTBAS to ./EXTFILE.txt.

set echo
setenv ERICFMT ./ericfmt.dat
setenv IRCDATA ./$JOB.irc
setenv   INPUT $SCR/$JOB.F05
setenv   PUNCH ./$JOB.dat
setenv  EXTBAS ./EXTFILE.txt
setenv  AOINTS $SCR/$JOB.F08

The external basis sets can, of course, be downloaded from My sample file, EXTFILE.txt, is below. Note the STO2GBAS and 321GBASI grouping. These labels MUST have 8 characters. Change the basis set choice by changing GBASIS in $BASIS in the input file.

 S   2
  1         1.309756377    0.4301284980
  2         0.233135974    0.6789135310

 S   2
  1        63.73520200     0.4301280000
  2        11.34483400     0.6789140000
 L   2
  1        2.498548000     0.4947200000E-01     0.5115410000
  2        0.633698000     0.9637820000         0.6128200000

 S   2
  1        5.4471780000    0.1562850000
  2        0.8245470000    0.9046910000
 S   1
  1        0.1831920000    1.0000000000

 S   3
  1     413.80100000000    0.5854830000E-01
  2      62.24460000000    0.3493080000
  3      13.43400000000    0.7096320000
 L   2
  1       9.7775900000    -0.4073270000         0.2466800000
  2       2.0861700000     1.2231400000         0.8523210000
 L   1
  1       0.4823830000     1.0000000000         1.0000000000

You can download all of the program text and some brief comments in a single file located HERE.

In order to use the 6-31+G(d,p) and 6-311G(d,p) basis sets for a single molecule of mixed 1st/2nd/3rd row and 4th row elements, define an 8-character sequence for the group (like MIXEDBAS) and simply add all of the required basis sets for whatever elements into that group. Again, it is not obvious how to have two Hydrogen atoms in a single molecule have two different basis sets in a Z-matrix input by this (or any other) method in GAMESS-US, but the above goes a long way towards removing a major obstacle to running many molecules.

An (Old) Automatic PC-GAMESS Batch Script

From a prior version of the site…

This batch script acts similar to GQueue for MacGamess, with the exception that you can't add files after the .bat file has been implemented (run). This new version automatically goes through a directory containing PC-GAMESS input (.inp) files and runs them without having to specify each name in a long batch file. all one has to do is double-click on the rungamess.bat file from a window and it will automatically start the command prompt and program.

There is a limit to the use of the FOR command in DOS that I've not yet found a way to overcome, so the actual batch script is divided into two files. The first, rungamess.bat, contains the code that collects the .inp files and passes each name sequentially to execute.bat, the file that actually starts PC-GAMESS and runs the calculation. While an annoyance to have two files, once they are placed you never have to touch them again (unless you want to pass parallel calculation parameters to the executable, which are done in the execute.bat file).

The image below shows an ideal setup for running these batch files to automate your calculations. The execute.bat file calls the PC-GAMESS executable as GAMESS.EXE. If you've a different name for the program (if you keep track of versions, for instance), go into execute.bat with Wordpad or Notepad and change accordingly. The file names (and batch files) will work universally across windows OS's provided you stick to the standard 8.3 format. That is, 8 letters for the filename and 3 for the extension. In Windows2000 and higher, long file names work just fine EXCEPT spaces and non-standard characters are prohibited (you're still running the calculations in DOS mode, remember). With your directory setup, just double-click on rungamess.bat and wait for the jobs to finish.

The batch files are provided below in full. You can download each file from the following links (they're just text files, so you may want to right-click and "Save As.") The internals are described below each in case changes are needed. When downloaded as the rungamess.txt file, rename this file to rungamess.bat to make it executable.

Download rungamess.txt

@echo off
[lots of echo and REM text]
[download the .txt file to read]
for %%f in (*.inp) do call execute %%f
del WORK16 
del WORK15 

A lot of descriptive stuff about the file, most of which can be ignored. The only thing that may need changing is the deletion of the pause line to remove the break before the calculations go. There for the first time so you can see what's happening. Note, if you use a different file extension (instead of .inp), then change the batch file accordingly where noted. When downloaded as the execute.txt file, rename this file to execute.bat to make it executable.

Download execute.txt

echo The PC-GAMESS calculation for %1 is currently running.
@echo off
[lots of echo and REM text]
[download the .txt file to read]
GAMESS.EXE -i %1 -o %~n1.out 
move PUNCH %~n1.dat
del input

Mostly self-explanatory. The first echo line just keeps track on the screen (in the command prompt) of what calculation is going (where in the file list you are). The GAMESS.EXE line is the formal call for the program as per the readme files that come with it. The only file that NEEDS to be deleted is the input file. The PUNCH file comes out as just a name, while the unix version refers to it as a *.dat file. Useful info inside (depending), so I choose to save it by moving PUNCH to filename.dat. Leave in or remove accordingly.

That's it! Any questions, drop a line.