1 Quantum Chemistry exercise: Electronic and structural properties

1st Quantum Chemistry exercise:
Electronic and structural properties of the H2O molecule
by Quantum Chemistry methods
All necessary tools can be downloaded from:
http://dipc.ehu.es/ricardo/master/intranet_ESCMAN/1stexerciseQChem/
Goal of the 1st exercise
The goals involved in this exercise are twofold:
1.- To get acquainted with electronic structure calculations codes based on
Quantum Chemistry methods. To understand how they can be used and learn
their
capabilities.
In
our
case,
we
will
use
the
code
GAMESS
(http://www.msg.chem.iastate.edu/gamess/gamess.html), developed by the
group of Mark Gordon in Iowa State University. GAMESS is a program for abinitio Quantum Chemistry. The source code is freely downloadable from the
above mentioned web address, as well as binaries in different operative
systems.
2.- To actually perform several Quantum Chemistry calculations at different
levels of approximation in a molecular system, namely H2O. Several types of
Quantum Chemistry methodologies will be used and discussed. The goal is to
understand the pros and cons of each of them and develop capabilities to
design future calculations with the method. We will also use the calculations to
obtain the infrared excitation spectra and discuss some electronic properties of
the molecule.
Steps to get the code running
1.- We will be using the Windows version of GAMESS (aka WinGAMESS). To
install GAMESS in your PC, please download the Windows installer (.msi)
package available in the following web address:
http://dipc.ehu.es/ricardo/master/intranet_ESCMAN/1stexerciseQChem/
2.- Run the WinGAMESS.current.msi package and follow the instructions on the
screen.
3.- This will create a folder C:\WinGAMESS in the root directory of your PC.
Please create a new ‘working’ folder below for your own use.
4.- After installation, please browse through the WinGAMESS folder and
localize the file batmaker.exe. This will launch a graphical utility to create the
DOS batch files necessary to run jobs on GAMESS. Try it if you wish. A new
window should appear:
You can add your input file by choosing “Add File to list”. You have to provide
the location of the WinGAMESS executable file and the name and location of
your ‘batch’ file as well. Once you are done, please press the “Save .bat file”
button. This will create a ‘batch’ file to run the code. You only have to double
click on it to run WinGAMESS.
5.- After successful completion of the job, the DOS command window will
disappear and your output will appear in the same folder where the input
resides. You can use a text editor to see the results on your output file
(Wordpad or Office-Word, for instance).
Input files in GAMESS
A complete description of the ‘input’ file can be found in the code
documentation. We just provide here some general features.
Input files are modular, arranged in $groups.
Most common input groups:
$SYSTEM: specifies memory, time limit
$CONTRL: specifies basics of calculation
$BASIS: specifies basis set if standard
$DATA: specifies nuclear coordinates, basis set if nonstandard
Other important groups:
$GUESS, $SCF, $FORCE, $HESS, $VEC, $IRC, $VIB
Input files in GAMESS are mostly free-format (i.e., flexible spacing) except:
„ ‘$’ sign specifying group must be in column 2
„ All groups must terminate with a $END (this ‘$’ can be anywhere except
column 1).
„ Anything in column 1 indicates a comment line
All necessary information about the calculation to be launched is saved in one
file. In the following, the extension of this file is assumed to be xxx,inp.
Step 1.- Optimization of the geometry of the H2O molecule using GAMESS
In a first step, we will use directly the input and output files of GAMESS without
any additional interface. This will allow us to take a closer look to the way in
which the program runs.
Let us create an input file that we will call H2O.inp. The input files will be saved
in the working directory that we have created. It will read like this:
! Short example of a H2O geometry optimization
!
$CONTRL SCFTYP=RHF RUNTYP=OPTIMIZE $END
$SYSTEM MWORDS=10 $END
$BASIS GBASIS=N21 NGAUSS=3 $END
$DATA
1st row is reserved for a comment
C1
O 8.0 0.0 0.0 0.0
H 1.0 1.0 1.0 0.0
H 1.0 -1.0 1.0 0.0
$END
Please notice that the lines starting the input ‘groups’ have the sign $ in
position 2 of the line (there is a blank space before them!).
With this input file we are asking GAMESS to run a geometry optimization
(hence the RUNTYP=OPTIMIZE flag), using a restricted Hartree Fock wave
function (SCFTYP=RHF), and a given type of Gaussian basis set (GBASIS=N21
NGAUSS=3).
Now we can run the code using the steps mentioned above: look for the file
batmaker.exe, double-click on it, select the H2O.inp input file, save the batch
job and launch it afterwards.
The output will be saved in a new file called H2O.inp. Towards the end of the
file we will find the sentence ‘EQUILIBRIUM GEOMETRY LOCATED’ and
below the new coordinates of the H and O atoms.
Step 2.- Doing again (and extending) the calculation using Gabedit
The long output file H2O.out contains a lot of information worth to be analyzed.
For this purpose, we will use the graphical software Gabedit.
In the following, we will repeat the calculation from scratch. We will check in this
way that the input file generated through Gabedit is almost identical to the one
that we used before.
1.- Open first the software Gabedit.
2.- Let us start by building the molecule (which is very easy in this case). Click
in Geometry (in the main menu above) Æ Draw. A new ‘drawing’ window will
appear. Click now with the right button of the mouse and select Add Æ Add a
Fragment. Select Miscellaneous Æ Water and click with the mouse in the
drawing Area. The desired structure should appear there.
3.- We can close now the ‘drawing’ window. Information extracted from the
drawing is internally saved. Now go to File Æ New Æ Gamess input and select
the parameters of your calculation to be as close as possible as the ones we
had before. In particular select a RHF calculation (SCF type), to optimize the
geometry (Run type) and using a 3-21G basis set. Select OK and you will get a
GAMESS input file very similar to the one you had before.
4.- Now you can run the calculation by using Run (main menu) Æ Run an abinitio program. Select GAMESS and pay attention that the command to execute
displays the proper version of GAMESS to be used (shoud be gamess.08.exe).
You can also select your working directory as the folder in which you want to
save your data and provide a name for your input and output files
(H2O_new.inp for instance).
The output will appear as a new tab in the Gabedit window, with the name
H2O_new.log.
Please compare the input and output files of the two calculations that we have
performed so far and check that we obtain very similar results (if not identical).
Check the total energy of the H2O molecule calculated within this
approximation. And write down the equilibrium positions. Now use these
equilibrium positions and see whether you can lower the system energy by a)
changing the basis set, and b) changing the methodology. Select, for instance,
Density functional theory for correlation type, 6-31G for basis set and 1 for #D
heavy.
Step 3.- Analyzing the output of the calculation
Let’s see briefly some features of the output.
First, in the H2O.log window, click Geom. Conv., then select any of the points
appearing in the graph and press Draw. You will see again the H2O molecule,
now with an optimized geometry. By the way, if you would like to change the
style of the drawing, press the right button of the mouse and just go to Render.
And you can use the mouse to rotate the molecule as well (selecting first the
icon ‘Rotation’ to your left.
- To check the distances between the different atoms, select the icon ‘Mesure’
(to the left side of the screen, almost at the bottom) and select all atoms in the
molecule, one after the other. You will see the interatomic distances at your
right.
3.1. Compute and draw the IR spectrum of the H2O molecule
Infrared (IR) spectroscopy exploits the fact that molecules have specific
frequencies at which they rotate or vibrate corresponding to discrete energy
levels (vibrational modes). These resonant frequencies are determined by the
shape of the molecular potential energy surfaces, the masses of the atoms, and
by the associated vibronic coupling. In order for a vibrational mode in a
molecule to be IR active, it must be associated with changes in the permanent
dipole. Now let’s see which are the IR frequencies of the H2O molecule.
Now go to File Æ New Æ Gamess input and select the parameters of your
calculation to be as close as possible as the ones we had before. In particular
select ‘Frequencies’ as Run type and all other parameters at your choice (i.e.,
using some of the options that proved successful before. Select OK and you will
get a GAMESS input file.
Run the calculation by using Run (main menu) Æ Run an ab-initio program.
Select GAMESS and pay attention that the command to execute displays the
proper version of GAMESS to be used (shoud be gamess.08.exe). You can
also select your working directory as the folder in which you want to save your
data and provide a name for your input and output files (H2O_freq.inp for
instance).
Once the calculation is done, go to the H2O_freq.log window and click in the
“Dens. Orb.” Button.
Click with the right button of the mouse in the window and select
Animation/Vibration. From the menu of the new window, select Read Æ
Gamess file and select the H2O_freq.log file. Select the view you prefer and
click to play (or stop) to animate the vibration of your molecule. You can also
draw the IR spectrum with the Tools menu.
3.2. Electronic density and HOMO state
Now click with the right button of the mouse, go to Orbitals Æ Read Gamess file
and select the H2O_freq.log file. If you click now to the OK button, the HOMO
Orbital is selected). You can easily change the display type by selecting the
type of rendering : Render/Geometry and/or Render/Surface.
Advanced topic: CH4 and CH4+
So far, we have been led by an input file already existent. But we should be
able now to create a new input file for a completely different system.
I would suggest that:
1.- First you could try to obtain the optimized geometry of CH4, a system that we
have already discussed in our Quantum Monte Carlo exercises. Therefore, we
have a reference to check our calculations. Be careful with the value of the total
energy. It would only be comparable to the QMC results if similar
pseudopotentials are used. If this is not the case, we could compare geometries
and/or variations in energy but not total energies.
2.- As a second, more difficult, step, you could try to obtain the optimized
geometry of CH4+, the ion of methane. Please notice that we have an odd
number of electrons now and a RHF wave function is probably not the best
choice. Try to use ROHF and/or UHF and be careful with the spin state choice.
And good luck!!