UA CHEMISTRY 713 - Spectroscopic Hamiltonians

Unformatted text preview:

Computational SpectroscopyIII. Spectroscopic Hamiltonians(a) Introduction to MATLAB(b) Matrix operations(c) Programing(d) Diagonalizing Hamiltonian matricesUpdated: March 25, 2008(a) What is MATLAB? MATLAB is the computational environment that we will use to solve spectroscopicHamiltonians to find the resulting energy levels and wavefunctions. MAT LAB stands for Matrix Laboratory The basic object in MATLAB is the matrix. Matrices are constructed, manipulated, matrix problems solved, and the results displayed. Any problem that can be expressed in terms of matrices, that is in terms of linear algebra, canbe easily solved in MATLAB. A matrix is an m × n array of numbers A vector is a 1 × n matrix A scalar is a 1 × 1 matrix, that is just a number. Complex numbers are no problem in MATLAB. MATLAB calculations can be run in two ways:1. Type in commands one at a time in the command window2. Create a program, an “M-file”, that contains a series of such commands. MATLAB comands read like ordinary algebra Many high-level matrix operations are available. Each command packs a big punch; you get a lot of work done without much programming.Warnings about MATLAB The hardest part is learning the user interface, and the various kinds ofwindows that it gives you. You do need to work through the tutorials to learn this. Be careful where you save your stuff. Make a folder in your “My Documents” folder and keep all your MatLab stuff there. Don’t leave any files in the MALAB directory or elsewhere on the computer. The current directory is shown at the top of your main MATLAB window. Your workspace contains all of the data and matrices that you have created. The default name for your workspace is “matlab.mat”, but you can use other nameswith the “.mat” extension on the file name. Your programs are saved separately as “M-files”, such as “myprog.m”. These are just text files that can be opened and edited with any text editor. You can save your matrices as text files:save ABC.txt ABC -asciiThis saves the matrix ABC in the text file ABC.txt in the current directory.ABC.txt can then be opened with any text editor, with Excel, or other program. Variable and matrix names are case-sensitiveHow will MATLABhelp us compute spectra? To compute molecular energy levels, we need to solve the Schroedinger equationHΨ = EΨ . (1) We will be concerned with the nuclear motion, therefore the Hamiltonian isH = T + Eelec(R), (2)where T is the nuclear kinetic energy operator and the effective potential energy is Eelec(R), theelectronic energy calculated as a function of the nuclear coordinates R. Eelec(R) is what we could getfrom Gaussian or from another electronic structure program. To solve the Schroedinger equation (1), we expand the wavefunction as a linear combination of a setof n basis functions, The wavefunction Ψ then becomes a vector in the n-dimensional space of the basis functions, the Hamiltonian H becomes an n×n matrix, E is a constant, and HΨ = EΨ becomes linear algebra eigenvalue problem, that is solved in MATLAB with thesingle command “eig”. Hilbert space is the infinite-dimensional vector space of wavefunctions. For practical reasons,we truncate to n dimensions. Most of our work will be in setting up the matrix H. We will also use matrix algebra to make the computer do most of that work. Spectral transition frequencies are obtained by subtracting to get the difference in energy betweenenergy levels connected by the selection rules.! " = ci#ii=1n$What we didn’t get fromGaussian or Spartan Didn’t solve the quantum mechanics of the nuclear motion. No rotational energy levels or rotational (microwave) spectra. No vibrational energy levels for fundamentals or for overtone and combination bands. Got only classical harmonic frequencies No treatment of large-amplitude motion such as Torsion, inversion Conformational change Motion along a reaction coordinate No coupling of nuclear degrees of freedom Vibration-vibration (IVR = intramolecular vibrational redistribution) Rotation-vibration (Coriolis coupling and centrifugal distortion) Quantum chaos Restricted ergodicity (Ergodicity is the core assumption of molecular mechanics calculations) No coupling of electronic and nuclear degrees of freedom Radiationless transitions, dynamics at conical intersections(b) Matrix Operations Live demonstration. A = [1,2,3;4,5,6;7,8,9] Let A, B be matrices and c and d be constants. The elements of A are Aij, i labels the rows, i=1,m, andj labels the columns, j=1,n scalar multiplication: cA is c*A Scalar addition: A+c is A+c Matrix multiplication: C=AB or Cik=ΣjAijBjk C=A*B The number of columns in A must be equal to the number of rows in B. Indentity matrix: I I = eye(n,n) Always a square matrix Matrix Inversion: I/A = inv(A)= I/A (I must have same dimension as A) A must be square and “non-singular” to have an inverse Matrix division: B/A = B*inv(A)= B/A A matrix raised to a power: A2=AA; A3=AAA; etc. A^3 A must be square Exponentiation of a matrix: exp(A) = 1 + A + A2/2! +A3/3! + A4/4! + …= expm(A) Many other functions of matrices are defined. Search “funm” in MATLAB help.! A " A =A11A12A13A21A22A23# $ % & ' ( ! I =1 0 00 1 00 0 1" # $ $ $ % & ' ' 'Fun with Complex Numbers z =c+d*i with i = sqrt(-1) and c, d real i and j are both predefined in MATLAB as the imaginary unit. Complex conjugation: z* is conj(z) Exponentiation of imaginary number uses Euler’s formula: exp(i*pi) gives -1.000 + 0.000i Functions and matrix operations work fine with complex numbers (wheremathemetically allowed). Complex numbers are user-friendly!!! exp iz( )= cos z + isin zMore fun with matrices Matrix transpose: At is A.’ Matrix transpose conjugate: (At)* is A’. This is the more useful form. Select a sub-matrix: A(1:2,:) selects the first two rows and all of the columns of A. A(2,3) gives the 3rd element from the 2nd row. Concatenate 2 matrices side-by-side [A,B] or one on top of the other [A;B]. Inner product: A*B Examples are matrix multiplication and “dot” product If x is a column vector containing the variables xi and p is a column vectorthen A*x=p is a set of 3 linear equations in the 3 unkowns x1, x2, and x3.Get


View Full Document

UA CHEMISTRY 713 - Spectroscopic Hamiltonians

Download Spectroscopic Hamiltonians
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Spectroscopic Hamiltonians and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Spectroscopic Hamiltonians 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?