Friday, June 3, 2016

Generate CUBE files in GAMESS

GAMESS can generate CUBE files of various computable properties so you can visualize the results in programs like Avogadro or GaussView.

Here, I'll show how to compute the density of a methanol molecule since I struggled to generate the grid in the right way (the INPUT description was not exactly helpful).

The input file is

if run through GAMESS you'll get the usual output file, but more importantly in your user scratch space you'll get a .dat file too. This file contains the CUBE data we requested. Just search for START to locate where the CUBE file starts, extract that and change the file extension to .cube. This file can automatically be loaded into Avogadro where you can create a surface of the data to get something like the following

EDIT: A note on the $GRID section in the input file. One selects an origin through the ORIGIN(1) keyword. When selecting the vectors for the box, one must provide the coordinate of the X, Y and Z corners and not just the change in vector. You can see that XVEC(1)=6,5,4 which tells GAMESS that the vector that takes us from ORIGIN(1) to XVEC(1) is 8,0,0. I spent a good 20 minutes trying to figure out what the problem was since I thought that one should specify 8,0,0 and not 6,5,4 in XVEC. Oh well.