Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Aims and Intended Learning Objectives
Use the MATLAB software to manipulate matrices, plot graphs and write programs.
By the end of this experiment you will be able to:
Perform matrix multiplication in MATLAB, using as an example the rotation of a
molecule in space, and determining the normal modes
Plot graphs in MATLAB, using as an example the analysis of the kinetics of a reaction
that is first order in each reactant
Skills & Techniques Developed
During this experiment you will utilise the following skills and/or techniques:
MATLAB software
Matrix multiplication, eigenvalues and eigenvectors
Graph plotting
Programming and problem solving
Aligned Lecture Course
CHEM10212 (kinetics)
CHEM20611 (molecular vibration)
CHEM20212 (molecular mechanics)
This experiment builds on previous teaching lab experiments:
CHEM10600 (MATLAB)
Safety
No CRA form is required as this experiment is entirely computational.
Make sure that you take regular breaks from the screen.
Preparation
Read the Introduction and Theory pdf. This includes going through chapters 4-6 of the
online ebook.
Pre-lab Quiz: Complete the pre-lab quiz (ensure you have looked over the experiment
before attempting).
Copy and save all relevant output, m files and graphs to a single word file named
E20_Firstname_Lastname. Write down relevant working, notes etc in your lab book, as
you would for a practical experiment.
2
EXPERIMENTAL
Part 1. Molecular Rotation
Molecules are dynamic and can undergo translation, rotation and vibration. Here we will use
matrix multiplication to calculate the coordinates of atoms of carbon dioxide upon rotation.
In two dimensions the coordinates of atoms of the CO2 molecule (shown below) may be
represented as three vectors: [
?1
0
], [
0
0
] and [
1
0
] (assuming a bond length of 1 for simplicity).
1.1 In Matlab, open a new m-file called rot.m and do the following:
Create a vector v for the oxygen atom at [
1
0
] (Chapter 2, page 13)
Set the variable theta equal to π/4 radians (i.e. 45°) (Hint: pi is already a variable in
Matlab).
Create a rotation matrix R in terms of the variable theta (see Introduction and Chapter
2, page 14)
Multiply the matrix and vector to generate the new coordinates vnew = R v (note the
order of multiplication matters). Your output vector should be [
0.7071
0.7071].
1.2 Repeat the above process, but rotate the molecule 2π (i.e. 360°) in steps of π/6 (30°). To
do this make the following m-file called rotco2.m (Chapter 3, page 31) with the text below, fill
in the blanks (...), and add axis labels to the graph (see Introduction for more information
about plotting). Copy the resulting graph (it will be saved as figure1.png) into your word
document and add an appropriate figure caption to describe it.