DECLARE SUB Pict1 () DECLARE SUB Pict2 () DECLARE SUB Pict3 () DECLARE SUB Pict4 () DECLARE SUB Pict5 () DECLARE FUNCTION Theta! (l!, m!, ang!) DECLARE SUB PAGER () REM GE Copeland REM Dept of Physics REM Old Dominion University REM Norfolk VA REM Update REM Corrin Wilson 3/19/2001 REM 101 DIM The(500), ORB(500) CALL Pict1 160 CALL PAGER CALL Pict2 190 CALL PAGER CALL Pict3 264 CALL PAGER CALL Pict4 340 CALL PAGER CALL Pict5 450 PRINT "Input the value of the orbital angular momentum, l < 5?" 460 INPUT l! 462 IF l >= 5 THEN GOTO 450 464 IF l < 0 THEN GOTO 450 465 IF l = INT(l) THEN GOTO 468 466 ELSE PRINT "l must be integer" GOTO 450 END IF 468 PRINT " m, can take on the values: m="; 470 FOR l1 = 0 TO l STEP 1 472 PRINT l1; " "; 474 NEXT l1 476 PRINT 480 PRINT "Select the value of m, the magnetic quantum number?" 482 INPUT m 500 REM calculation portion of program 503 PI = 4! * ATN(1!) 505 n = 0 510 FOR ang = 0 TO 2 * PI STEP (PI / 120) 520 n = n + 1 530 angle = ang * (180 / PI) 540 radius = Theta(l, m, ang) REM The = x coordinate REM orb = y coordinate x = radius * COS(ang) y = radius * SIN(ang) The(n) = x ORB(n) = y 550 NEXT ang 560 PRINT " Now return to WPLOT to view orbitals." 570 OPEN "Plttek.dat" FOR OUTPUT AS #2 580 PRINT #2, 1 582 PRINT #2, 1 583 PRINT #2, n 584 PRINT #2, " Y value " 586 PRINT #2, "X value " 588 PRINT #2, " PLOT OF 0(L,M)" 590 PRINT #2, " l = "; l; " and m ="; m 591 FOR I = 1 TO n 592 PRINT #2, The(I), ORB(I) 593 NEXT I 1100 CLOSE #2 CHAIN "tek2wplt.bas" 1220 END 1200 SUB PAGER 1205 PRINT , "PUSH RETURN to continue."; 1210 INPUT dum$ 1211 PRINT CHR$(12); END SUB SUB Pict1 100 REM 105 PRINT CHR$(12); 110 PRINT " O R B I T A L S for 1 electron systems." 115 PRINT 120 PRINT " The solution of one electron problems using Coulombic forces" 122 PRINT "is a critically important problem of physics and chemistry. This" 124 PRINT "program calculates the ASSOCIATED LENGRENDRE FUNCTIONS as discussed" 126 PRINT "by Pauling and Wilson. Note these orbitals are a function of the" 130 PRINT "orbital angular momentum (l) and the absolute magnitude of its" 132 PRINT "projection upon the space fixed z axis, i.e. ABS(m)." 134 PRINT "Various author's use a slightly different way of normalization." 136 PRINT " Following Pauling and Wilson, we define the THETA FUNCTION as" 140 PRINT " (2l+1) (l-abs(m))! ImI" 142 PRINT " 0 (theta) = SQRT { ------------------- } P ( cos(theta))" 144 PRINT " l,m 2 (l+abs(m))! l" 145 PRINT 150 PRINT "where: theta is the polar angle o <0 < Pi," 152 PRINT " l,m are defined above" 154 PRINT " ImI " 156 PRINT " P are the Associated Lengendre functions " 158 PRINT " l" END SUB SUB Pict2 170 PRINT " Given a value of l, m can take on the values -l,-l+1,...,l. But" 172 PRINT "only the ABSOLUTE VALUE OF m has meaning, i.e. the functions " 174 PRINT "depend upon |m| only! The 0(l,m) functions are normalized such" 176 PRINT "that" 180 PRINT " - Pi " 181 PRINT " I 2" 182 PRINT " The integral of I 0 (theta) sin(theta) d(theta) = 1." 183 PRINT " I l,m " 184 PRINT " o -" END SUB SUB Pict3 200 PRINT "Some of the associated Legendre polynomials follow:" 210 PRINT " P(l,m) will be our symbol from here on out. Since m=-l,...,+l" 220 PRINT "the subscripts may be: l=0,m=0 l=1,m=-1,0,+1, l=2,m=-2,-1,0,1,2." 230 PRINT 240 PRINT "P(0,0)=1 P(1,-1)= -sin(0), P(1,0)= cos(0), P(1,1)=(1/2)sin(0)" 241 PRINT 243 PRINT "P(2,-2)=(1/8)sin(0)**2 P(2,-1)= (1/2)cos(0)sin(0)" 250 PRINT "P(2, 0)=(1/2)(3cos(0)**2-1) P(2, 1)= -3sin(0)cos(0) and" 260 PRINT "P(2, 2)= 3sin(0)**2" 262 PRINT "etc." END SUB SUB Pict4 300 PRINT " Some of the 0 (theta) functions: They are degenerate in m." 310 PRINT " l,m " 312 PRINT " For l=0,m=0, 0(o,o)=sqrt(2)/2." 314 PRINT " For l=1,m=-1,0,+1,but +1=-1, so two functions." 316 PRINT " 0(1,o) = sqrt(6) cos(theta)/2" 318 PRINT " 0(1,1) = sqrt(3) sin(theta)/2" 320 PRINT 322 PRINT "For l=2, ImI=2,1,0. 2 " 324 PRINT "0(2,o)= sqrt(1O)(3 cos(theta) -1)/4" 326 PRINT "0(2,1)= sqrt(15) sin(theta)cos(theta)/2" 328 PRINT "0(2,2)= sqrt(15) sin(theta)sin(theta)/4" END SUB SUB Pict5 342 PRINT " The one-electron orbital wave functions are many times referred to" 344 PRINT "as ORBITALS. These are functions of theta. Using SPECTROSCOPIC" 346 PRINT "notation, these may be called s,p,d,f,g,.... depending upon the" 348 PRINT "value of the orbital angular momentum quantum number l=0,1,2,3,..." 400 PRINT " This program will calculate any possible 0(l,m) function for l=o " 410 PRINT "up to l= 4 for any allowed value of m. Thereafter, a plotting file" 420 PRINT "is written for use with WPlot. The plotting file contains 0(l,m)" 430 PRINT "and are plotted as any other function = F(x,y). " 440 PRINT "The plots illustarted the orbitals! BEWARE, the aspect ratio of" PRINT "the viewing screen is NOT corrected!" END SUB FUNCTION Theta (l, m, ang) 800 REM DEF THETA (l, m, ang) 802 ON l + 1 GOTO 810, 820, 830, 840, 850 REM l = 0 s 810 Theta = SQR(2) * .5 811 EXIT FUNCTION REM l = 1 p 820 IF m = 0 THEN 821 Theta = SQR(6) * COS(ang) * .5 822 ELSE 823 Theta = SQR(3) * SIN(ang) * .5 824 END IF 825 EXIT FUNCTION 830 ON m + 1 GOTO 831, 833, 836 831 Theta = SQR(10) * .25 * (3 * COS(ang) ^ 2 - 1) 832 EXIT FUNCTION 833 Theta = SQR(14) * .5 * SIN(ang) * COS(ang) 834 EXIT FUNCTION 836 Theta = SQR(15) * .25 * SIN(ang) ^ 2 837 EXIT FUNCTION 840 ON m + 1 GOTO 841, 843, 845, 847 841 Theta = .75 * SQR(14) * ((5 / 3) * COS(ang) ^ 3 - COS(ang)) 842 EXIT FUNCTION 843 Theta = (SQR(42) / 8) * SIN(ang) * (5 * COS(ang) ^ 2 - 1) 844 EXIT FUNCTION 845 Theta = (SQR(105) * .25) * SIN(ang) ^ 2 * COS(ang) 846 EXIT FUNCTION 847 Theta = SQR(70) * .125 * SIN(ang) ^ 3 848 EXIT FUNCTION 850 ON m + 1 GOTO 851, 853, 855, 857, 859 851 Theta = (9 * SQR(2) / 16) * ((35 / 5) * COS(ang) ^ 4 - 10 * COS(ang) ^ 2 + 1) 852 EXIT FUNCTION 853 Theta = (9 * SQR(10) / 8) * SIN(ang) * ((7 / 3) * COS(ang) ^ 3 - COS(ang)) 854 EXIT FUNCTION 855 Theta = (3 * SQR(5) / 8) * SIN(ang) ^ 2 * (7 * COS(ang) ^ 2 - 1) 856 EXIT FUNCTION 857 Theta = (3 * SQR(70) / 8) * SIN(ang) ^ 3 * COS(ang) 858 EXIT FUNCTION 859 Theta = (3 * SQR(35) / 16) * SIN(ang) ^ 4 860 EXIT FUNCTION END FUNCTION