The Hydrogen Atom Probability Density - 2

1. Introduction

In this computational laboratory you will take advantage of one of Mathematica's unique plotting tools to visualize the probability density of the electron in a hydrogen atom. You will generate a plot of points (called a scatter plot) where the density of points in a region is proportional to the probability density. In addition the color of each point represents the probability density at that point in space. Bright red implies a large density. As the color changes from red to yellow to green and finally blue, the density decreases. You will use this visualization technique to develop intuition about the hydrogen atom probability density.

2. Necessary Commands and Definitions

The functions and algorithms needed to complete this laboratory are contained in this section.

2.1 Input Parameters

The user parameters are described here and defined in the cell below.

                  (Subscript[a, 0]) - Bohr radius
                  n - principle quantum number
                  l - angular momentum quantum number
                  m - z-component of the angular momentum
                  maxnum - number of throws of the dice.
                  rmax - size parameter that determines the region of space examined.
                  phimin - lower limit of azimuthal angle ϕ range.
                  phimax - upper limit of azimuthal angle ϕ range.
                  costhetamin - lower limit of cosθ range.
                  costhetamax - upper limit of cosθ range.

a0=0.528;
n=4;
l=2;
m=0;
maxnum=10000;
rmax=20;
phimin = ((0*π)/2);
phimax = ((4*π)/2);
costhetamin = -1;
costhetamax = 1;

2.2 Define the Hydrogen Atom Wave Function.

The complete hydrogen atom wave functions are defined here and parameters chosen to determine specific wave functions (i.e., the principle quantum number, the angular momentum, and its z-component).

Rnl[n_,l_,r_] := (Sqrt[((((2/(n*a0))))^3)*((Factorial[n-l-1])/(2*n*((((Factorial[n+l]))^3))))])*Exp[-(r/(n*a0))](((((2*r)/(n*a0))))^l)*Factorial[n+l]*LaguerreL[n-l-1,2*l+1,((2*r)/(n*a0))]
Ylm[l_, m_, theta_, phi_] := SphericalHarmonicY[l, m, theta, phi];

2.3 Define the Four Dimensional Scatter Plot.

The plotting routine defined here will plot four-tuples in which the first three points determine a point in space (x,y,z) and the fourth element represents some function f(x,y,z). This fourth element is used to determine the color of the point and to represent the 'fourth' dimension.

ScatterPlot4D[data_/;
   MatrixQ[data, NumberQ] &&
   Length[First[data]] === 4,
                fun_, opts___] :=
   Module[{res, coord},
   coord = Map[Last, data] ;
   min = Min[coord] ;
   max = Max[coord] ;
   Show[Graphics3D[
          {PointSize[0.005],
           Map[
              {
               fun[(Last[#] - min)/(max-min)],
               Point[Take[#, 3]]
              }&, data
           ]
          }, opts
        ]
   ]
 ]

2.3 Algorithm to Generate the Probability Density.

A series of random points in space are chosen and the probability density calculated at each point. The random nature of this process has earned this technique the name 'Monte Carlo'. Van Neuman rejection is used to generate a new set of points from the original set that are weighted by the hydrogen atom probability density. For each point in space a number is chosen at random in the range from zero to the maximum probability density. This number is compared with the probability density at that point. If the randomly chosen number is less than or equal to the probability density, then that point is kept. Otherwise, the point is excluded. More points will be clustered in regions of high probability density than in regions of low density.

The first step is to generate random arrays of r, θ, and ϕ and then arrays for the probability density and the test values.

(******************* constants *******************)
n=1;
l=0;
m=0;
maxnum=10000;
rmax=1;
phimin = ((0*π)/2);
phimax = ((4*π)/2);
costhetamin = -1;
costhetamax = 1;
(******************* constants *******************)

radius=Table[RandomReal[{0,rmax}],{k,1,maxnum}];theta=Table[N[ArcCos[RandomReal[{costhetamin,costhetamax}]]],{k,1,maxnum}];phi=Table[N[RandomReal[{phimin,phimax}]],{k,1,maxnum}];pdens=Table[Re[Rnl[n,l,radius[[k]]]*Conjugate[Rnl[n,l,radius[[k]]]]*Ylm[l,m,theta[[k]],phi[[k]]]*Conjugate[Ylm[l,m,theta[[k]],phi[[k]] ]]]*((radius[[k]])^2)*Sin[theta[[k]]],{k,1,maxnum}];pdmax=Max[pdens];pdtest=Table[RandomReal[pdmax],{k,1,maxnum}];pts1=Table[If[pdtest[[k]]≤pdens[[k]],{radius[[k]] Sin[theta[[k]]] Cos[phi[[k]]],radius[[k]] Sin[theta[[k]]] Sin[phi[[k]]],radius[[k]] Cos[theta[[k]]],pdens[[k]]},{0,0,0,0}],{k,1,maxnum}];zeros=Position[pts1,{0,0,0,0}];pts2=Delete[pts1,zeros];

2.4 Plotting the Probability Density.

Use Mathematica's four dimensional plotting routine to represent the hydrogen atom probability density. More points are clustered in regions of high probability density. The color of the point also represents the probability density. Points with a high density are bright red. As the density at each point decreases the color goes from red to yellow to green and finally blue. The saturation also decreases so the regions of low density have a blue, washed-out appearance.

ScatterPlot4D[pts2,
              Hue[0.5*(1-#), 0.5*(1+#), 1]&,      
              Axes->True,
              AxesLabel->{"x","y","z"},
              PlotRange->{ {-rmax,rmax},
                           {-rmax,rmax},
                           {-rmax,rmax} },
              BaseStyle->FontSize->16,
              PlotLabel->StringForm["n=``, l=``, m=``",n,l,m],
              ViewPoint->{3.061, 0.638, 1.294}
             ]

3. Procedure

1. Open the cells in Part 2 and make an initial choice for the parameters in Part 2.3. The first time you execute the commands you might want to set the parameter 'maxnum' to a small value. You can increase it later when you understadn how everything works.

2. Execute the commands in the remaining cells in Part 2.

3. Once you have executed all the cells in Part 2 at least once you can explore different parameter choices by changing the values in the constants section of the cell in Part 2.3 and then executing the plot command in the cell in Part 2.4.

4. Analysis

1. Clearly state in standard notation the hydrogen atom wave function. Describe the meaning of each quantum number.

2. For n=1, what do you expect the probability density to look like? Do you see that?

3. For n=2, what are allowed values of l  and m ?

4. Pick three sets of “interesting” values of n, l, and m. For each of your choices of quantum numbers make a four-dimensional scatter plot of the probability density. Briefly describe each one. Where is the electron most likely to found? Where is the least likely place to find it? Your answer should be in the language of spherical or cylindrical coordinates as appropriate. Print out each plot.

5. In physics, symmetry is a powerful and useful idea. What quantities are symmetric in each of the figures you made in Part 4.3?

6. For l =1, how does the probability density change as the principle quantum number increases?