"The file [`CH4-dynmat`](CH4-dynmat) contains output from a calculation of the dynamical matrix of a methane molecule using [Density Functional Perutbation Theory](https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.73.515) (which you will likely learn about in a later course). This is a quantum mechanical calculation of the derivative of the energy of a system with respect to displacements of pairs of atoms in each of the Cartesian directions.\n",

"\n",

"The eigenvalues of this matrix give the vibrational frequencies. Let's try to parse this file to a numpy array and diagonalize it to find the predicted vibrational frequencies of methane.\n",

"The eigenvalues of this matrix give the vibrational frequencies squared. Let's try to parse this file to a numpy array and diagonalize it to find the predicted vibrational frequencies of methane.\n",

"\n",

"The layout of the file is not amenable to being imported directly. You'll often find that if you want to process the output from some code one of the trickiest things is to get it in a format you can operate on. There are many recent initiatives such as [NetCDF](https://www.unidata.ucar.edu/software/netcdf/) and [HDF5](https://support.hdfgroup.org/HDF5/doc/index.html) which try to solve this, and are now incorporated into many scientific codes, but it's good to be able to work without them.\n",