{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 7 - Atomic Physics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1 - pg 217"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "For hydrogen atom : \n",
      " Radius  = 0.53 A \n",
      " Velocity = 2.2 x 10^6 m/s \n",
      " Energy of an electron (eV) =  -13.6\n"
     ]
    }
   ],
   "source": [
    "#pg 217\n",
    "#calculate the Radius, Velocity and Energy of electron\n",
    "#Given :\n",
    "import math\n",
    "n =1.; # ground state\n",
    "m = 9.109382*10**-31; #electron mass in kg\n",
    "h = 6.625*10**-34; #planck's constant in Js\n",
    "e = 1.602176*10**-19; # Charge of an electron in C\n",
    "e0 = 8.854188*10**-12; # Vacuum permittivity in F/m\n",
    "#calculations\n",
    "r1 = (n**2*h**2*e0)/(math.pi*m*e**2);# Radius in A\n",
    "v1 = e**2/(2*h*e0*n); # Velocity in m/s\n",
    "E1 = -((m*e**4)/(8*n**2*h**2*e0**2)); # Energy of an electron in eV\n",
    "# 1 A = 1.0*10**-10 m , 1 eV = 1.6*10**-19 J\n",
    "#results\n",
    "print\"For hydrogen atom : \\n Radius  =\",round(r1*10**10,2),\"A \\n Velocity =\",round(v1*10**-6,1),\"x 10^6 m/s \\n Energy of an electron (eV) = \",round(E1/(1.6*10**-19),1)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2 - pg 218"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Rydberg constant for hydrogen (cm^-1) =  109737.16\n",
      "Rydberg Constant is (cm^-1) =  109677.43\n"
     ]
    }
   ],
   "source": [
    "#pg 218\n",
    "#calculate the Rydberg constant\n",
    "#Given :\n",
    "#(a)\n",
    "m = 9.109382*10**-31; #electron mass in kg\n",
    "c = 2.997925*10**8; #Speed of light  in m/s\n",
    "h = 6.626069*10**-34; #planck's constant in Js\n",
    "e = 1.602176*10**-19; # Charge of an electron in C\n",
    "e0 = 8.854188*10**-12; # Vacuum permittivity in F/m\n",
    "#calculations\n",
    "R = (m*e**4)/(8*h**3*e0**2*c);# Rydberg constant in m**-1\n",
    "print\"Rydberg constant for hydrogen (cm^-1) = \",round(R*10**-2,2)\n",
    "#(b)\n",
    "M = 1.672622*10**-27; # proton mass in kg\n",
    "R1 = ((m*e**4)/(8*h**3*e0**2*c))*(1/(1 + (m/M))); # Rydberg Constant in m**-1\n",
    "#1 m**-1 = 1.0*10**-2 cm**-1\n",
    "#results\n",
    "print\"Rydberg Constant is (cm^-1) = \",round(R1*10**-2,2)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3 - pg 219"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "M/m value is :  1840.4\n"
     ]
    }
   ],
   "source": [
    "#pg 219\n",
    "#calculate the M/m value\n",
    "#Given :\n",
    "RH= 109677.58; #Rydberg constant for Hydrogen in cm**-1\n",
    "RHe = 109722.269; #Rydberg constant for Helium in cm**-1\n",
    "#calculations\n",
    "#Ratio = M/m\n",
    "Ratio = ((4*RH)- (RHe))/(4*(RHe-RH));\n",
    "#results\n",
    "print \"M/m value is : \",round(Ratio,1)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4 - pg 223"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Uncertainty in position (A) =  0.53\n"
     ]
    }
   ],
   "source": [
    "#pg 223\n",
    "#calculate the Uncertainty in position\n",
    "#Given\n",
    "import math\n",
    "h = 6.625*10**-34; #planck's constant in Js\n",
    "m = 9.1*10**-31; #electron mass in kg\n",
    "E1 = 13.6; #Energy of electron in eV\n",
    "#1 eV = 1.6*10**-19 J\n",
    "#calculations\n",
    "p = math.sqrt(2*m*E1*1.6*10**-19); #momentum in kg m/s\n",
    "deltax = h/(2*math.pi*p);\n",
    "# 1 A = 1.0*10**-10 m\n",
    "#results\n",
    "print \"Uncertainty in position (A) = \",round(deltax/(1.0*10**-10),2);"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
