Tutorial - Quantum Chemistry - Simulating Vibrationally-resolved Electronic Spectra Using Gaussian

Simulating Vibrationally-resolved Electronic Spectra Using Gaussian
Simulating Vibrationally-resolved Electronic Spectra Using Gaussian
Yun Xia, Ashley M. De Lio, & Taras V. Pogorelov
Department of Chemistry, School of Chemical Sciences
University of Illinois Urbana-Champaign
Edition 1, June 07, 2020, updated/reviewed October 28, 2024
This is a tutorial designed to introduce users to simulating vibrationally-resolved electronic spectra utilizing the Gaussian 09software package(1). Specifically, the simulation of vibrationally-resolved UV-Vis absorption spectra is performed on an anisole molecule. Users are expected to have a foundation in Unix/Linux. See for example ourPrimer(http://pogorelov.scs.illinois.edu/tutorials/)
Note: If time is a constraint, you may use the previously generated output and checkpoint files that accompany this tutorial. 
Outline: To generate the vibrationally-resolved UV-Vis absorption spectra, three steps are generally needed:
  1. Geometry optimization and calculation of frequencies for the initial state.
  2. Geometry optimization and calculation of the frequencies for the final state. 
  3. Generation of the vibrationally-resolved UV-Vis absorption spectra. 
In the first two steps, we calculate the frequencies and save the frequency information in the checkpoint files, which will be used in step 3 to generate the spectra. 
1. Software. Available on the SCS cluster: Gaussian(1), GaussView(2),and Vim. Personal computer: xserver (see  SCS Clusters for xfowarding instructions).This tutorial can be completed on iMacs in the SCS VizLab (151 Noyes Lab) or with personal computers with Windows or Mac OS. Small modifications might be needed when used on other computers.
2. Starting up. Connect using instructions at SCS Clusters  under xforwarding. If connecting outside of campus, connect to the VPN first.
Make a directory for this tutorial once connected: 
> mkdir uvvis-spectra-tutorial
Change your directory to the new directory you just made
> cd uvvis-spectra-tutorial




Load the Gaussian module

> module load gaussian/g16
Open GaussView with the following command: 
> gv
Note: You may encounter the following error message: 
Failed to locate Gaussian scratch directory
Ignore this error by simply hitting the "OK" button. GaussView should open.
3. Constructing a molecule. Construct your molecule of interest in the blue window (which should initially be blank): 
 
Right click anywhere on the blue window and select "Builder." Click "Ring fragment." Right click, select "Builder" again, and then click "Fragment" and select "benzene". Click anywhere in the blue window to place the benzene ring. 
 
Now, right click again and select “Builder”. Select “Element Fragment” which should pull up aperiodic table. Select the oxygen fragment on the far right. Click on any hydrogen atom of the ring to substitute one of the hydrogens for a hydroxyl group. Then select the carbon fragment on the far right. Click on the hydrogen atom of the hydroxyl group to substitute this hydrogen atom for a methyl group.


Your anisole molecule should look like this: 
 
Note: Anisole has a planar conformation of the methoxy group, for experimental evidence please refer to Phys. Chem. Chem. Phys. 2001, 3, 1407-1410. (4)
4. Optimization and Frequency Calculations of the initial state in the gas phase. Now save the structure you just constructed as the Gaussian input file File -> Safe anisole_S0.com. Then quit GuassView and go back to the terminal window. 
Type the following command to edit the input file: 
> vim anisole_S0.com
Replace the route section (line 2) with the keywords below. Vim/vi refresher: move cursor to the line 2, type <dd> , to delete the line, press <i> to enter the Insert mode of vim/vi, copy and paste the line below. Now quit Vim/vi: 
press <ESC> (the Escape key) to switch to the Command mode and type <.> (period) then type <wq> (for write and quit) and press <Enter>. 
#p opt Freq=SaveNM B3LYP/6-31G (d) geom=connectivity
These keywords will start a Gaussian job which first optimizes the geometry for the initial state and then calculates the frequencies of the optimized geometry. By using the option freq=SaveNM, the frequency information will be saved in the checkpoint file anisole_S0.chk. For this job we choose B3LYP as the functional and 6-31G(d) as the basis set, which should be sufficient to give relatively accurate results. Save the input file and quit Vim.
Submit the calculation to Gaussian with the following command: 
> submit-g16 -n # -q queuenamehere anisole_S0.com
Replace the “#” in the command with the number of cores desired to be utilized for the calculation. The number of cores should be consistent to what you specify in the Gaussian input file (#nprocshared=). Do not exceed 16. Replace "queuenamehere" with the queue you wish to use
After submission, check the progress of the calculation with
> qstat -u netid
Once your netid no longer appears, the calculation has completed. Hint: if the command 
> "tail *log" 
shows a quote then your Guassian job finished properly. 
5. Optimization and Frequency Calculation of the final state in the gas phase. Open GaussView, press <Ctrl> + <O> and select the Gaussian output file anisole_S0.log. Click "Open" and you will see the optimized structure of the initial state. Type <Ctrl> + <S> and save this file as a new Gaussian input file anisole_S1.com. Quit GaussView and return to the terminal window.
Type the following command to edit the input file: 
> vim anisole_S0.com
Replace the route section with the following keywords: 
#p TD(nstates=6,root=1) B3LYP/6-31G(d) opt Freq=saveNM geom=connectivity
These keywords will start a Gaussian job which first optimizes the geometry for the final state (the first excited state) and then calculates the frequencies of the optimized geometry. This job is based on the time-dependent density functional theory, which is the keyword TD. The value of root is the excited state of interest. For example, in this job root equals to 1, so the structure of molecule will be optimized for the first excited state. The value of n states must be larger than the value of root. Generally, you can let n states = root + 5. Again, the frequency information will be saved in the checkpoint file anisole_S1.chk. We choose B3LYP as the functional and 6-31G(d) as the basis set, which is consistent to what we did for the initial state. Save the input file and quit Vim.
Submit the calculation to Gaussian with the following command:
> submit-g16 -n # -q queuenamehere anisole_S1.com
Once that job is complete, open GaussView, press <Ctrl> + <O> and select the Gaussian output file anisole_S1.log. Click “Results” and select “UV-VIS”, the UV-Vis absorption spectra generated by GaussView is as follows:
The excitation energy of the first excited state is 258.45 nm, and apparently it is not the maximum absorption peak.
6. Generation of the vibrationally-resolved UV-Vis absorption spectra. Quit GaussView and return to the terminal window. Create a Gaussian input file by typing the following command: 
> vim spectra.com 
The input file is as follows: 
Link 0 Commands
%chk=anisole_S0.chk 
#p geom=AllCheck Freq=(ReadFC, FC, SaveNM) NoSymm
anisole_S1.chk 
Copy this text into your spectra.com input file. Remember to leave a blank line at the end of the input file. The options geom=AllCheck and Freq=ReadFC are described in the Gaussian manual. Basically, they let us extract all necessary data from the checkpoint file given in the line starting by %chk=without doing the frequency calculation again. The option Freq=FC means we will utilize the Franck-Condon method to compute the amplitudes for electronic transitions between the initial and final states. Save the input file and quit Vim.
Submit the calculation to Gaussian with the following command: 
> submit-g16 -n # -q queuenamehere spectra.com

7. Description of the output and create the spectra. Open the output file spectra.log by typing the following command:
> vim spectra.log
Search for the words "Final Spectrum" , and the spectrum generated by Gaussian is printed as follows: 
 
The first column is the value of energy in cm-1. The second column is corresponding molar absorption coefficient in dm3*mol-1*cm-1. You can turn the energy (cm-1) into wavelength (nm) simply by 
Then you can use Origin or any other graphing software to plot the spectra which is presented as a column in ASCII format. Take Origin for example, copy the two columns of data into Origin:
 
Type  <Long Name> and <Units> for axis X and axis Y. Then type <Ctrl> + <A>. Right click, select “Plot”, “Line”, “Line”. The vibrationally-resolved UV-Vis absorption spectra of anisole is as follows:
 
There are two main absorption peaks at 253 nm and 259 nm. Note that this time there are more details of the S0->S1 absorption peak which cannot be found in the spectra we generated first because here we take different vibrational states of the initial and final states into account.
Summary. We covered the three steps needed to calculate vibrationally-resolved electronic spectra. 
Contact. If you find errors/typos or have suggestions or comments on the material in this tutorial, please contact us at pogorelo@illinois.edu and adelio@illinois.edu. See more tutorials at the Pogorelov Lab website: http://pogorelov.scs.illinois.edu/ 
References
  1. Gaussian 09, Revision A.01, M. J. Frisch, G. W. Trucks, H. B.Schlegel, G. E. Scuseria, M. A. Robb, J. R. Cheeseman, G. Scalmani, V. Barone, G. A. Petersson, H. Nakatsuji, X. Li, M. Caricato, A. Marenich, J. Bloino, B. G. Janesko, R. Gomperts, B. Mennucci, H. P. Hratchian, J. V. Ortiz, A. F. Izmaylov, J. L. Sonnenberg, D. Williams-Young, F. Ding, F. Lipparini, F. Egidi, J. Goings, B. Peng, A. Petrone, T. Henderson, D. Ranasinghe, V. G. Zakrzewski, J. Gao, N. Rega, G. Zheng, W. Liang, M. Hada, M. Ehara, K. Toyota, R. Fukuda, J. Hasegawa, M. Ishida, T. Nakajima, Y. Honda, O. Kitao, H. Nakai, T. Vreven, K. Throssell, J. A. Montgomery, Jr., J. E. Peralta, F. Ogliaro, M. Bearpark, J. J. Heyd, E. Brothers, K. N. Kudin, V. N. Staroverov, T. Keith, R. Kobayashi, J. Normand, K. Raghavachari, A. Rendell, J. C. Burant, S. S. Iyengar, J. Tomasi, M. Cossi, J. M. Millam, M. Klene, C. Adamo, R. Cammi, J. W. Ochterski, R. L. Martin, K. Morokuma, O. Farkas, J. B. Foresman, and D. J. Fox, Gaussian, Inc., Wallingford, CT, 2016.
  2. GaussView, Version 5.0.9, Roy Dennington, Todd A. Keith, and John M. Millam, Semichem Inc., Shawnee Mission, KS, 2016.
  3. Origin, Origin 7.5, OriginLab Corp., Northampton, MA, 2003.
  4. C. G. Eisenhardt, G. Pietraperzia, M. Becucci. The High-Resolution Spectrum of the S1 <- S0 Transition of Anisole. Phys. Chem. Chem. Phys. 2001, 3, 1407-1410.



Keywords:
electronic spectra, gaussian, vibrationally, simulating
Doc ID:
103070
Owned by:
Taras P. in School of Chemical Sciences
UIUC
Created:
2020-06-15
Updated:
2024-10-28
Sites:
University of Illinois School of Chemical Sciences