This is a series of five Python notebooks written to introduce coding to students in an advanced chemistry class (Chem 432, Physical Chemistry II), at James Madison University. The notebooks are intended to be run using Google Colaboratory, since it does not require students to download extra software on their devices. The notebooks were made to supplement some of the assigned problem sets and some may refer to specific questions in those sets. However, the notebooks can be used without the referenced problem sets and any mention of them can be removed if needed.
There are two folders:
- student_notebooks This folder contains notebooks with unfinished code that serve as exercises for students.
- instructor_copies This folder contains notebooks with all of the code filled for instructors
Exercise 1 introduces students to basic Python syntax, loops, and importing libraries. Students then calculate energy levels for the 1D particle-on-a-line (particle-in-a-box).
Exercise 2 introduces students to markdown, and plotting. Students then code a calculator to predict UV/vis absorbance of a molecule by treating the electrons with the particle-on-a-line model.
Exercise 3 introduces students to if/then statements. Students then use recursion relations to calculate and plot Hermite polynomials and 1D harmonic oscillator wavefunctions.
Exercise 4 introduces students to functions. Students then use linear variational theory and the STO-NG basis set to calculate approximate energies and wavefunctions for hydrogen-like atoms.
Exercise 5 introduces students to some data analysis tools (pandas and importing your google drive). Students then upload a ro-vibrational spectrum of CO in csv format and calculate the molecular constants.
These notebooks were based on work by Ian Spurgeon, Christopher Berndsen, and others as credited in the exercises.