diff options
author | hardythe1 | 2015-05-05 14:21:39 +0530 |
---|---|---|
committer | hardythe1 | 2015-05-05 14:21:39 +0530 |
commit | fba055ce5aa0955e22bac2413c33493b10ae6532 (patch) | |
tree | be70ef4fccd07c9c88de778014219201b4ea971f /Physical_Chemistry/Chapter4.ipynb | |
parent | 67068710030ddd6b6c809518c34af2e04e0bf7ca (diff) | |
download | Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.tar.gz Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.tar.bz2 Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.zip |
add books
Diffstat (limited to 'Physical_Chemistry/Chapter4.ipynb')
-rwxr-xr-x | Physical_Chemistry/Chapter4.ipynb | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/Physical_Chemistry/Chapter4.ipynb b/Physical_Chemistry/Chapter4.ipynb new file mode 100755 index 00000000..82fe5388 --- /dev/null +++ b/Physical_Chemistry/Chapter4.ipynb @@ -0,0 +1,171 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:567a331a7783164e40dcbd30f4cdd5679a7a2dc34fb757d2d02e98a98daba061"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 - Molecular energy levels"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - pg 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Moment of inertia\n",
+ "#initialization of variables\n",
+ "import math\n",
+ "B=10.34 #cm**-1\n",
+ "c=2.998*10**10 #cm/s\n",
+ "h=6.625*10**-27 #erg sec\n",
+ "#calculations\n",
+ "I=h/(8*math.pi**2 *B*c)\n",
+ "#results\n",
+ "print '%s %.2e %s' %(\"Moment of inertia =\",I,\" g cm^2\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Moment of inertia = 2.71e-40 g cm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2 - pg 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Bond length\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "ma=1.0080\n",
+ "mb=35.457\n",
+ "Na=6.0232*10**23\n",
+ "I=2.707*10**-40 #g cm**2\n",
+ "#calculations\n",
+ "mu1=ma*mb/(ma+mb)\n",
+ "mu2=mu1/Na\n",
+ "r=math.sqrt(I/mu2)\n",
+ "#results\n",
+ "print '%s %.2e %s' %(\"Bond length =\",r,\"cm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bond length = 1.29e-08 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Example 3 - pg 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Force constant\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "c=2.998*10**10 #cm/s\n",
+ "wave=2990 #cm**-1\n",
+ "mu=1.627*10**-24 #g\n",
+ "#calculations\n",
+ "k=mu*(2*math.pi*c*wave)**2\n",
+ "#results\n",
+ "print '%s %.2e %s' %(\"Force constant =\",k,\"dynes/cm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force constant = 5.16e+05 dynes/cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4 - pg 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the anharmonicity constant\n",
+ "#initialization of variables\n",
+ "l1=2886. #cm^-1\n",
+ "l2=5668. #cm^-1\n",
+ "#calculations\n",
+ "wave=2*l1-l2 \n",
+ "wave2= wave+l1\n",
+ "x=wave/(2*wave2)\n",
+ "#results\n",
+ "print '%s %.4f' %(\"anharmonicity constant = \",x)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "anharmonicity constant = 0.0174\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |