Story of My Struggle with PC-GAMESS       Modeling Molecules and Reactions
 

DblClkPCGAMESS: The Tiny Kit for Running PC-GAMESS

PC-GAMESS is a theoretical chemistry computational freeware of great repute and popularity, enabling one to calculate energy etc. of any molecular species. But its basic user-interface is command-line based, and is thus quite unfamiliar to the new generation of chemists. This tiny kit introduces into PC-GAMESS quite a familiar and simple user-interface with the help of a link file (aptly named 'DblClk to Run PCGAMESS'), which may just be double-clicked to run PC-GAMESS. In addition to the simple user-interface thus introduced, new versions of this kit also keep displaying the last part of the current content of input file (Work2Do.inp) along with the time and date of last modification of this file, the method to prematurely close PC-GAMESS, and also prevent unintentional overwriting of the PC-GAMESS output files. To use this tiny kit, the extracted contents obtainable from the downloaded WinZip file are to be copied to the c:\pcgamess folder wherein the PC-GAMESS package would reside.

Contents of a simple Work2Do.inp PC-GAMESS Input-File
 

Two related essays by the developer (i.e., Rituraj Kalita) for better understanding:

 

Story of My Struggle with PC-GAMESS

Most chemistry-computation packages originating free of cost from the dreaded Linux-type operating systems are what should be called user-hostile (the exact opposite of the concept of being user-friendly), and I should have known that PC-GAMESS (let's call it PCG here) is unlikely to be an exception. But being a novice then, I hardly knew what extent of a struggle was in store for me when I proceeded to download PCG! I obviously have nothing other than pure gratitude to its brilliant and magnanimous developers who have over the years provided various varieties of this great package to any desirous homo sapiens just free of cost, but rather would also like to place here a few hints to any potential fellow-users.

The downloaded package was in a zip-file which could be de-coded via two password-sets, one of which required even writing an e-mail to Prof. A. Granovsky, the developer of this greatly useful package. The real struggle, however, began after that. Extracting, I got two files gamess.exe and fastdiag.dll along with three folders Docs, Readme and Samples. Wondering where to keep those, I created the folder c:\pcgamess in my (c:) hard drive, and moved all these extraction-created files & folders into it. With my third-millennium Windows ideas (which I now know are nearly useless about such packages originating in the 1980s and early 1990s), I then double-clicked at gamess.exe, but to my surprise nothing seemed to happen! What to do? I opened the Docs subfolder and double-clicked in the Input.doc, Intro.doc and Refs.doc, but found nothing about simply how to run PCG. However, I noted that the first two files seem to have very useful info (about the input-file specifications) after I would be able to run PCG; and that the .doc extension for these three files leading to invitations to Microsoft Word is uncalled for, as these three files are simply text files. So, I renamed their extensions, converting their names to Input.txt, Intro.txt and Refs.txt : they now opens in a more pleasing and extremely faster way. Next, I investigated the Readme subfolder, and found files named as readme.commandline, readme.cube, readme.p4 etc. Clearly, the file extensions are very odd and unduly different, and double-clicking them doesn't lead to direct display of their simple text contents. So, I renamed them as readme.commandline.txt, readme.cube.txt, readme.p4.txt etc. (converting each of their extensions to simply .txt). Now I had only to double-click at readme.commandline.txt to locate the following gem of a information therein:
"All PC GAMESS binaries v. 6.4 support the following command line options: gamess [-i <inputfilename>] [-o <outputfilename>]".

Oh, that's all the trick! The input-file examples were there in the Samples subfolder, starting from the simplest example in Exam01.inp. I double-clicked that file, and advised Windows to open such .inp files by Notepad, choosing Notepad from a list of programs. That input file got opened, showing its contents. So, I wondered, let me copy Exam01.inp up, to the c:\pcgamess folder and then open the MS-DOS Prompt (this almost-extinct creature gloriously thriving in my adolescent days is also called the Command Prompt, and is still available from the Programs-Accessories sub-menu of the Start Menu), enter cd c:\pcgamess just therein, and then enter gamess -i Exam01.inp -o Output.txt in the C:\pcgamess> command prompt. Wow, a black screen remained for a few seconds signifying some work going on behind my eyes, and then a big Output.txt file got created with the resulting calculations stored within it! What a pleasant surprise, I could finally work with PCG!!

I then decided I must make all these simpler for my fellow human beings, and so created a batch file DClkPCGM.bat that included written within it the command gamess -i Work2Do.inp -o Output.txt, then created a link (shortcut) file named DblClk to Run PCGAMESS that pointed to this batch file (i.e., DClkPCGM.bat) kept within C:\PCGAMESS (i.e., the PC-GAMESS working folder). Within the batch file, the (above-mentioned) central working command is preceded by a nerve-soothing message Input is Work2do.inp; Output is Output.txt and Punch; Please wait!. I then built a PCGAMESS input file named Work2Do.inp dealing with the HF 6-31G geometry-optimization calculation on benzene molecule, while making its upper contents quite explanatory by introducing quite a few explanatory comment lines. (To avoid any undesirable double-click on the files gamess.exe, FastDiag.dll and DClkPCGM.bat, I prefer to keep these three as hidden files.) Now, to run PC-GAMESS on the molecule specified in Work2Do.inp, a double-click should be made only on DblClk to Run PCGAMESS after we made Work2Do.inp ready (and protected the older contents of Output.txt & Punch somewhere else).

Hope the win-zipped set comprising the said batch file, the said link file and the said input file kept freely available on the web as DblClkPCGAMESS: The Tiny Kit for Running PC-GAMESS would help 3rd-millenium people like me to avoid the teething troubles that I went through!

 

Computational Chemistry via Educational Tools: Modeling Molecules and Reactions

Computational chemistry attempts making models or simulations of the chemical species and chemical processes in the computer. As any other branch of science, it also use such models to interpret the naturally occurring chemical phenomena, and tries to predict yet undiscovered chemical phenomena as well.

Within this branch of science, let us discuss the ab initio quantum mechanical modelling of small and medium-sized molecular systems in some details, considering its current popularity. In this field, the mathematical (numerical) model of the molecule is always associated with a 3-D mobile visual model to be viewed by the user. Given the numerical model, the corresponding visual model may be obtained using a graphics software (e.g., PCModel, ArgusLab, ORTEP-3 etc.), while every visual model drawn or generated anyhow can be saved as (transformed into) the corresponding numerical model. The visual model helps in easy understanding of the molecular structure and stereochemistry; it attempts to represent the actual molecule as closely as possible in its shape and stereochemistry. There are generally provisions to view the models in different styles such as stick, ball and stick, electron dot surface etc. Besides, generally the visual model may be viewed from different angles (orientations) and in different enlargements. So, the 2-D structural figures drawn on paper (or in Windows Paint/ ISIS-Draw etc. drawing software) are thus rather poor visual models, compared to those made with such chemical modelling packages.

As a starting point, in this field we start with molecules lying in the vacuum (gas phase); it is possible to introduce corrections to this gas-phase model for the surrounding solvent medium etc. From quantum mechanics, we know that there is no question of the electrons in the molecule to be specified of their positions: we need to specify only the number of electrons in the molecule, while the electron probability density will be obtained from solution of the Electronic Schrödinger Equation (ESE). On the other hand, there’s the necessity of specifying the positions of all the nuclei (in addition to specifying the types and numbers of the nuclei) – as from the Born-Oppenheimer approximation we know that to construct the ESE the nuclear framework (arrangement) must be specified. Besides, with the same set of nuclei and the same number of electrons different isomers may arise, if the relative nuclear positions are allowed to vary. Thus, the molecular model must include the nuclear coordinates, in addition to the types and numbers of nuclei and the total number of electrons. Using such a molecular model, the molecular electronic wavefunction and the electron probability density can be directly found (it’s just a matter of time) by solving the ESE, thereby arriving at a complete description of the molecule.

However, the total number of electrons may not be explicitly mentioned in the molecular model (say, in the .xyz format used below), in which case it is understood that the molecule is electro-neutral i.e., there are just sufficient number of electrons (say 26 in ethanol) to keep the molecule uncharged. In other cases (say, for GAMESS) the charge of the molecular system needs to be specified, meaning that the number of electrons thus gets understood. Coming to the question of nuclear-framework specification, we see that the nuclear-framework part of the molecular model is specified in mainly two different formats. In one format, the type (say atomic symbol, such as H or N) of each of the nuclei along with its Cartesian (x, y, z) coordinates (separated by space) are specified one by one for all the nuclei. Generally, the molecular model is in the form of a text file, with one line each dedicated to the description of each of the nuclear type & position. The unit of the coordinates is, practically universally, Angstrom (not atomic unit). Thus, the nuclear framework specification for a water molecule may be as follows:

O          0.000000           0.127174          0.000000
H          0.758132          -0.508697          0.000000
H         -0.758132          -0.508696          0.000000

In the other format called the z-matrix specification, the position of the first nucleus is kept unspecified. The position of the 2nd is expressed in terms of the distance from the 1st. The position of the 3rd is expressed in terms of the distance from the 2nd or the 1st, and in terms of the bond angle amidst the 3rd, the 2nd/ 1st, and the 1st/ 2nd nucleus. All the rest of the nuclear positions require specification of one bond distance, one bond angle and one dihedral angle (i.e., angle between two planes, say between the 1-2-3 and the 2-3-4 nuclei-connecting planes). The justification of such a (initially incomplete-looking) z-matrix specification is obvious: it is because translating the whole nuclear framework to another position or rotating it doesn't lead to a different molecule! It is the Cartesian coordinate specification format where there is rather too much of coordinates specification (over-specified by six degrees of freedom), but there also it is understood that translation or rotation of the whole framework creates no different molecule. This second format of nuclear framework specification also has each line describing one nucleus, with unit of distance and angle being Angstrom and degrees by convention, as exemplified for H2O:

O
H         1          0.989493
H         1          0.989492           2          100.024728

In this branch of science, one naturally starts with the preparation of the molecular model. Using model-drawing software packages such as ArgusLab (a free software) or PCModel etc., such models may either be drawn from scratch OR be modified from pre-existing models such as of aliphatic/ aromatic rings, amino-acids, mono-saccharides, nucleic-acid bases etc. Such drawing or modification generally involves quite user-friendly steps, as may be exemplified in case of ArgusLab. In ArgusLab, to add a bond, one needs to left-click at the starting nucleus, and then right-click at the new nuclear position (after making sure that its Auto Bonds toolbar-button is set to ON). To delete an existing nucleus, one needs to right-click at the nucleus, then left-click at the menu-item Delete Atom. A new nucleus drawn is assumed as a sp3 hybridized C-atom, which assignment may be altered from a periodic-table atom-list. The H-atoms needn't be drawn; they're just understood and may be shown/ hidden at will. Gross structural mistake(s) made in drawing or modification (e.g., creation of absurd bond-lengths etc.) may now be corrected by invoking an inbuilt, raw energy-minimisation procedure called Clean Geometry. After drawing or modification of the visual model in this way, the mathematical model may be immediately obtained in different formats such as XYZ (one of the former class, as above) or Brookhaven PDB (Protein Data Bank, a format incorporating some more information) etc.

The mathematical models thus formed are then fed into computational software packages such as PC-GAMESS or Gaussian etc., the desired level of computational theory (say, Huckel/ Hartree-Fock/ Moller-Plasset 2nd-Order etc.) is specified or kept understood, and the lengthy computational process is allowed to go on. Through such extensive computations, modern computational packages such as PC-GAMESS or Gaussian can predict many properties and reactions of molecules such as: molecular energy & structures, transition-state energy & structures, vibrational frequencies, reaction energies, electron density distribution, potential energy surface (PES) & reaction pathways etc. The greatly popular free package PC-GAMESS (please note that if you are working in, say, a Pentium-IV single-processor single-PC system under Windows, be sure to download only the Windows, Sequential, Optimized for P-IV form of PC-GAMESS), is fundamentally a DOS-fashioned one that may run in the command prompt (within its folder) via a DOS-command of the sort gamess -i Work2do.inp -o Output.txt where Work2do.inp is a characteristic PC-GAMESS input file (contents shown below) and Output.txt is its program output file. However, user-friendly graphical user interfaces (GUIs) has been developed that includes the celebrated RunPCG available from the PC-GAMESS website itself. This author, however, prefers working with his self-developed tiny package (incorporating a batch file PCG.bat, the working link file DblClk to run pcgamess, and a well-illustrated Work2do.inp); this tiny package may be free-downloaded from the top of the webpage (web-address stated below) of this essay.

It may be noted here that such a computational package may perform computations in two different class of ways: (i) the nuclear-framework may be considered as exactly fixed and so no modification is attempted into it (called a single-point calculation) OR (ii) the nuclear-framework is considered to be modifiable, and so the optimum molecular structure is sought for through its modification (called a structure-optimization calculation).  Through the second way we may easily look for theoretical prediction of chemical reactions, because we know that it is the change in the relative nuclear coordinates that imply a chemical reaction (e.g., the reaction H2 (g) + I2 (g) = 2HI (g) implies that the H–H  & I–I distances have increased much and the H–I distances have decreased greatly).

How exactly is the reaction between two or three molecules modelled? To proceed with such modelling, at first the model of a relevant supermolecule, which includes all the reacting molecules, has to be constructed by joining the individual molecular models. For example in case of the H2-I2 reaction, the supermolecule must include the combination of an H2 molecule and an I2 molecule. For exact considerations unlike the simple-minded structure-optimization example mentioned above, a PES (nuclear potential energy U as a function of relative nuclear coordinates) calculation has to be planned for and performed, then the reaction pathways to be predicted, leading to prediction of even the rate constants.  

Displayed below are the contents of a PC-GAMESS input file for a formaldehyde molecule. Note the atomic numbers (6.0, 8.0, 1.0 etc.) specified in the 2nd column that distinguishes the Cartesian (nuclear) coordinates in PC-GAMESS input-file from those in the .xyz file (generated by ArgusLab). To form a PC-GAMESS input file for another molecule, you may, at this beginner's stage, manually create this 2nd column.

 $CONTRL SCFTYP=RHF RUNTYP=OPTIMIZE COORD=CART 
 MULT=1 ICHARG=0 $END
 $SYSTEM TIMLIM=36000 MEMORY=1000000 $END
 $STATPT OPTTOL=1.0E-6 $END
 $BASIS GBASIS=STO NGAUSS=3 $END
 $GUESS GUESS=HUCKEL $END
 $DATA
Test...RHF/STO-3G (a comment line)
Cn 1

 C    6.0     0.6084782705     -0.0000011694    0.0000000000
 O    8.0   -0.6082418894     -0.0000002093    0.0000000000
 H    1.0     1.2040919862     -0.9264398115    0.0000000000
 H    1.0     1.2040973125      0.9264340484    0.0000000000
 $END


Related web-pages and download-sites:

Above Resources at the Web:  DClk_PCGM.htm     PCG_Story.htm      ccworkshop.htm
planaria-software.com (for the modelling package ArgusLab)
classic.chem.msu.su/gran/gamess (for the computational package PC-GAMESS)
mdli.com (for the chemical-drawing package ISIS-Draw)