Commit 83c4c216 by Ivo Filot

### Adding scripts for ethylene and benzene

parent eea60e35
 # 6emac2-periodic-huckel Scripts to solve Huckel equations for periodic systems; part of the course 6EMAC2 \ No newline at end of file This repository contains a set of small Python scripts to practice with solving the Huckel equations for periodic systems. ## Using Python We recommend that you install [Anaconda](https://www.anaconda.com/download/) and use the Spyder IDE to work with these Python scripts. Please make sure you download Python version 3.
 # # This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. # # Source: https://gitlab.tue.nl/ifilot/6emac2-periodic-huckel # Author: Ivo Filot # # # Solve the Huckel equation for benzene # import numpy as np # build matrix M = np.matrix([ [0,1,0,0,0,1], [1,0,1,0,0,0], [0,1,0,1,0,0], [0,0,1,0,1,0], [0,0,0,1,0,1], [1,0,0,0,1,0]]) # perform matrix diagonalization e,v = np.linalg.eigh(M) # print energies print(e) # print eigenvectors print(v.transpose()) \ No newline at end of file
 # # This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. # # Source: https://gitlab.tue.nl/ifilot/6emac2-periodic-huckel # Author: Ivo Filot # # # Solve the Huckel equation for ethylene # import numpy as np # construct the matrix M = np.matrix([ [0,1], [1,0]]) # perform matrix diagonalization e,v = np.linalg.eig(M) # print eigenvalues (energies) print(e) # transpose to have eigenvectors as rows print(v.transpose()) \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!