ACT-CMS Lesson Portal

Diatomic molecule IR spectrum analysis

In this lesson, students write Python code to determine the spectroscopic constants and structural parameters (force constant, bond dissociation energy, and equilibrium bond length) of a diatomic molecule from its IR spectrum.

Programming Skill: Intermediate
Primary Course: Physical Chemistry
Also for: Spectroscopy
Format: Multi-Part Module
Authors: Prof. Gergely Gidofalvi
Estimated Time: 3 hours
Piloted with: Undergraduate - Third Year
Students Tested: 20
python arrays user-defined functions curve fitting analysis of FTIR spectrum rovibrational spectroscopy spectroscopic constants harmonic oscillator rigid rotor quantum chemistry modelling vibrational Schrodinger equation force constant equilibrium bond length bond dissociation energy isotopic substitution

Overview

This is the last lesson of the four-lesson sequence. Using the skills developed in the first lesson (introduction-to-programming-and-python), students write Python code to obtain the spectroscopic constants of a diatomic molecule from its FTIR spectrum. Students first write functions to 1) read in the data, 2) fit a polynomial to the experimental spectrum, 3) relate the spectroscopic constants to the fitting parameters, 4) calculate the force constant, equilibrium bond length, and the bond dissociation energy, and 5) determine the mass-dependence of various spectroscopic constants upon isotopic substitution. Students then use these functions to analyze the funcdamental and overtone spectrum of HCl-35 and DCl-35 (if any of these spectra are missing, experimental spectra are included in the instructor materials). If desired, this project can be combined with the third lesson in the sequence where students learned how to perform quantum chemistry calculations. In the assignment for lesson three, students calculate the potential energy curve of HCl using various levels of theory and basis sets. Using these potential energy curves, they can apply the sinc-DVR method (Jupyter notebook with a brief description of the theory and user's manual included) to model the IR spectra of HCl-35 and DCl-35. Once the theoretical line positions are computed, students can use their Jupyter notebook to compute theoretical values for the spectroscopic constants and structural parameters.

Scientific Learning Objectives

  • Describe the physical orignis of the lines in the rovibrational spectrum of a diatomic molecule.
  • Analyze the high-resolution IR spectrum of a diatomic molecule to extract spectroscopic constants.
  • Relate spectroscopic constants to structural parameters including the force constant, equilibrium bond length, and bond dissociation energy of a diatomic molecule.
  • Describe and quantitatively determine the mass-dependence of various spectroscopic constants upon isotopic substitution.
  • Students will be able to use SciPy to fit experimental data to a polynomial
  • Students will be able to implement functions in Python to carry out tasks specific to the analysis of the IR spectrum of a diatomic molecule.
  • Students will be able to use their Python code to analyze the IR spectrum of HCl-35 and/or DCl-35.

Cyberinfrastructure Learning Objectives

  • Use SciPy to fit experimental data to a polynomial
  • Implement functions in Python to carry out tasks specific to the analysis of the IR spectrum of a diatomic molecule.
  • Use Python code to analyze the IR spectrum of HCl-35 and/or DCl-35.

Prerequisites

Scientific Prerequisites:

  • Apply selection rules and the Bohr frequency condition to interpret spectra.
  • Describe the underlying physical principles of the harmonic oscillator and rigid rotor approximations.
  • Use the harmonic vibrational frequency and rotational constant to determine the force constant and equilibrium bond length of a diatomic molecule, respectively.
  • Describe the physical origin for deviations from the harmonic oscillator and rigid rotor models.
  • Describe and quantitatively evaluate the mass-dependence of spectroscopic constant upon isotopic substitution.

Programming Prerequisites:

  • Knowledge of basic Python syntax (variable types, variable assignment, formatted printing using f-strings, etc. ) and program execution sequence.
  • Understanding of functions and how to use them.
  • Importing standard Python libraries (NumPy, SciPy, etc.) and using the functions included in these libraries.
  • Writing user-defined functions to accomplish context-specific tasks.

Lesson Sequence:

This is Part 3 of 3 in the Quantum Chemistry with Python path.

Complete these lessons first:

Course Materials

Analysis of the IR spectrum of HCl-35 and DCl-35.

Jupyter notebook for implementing Python code to analyze the FTIR spetrum of HCl-35 and DCl-35.

Sinc-DVR method to calculate the rovibrational energies of a diatomic molecule

Jupyter notebook that allows students to simulate the FTIR spectra of a diatomic molecule using its Born-Oppenheimer potential energy curve.

Student Repository

Complete Student Materials

Download or clone the complete repository with all notebooks, datasets, and supporting files.

View Repository Launch on ChemCompute

Instructor Materials

Complete Instructor Package

Solutions for all notebooks, teaching notes, assessment rubrics, and additional examples.

Instructor Resources

Requires instructor verification. Request access if you don't have permission.

Instructor Notes

Additional context for instructors using this lesson:

• The intent of this activity is to provide students with an opportunity to use their programming skills to implement scientific code from essentially scratch. The prompts and function descriptions in the Jupyter notebook serve as an indirect guide to designing their code.

• Once the code for the functions is written, students are more or less are left on their own to decide how (order of function calls and variable assignments) to properly use the functions in their data analysis.

Timing notes:
• If students have completed lesson 1 of the sequence (introduction-to-programming-and-python) or if they are familiar with programming in Python (in particular, they are able to implement functions and use built-in library functions for curve fitting), the in-class time required to complete the assignment is minimal (students may need help to get started with line assignment and reading in the data from files).

Common student questions:

• Students often forget to assign different names for variables related to different spectra.
• It is a good idea to remind students that they should check their functions as they develop them.
• Students are often unsure how to check the acuracy of their results. It is helpful to remind them that, when done correctly, their analysis should be in agreement with the reference data listed on the NIST website.
• Students often fail to recognize that the expression relating alpha_e to B_e to the fitting parameters are not the same for the fundamental and the first overtone. It is good to remind them that, when done correctly, the values for these two quantities from the fundamental and first overtone should agree with each other (hence the suggested averaging in the analysis).

Platform Requirements

Google Colab

No installation required. All dependencies are installed automatically when you run the notebooks.

  • Runs entirely in your web browser
  • Free Google account required
  • All required packages installed inline
  • Works on any device with internet
  • GPU acceleration available for computational tasks