You are on page 1of 6

Tutorial on Ab Initio Reaction Free Energy Calculations

Julio L. Palma and Victor S. Batista


Department of Chemistry, Yale University, P.O. Box 208107, New Haven CT 06520-8107

Introduction

This tutorial introduces the reader to ab initio calculations of reaction free energies, allowing the students of CHEM505 to solve Exercise 4 in Lecture4 by using the software package Gaussian. For a more information on the Gaussian code and its tools the reader can consult the Gaussian reference manual. The tutorial describes how to prepare input les for geometry optimization and calculations of thermochemical data as illustrated for simple examples. In addition, a description of key sections of the output log les is presented with instructions on how to extract results from the log le and how to launch calculations in the Bulldog L cluster.

Gaussian Input

The Gaussian input is a simple le that can be divided basically in three section: commands, title, system specication. The command section will contain the type of calculations (for example: optimizations, single point calculation, transition state search and others), level of theory, basis set, etc. The title sections is only one line and can say whatever you want but I recommend it describes what kind of calculation you are doing so it could be easy to keep track of your jobs. And in the system specications the rst line will indicate the charge and spin multiplicity of the system followed by the system coordinates. In general it is common to name your input le with .com extension. A blank line should be included between sections as well as at the end of the input le. Here is a simple example of for the Hydrogen molecule. We could name it H2.com. #P b3pw91/aug-cc-pVDZ opt H2 molecule optimization 0 1 H H

0.0000000 0.0000000

0.00000000 0.00000000

0.0000000000 0.5900000000

The rst line indicates that is a DFT calculation (b3pw91 functional with aug-cc-pVDZ basis set) to optimize the system. I used H2 molecule optimization as a title for obvious reasons and the charge is 0, multiplicity is 1 (2*S+1) and the coordinates followed the format: Atom Symbol, X, Y, Z. 1

I personally prefer to use a text editor (i.e. vi) to edit my input les but you could use GaussView. To prepare your input le in GaussView rst open Gaussview, you can draw your molecules right away. To edit the type of calculation, go to the menu Calculate > Gaussian Calculation Setup. You can choose level of theory, basis set, calculation type, etc. Save your le as lename.com. For a more detail explanations on how to use GaussView you can consult IET Tutorial and the on-line GaussView Reference.

Geometry Optimization

To perform a Geometry optimization, the Opt keyword needs to be used in the command line. See the example of the hydrogen molecule in the previous section le. To execute Gaussian you need to type the following in the Terminal: $ g09 < "inputfile" > "outputfile" for example for our H2.com input le it would be like this: $ g09 < H2.com > H2.log and it will generate and output le named H2.log. Once the output le has been generated and the job has nished, rst I would check if the job nished successfully, by successfully I mean there were not memory problems, or the time limit was not exceeded just as an example. I would look at the end of the output le and see the legend: Normal termination of Gaussian .... . After checking this, I would see if the job calculated what I wanted the why I wanted, remember that the code does not know chemistry. For instance, in the optimization job for Hydrogen molecule I want to make sure it optimized my structure, one way to know this I would be by making sure the job converged. Open the output le and search for the word Converged, this word will be found for every optimization cycle that was done. You may see something like this in the beginning: Item Maximum Force RMS Force Maximum Displacement RMS Displacement Value 0.209932 0.209932 0.140004 0.197995 Threshold 0.000450 0.000300 0.001800 0.001200 Converged? NO NO NO NO

Obviously the job has not converged. If the optimization has been done successfully you will nd this: Item Maximum Force RMS Force Maximum Displacement RMS Displacement Value 0.000001 0.000001 0.000001 0.000002 Threshold 0.000450 0.000300 0.001800 0.001200 Converged? YES YES YES YES

It is useful to visualize the structure with the help of software like Molden or even GausView, just in case of existing local minima. In this case for the Hydrogen molecule is not needed. If in the last cycle the convergence has not been achieved you will need to restart the optimization starting form the last point of the job until convergence is achieved. The energy of the optimized structure will be the energy of the last cycle, I prefer to obtain this energy using the terminal and the command grep: $ grep "SCF Done" h2.log the output will look like this: SCF SCF SCF SCF SCF Done: Done: Done: Done: Done: E(RB3PW91) E(RB3PW91) E(RB3PW91) E(RB3PW91) E(RB3PW91) = = = = = -1.14645136521 -1.17387102242 -1.17419360107 -1.17419650054 -1.17419650054 A.U. A.U. A.U. A.U. A.U. after after after after after 6 6 5 5 1 cycles cycles cycles cycles cycles

We are interested in the last value, in this case E= -1.17419650054 which is the value of the last cycle of the calculation and the units are in Hartree.

Thermochemical Properties

