Reading molecular data

Before you turn this problem in, make sure everything runs as expected. First, restart the kernel (in the menubar, select Kernel\(\rightarrow\)Restart) and then run all cells (in the menubar, select Cell\(\rightarrow\)Run All).

Make sure you fill in any place that says YOUR CODE HERE or “YOUR ANSWER HERE”, as well as your name and collaborators below:

NAME = ""
COLLABORATORS = ""

Load the data with numpy

Download this data file.

This is an xyz file containing the geometry of an isobutane molecule. Load this data into a numpy using np.loadtxt. Once you have the array, make an array of the chemical symbols, and a 2D array containing the x,y,z coordinates of each atom in each row.

Read the data with plain Python commands

Use plain python commands to open the file, read the lines and convert them to the results you got above.

When you are done, download a PDF and turn it in on Canvas. Make sure to save your notebook, then run this cell and click on the download link.

%run ~/s24-06642/s24.py
%pdf