To calculate Thermochemical properties such as Enthalpy, Entropy and Gibbs Free Energy, we need to perform a frequency calculation using the keyword Freq. Start with the optimized structure and use the command line: #P b3pw91/aug-cc-pVDZ freq Indeed, you could actually run the optimization and frequency calculation in the same job with the command: #P b3pw91/aug-cc-pVDZ opt freq It will only calculate the frequencies once the structure is optimized. Of course, you should remember that it will take longer and it may require more memory than if you run two separate jobs. In case you run separate jobs I would like to remind you that if you run the calculations in one folder it is better to use dierent names for the les since existing ones could be overwritten, for example, the optimization les could be named h2.com and h2.log and for the frequency calculation h2freq.com and h2freq.log for the input and the output respectively. To read the output from the frequency calculation job, I rst would check that there are no imaginary energy values, which would indicate the system is not fully optimized. In the output le search for the word Frequencies, and you will nd the following section: 3

Frequencies Red. masses Frc consts IR Inten

-----

1 SGG 4369.9928 1.0078 11.3396 0.0000

In case one or more values of frequencies are negative then that indicates the system is not optimized and another optimization with more strict convergence parameters need to be done. Of course for Hydrogen molecule there is only one vibrational mode. Also, if the word Thermochemistry is searched the following section will be found: Zero-point correction= Thermal correction to Energy= Thermal correction to Enthalpy= Thermal correction to Gibbs Free Energy= Sum of electronic and zero-point Energies= Sum of electronic and thermal Energies= Sum of electronic and thermal Enthalpies= Sum of electronic and thermal Free Energies= E (Thermal) KCal/Mol 7.728 0.000 0.889 0.592 6.247 0.009956 (Hartree/Particle) 0.012316 0.013260 -0.001575 -1.164241 -1.161880 -1.160936 -1.175772 S Cal/Mol-Kelvin 31.224 0.000 28.080 3.143 0.000

Total Electronic Translational Rotational Vibrational

CV Cal/Mol-Kelvin 4.968 0.000 2.981 1.987 0.000

As shown, you have the Gibbs Free Energy, Enthalpy and Entropy. Be aware of the use of dierent units. For more details in the theory and Gaussian calculations of these properties I strongly recommend to read: Thermochemistry in Gaussian. But basically the absolute Enthalpy is obtained form the line: Sum of electronic and thermal Enthalpies, the absolute Gibbs Free Energy is obtained from:Sum of electronic and thermal Free Energies.

G of Reactions

With the information shown in the previous section it is possible to calculate GRXN , HRXN and SRXN . For example for the following reaction: 4

A + 2B

C+D+E

The optimization and frequency calculation for all the species need to be performed. From the frequency calculation job we can extract the Gibbs Free Energy, Enthalpy and Entropy for each specie and calculate the GRXN : GRXN = [GC + GD + GE ] [GA + 2GB ] and similar expressions for HRXN and SRXN . Here is an example from Chem. Commun. 22: 2231-2233 (2007), also presented in Lecture 4 of CHEM505. The Dehydrogenation of Cyclohexane, where the temperature when the reaction is spontaneous is Td = 599K as shown in the following picture:

- 3 H2

!"#$%&&'$ !()!"*#+$
6 Example

To obtain these value of Td , optimize and do a frequency calculation for all the species involved. In the paper, DFT was used and b3pw91 was the functional with aug-cc-pVDZ basis set. Notice that for the H2 molecule you do not need to do the calculation since it was the example I used, although I still recommend you to do it so you can verify your job. The values obtained for the Enthalpies are: Benzene: Cyclohexane: Hydrogen molecule: Benzene: Cyclohexane: Hydrogen molecule: -232.078750 h -235.645767 h -1.160936 h 69.153 Cal/mol-K 74.624 Cal/mol-K 31.224 Cal/mol-K

And the values for Entropy are:

With these values is straight forward to obtain the value of Td . The value I obtained was Td =598.42 K. 5

Running jobs in the Bulldog Clusters at Yale

If you have access to the Bulldog Clusters, the following scripts may be useful to submit your jobs. For cluster BulldogL: #!/bin/bash #PBS #PBS #PBS #PBS #PBS #PBS pwd time -N -r -j -q -l -V test n oe batista walltime=24:00:00,nodes=1:ppn=8,mem=42gb

g09 < "Path"/"inputfile" > "Path"/"outputfile"

Remember to change paths and names the input and output les. For cluster BulldogJ and K: #PBS #PBS #PBS #PBS -l -l -N -q select=1:ncpus=4:mem=5gb walltime=24:00:00 test batista -W group_list=batista

cd $PBS_O_WORKDIR export PATH=/usr/local/cluster/hpc/Applications/Gaussian:$PATH export g09root=/usr/local/cluster/hpc/Applications/Gaussian source $g09root/g09/bsd/g09.profile export GAUSS_SCRDIR="Path scratch dir" g09 "Path"/"inputfile" > "Path"/"outputfile" Remember to change path of Scratch directory, paths and names of input and output les.

You might also like