#### Code file for orbitals ######## #2345678901234567890123456789012345678901234567890123456789012345678901234567890 # # author and copyright: Herbert H. H. Homeier, 1994 # email: na.hhomeier@na-net.ornl.gov # date: May 20, 1994 # # description: procedures to compute real and complex spherical harmonics # # orbitals[ComplexSurfaceHarmonic]:= proc(l:nonnegint,m:integer,theta:algebraic,phi:algebraic) local mm,x,i; option `Copyright 1994 by Herbert H. H. Homeier`; mm:=abs(m); if mm>l then ERROR(`Invalid second argument m`,m,`. Required not to exceed the`. `first argument l`,l,` in magnitude`); fi; if l+mm=0 then RETURN(sqrt(1/4/Pi)); fi; I**(m+mm)* 1/2^l/l!*(sin(theta))^mm* simplify( subs(x=cos(theta), diff( (x*x-1)^l,seq(x,i=1..(l+mm))) ) )* exp(I*m*phi)* sqrt((2*l+1)*(l-mm)!/(l+mm)!/4/Pi); end: # # orbitals[RealSurfaceHarmonic]:= proc(l:nonnegint,m:integer,theta:algebraic,phi:algebraic) local mm,x,i; option `Copyright 1994 by Herbert H. H. Homeier`; mm:=abs(m); if mm>l then ERROR(`Invalid second argument m`,m,`. Required not to exceed the`. `first argument l`,l,` in magnitude`); fi; if m<0 then 1/2^l/l!*(sin(theta)^mm* simplify( subs(x=cos(theta), diff( (x*x-1)^l,seq(x,i=1..(l+mm))) ) )* (-1)^m*sin(mm*phi))* sqrt((2*l+1)*(l-mm)!/(l+mm)!/4/Pi); else if l+mm=0 then RETURN(sqrt(1/4/Pi)); fi; 1/2^l/l!*(sin(theta))^mm* simplify( subs(x=cos(theta), diff( (x*x-1)^l,seq(x,i=1..(l+mm))) ) )* (-1)^m*cos(mm*phi)* sqrt((2*l+1)*(l-mm)!/(l+mm)!/4/Pi); fi; end: # #2345678901234567890123456789012345678901234567890123456789012345678901234567890 orbitals[ComplexSolidHarmonic]:= proc(l:nonnegint,m:integer,x:algebraic,y:algebraic,z:algebraic) local j; option `Copyright 1994 by Herbert H. H. Homeier`; if abs(m)>l then ERROR(`Invalid second argument m`,m,`. Required not to exceed the`. `first argument l`,l,` in magnitude`); fi; sqrt((2*l+1)*(l+m)!*(l-m)!/4/Pi)* sum((-x-I*y)^(m+j)*(x-I*y)^j*z^(l-m-2*j)/2^(2*j+m)/(j+m)!/j!/(l-m-2*j)!, j=max(0,-m)..iquo(l-m,2)); end: #2345678901234567890123456789012345678901234567890123456789012345678901234567890 `help/text/ComplexSurfaceHarmonic`:= TEXT( `FUNCTION: ComplexSurfaceHarmonic - the complex spherical surface harmonic`, `FUNCTION: RealSurfaceHarmonic - the real spherical surface harmonic`, `FUNCTION: ComplexSolidHarmonic - the complex spherical solid harmonic`, ` `, `CALLING SEQUENCE:`, ` ComplexSurfaceHarmonic(l,m,theta,phi)`, ` RealSurfaceHarmonic(l,m,theta,phi)`, ` ComplexSolidHarmonic(l,m,x,y,z)`, ` `, ` after with(orbitals) or explicitly`, ` `, ` orbitals[ComplexSurfaceHarmonic](l,m,theta,phi)`, ` orbitals[RealSurfaceHarmonic](l,m,theta,phi)`, ` orbitals[ComplexSolidHarmonic](l,m,x,y,z)`, ` `, `PARAMETERS:`, ` l - a nonnegative integer (angular momentum quantum number)`, ` m - an integer with abs(m) <= l (magnetic quantum number)`, ` theta - an algebraic expression (angle to z axis)`, ` phi - an algebraic expression (angle to x axis of projection to xy plane)`, ` x - an algebraic expression (first cartesian coordinate)`, ` y - an algebraic expression (second cartesian coordinate)`, ` z - an algebraic expression (third cartesian coordinate)`, ` `, `SYNOPSIS:`, `- The call `, ` ComplexSurfaceHarmonic(l,m,theta,phi)`, ` returns the complex spherical surface harmonic Y_{l,m}(theta,phi) as `, ` defined in [1], Eq. (1.2-1), p.3.`, `- The call `, ` RealSurfaceHarmonic(l,m,theta,phi) `, ` returns the real spherical surface harmonic R_{l,m}(theta,phi), which`, ` is defined as `, ` R_{l,m}(theta,phi) = Re(Y_{lm}(theta,phi)) (m>=0),`, ` R_{l,-m}(theta,phi)= Im(Y_{lm}(theta,phi)) (m>=0).`, `- The call `, ` ComplexSolidHarmonic(l,m,x,y,z)`, ` returns the complex regular solid harmonic r^l Y_{l,m}(theta,phi) as `, ` defined in [2], Eq. (131), p.26.`, ` `, `REFERENCES:`, ` [1] M. Weissbluth, Atoms and Molecules, Academic Press, New York, 1978.`, ` [2] E.O. Steinborn and K. Ruedenberg, Adv. Quantum Chem. 7, 1.`, ` `, `EXAMPLES:`, `> # compare A. Lindner, Drehimpulse in der Quantenmechanik`, `> # (Teubner, Stuttgart, 1984), p. 97.`, `> with(orbitals);`, ` `, ` [ComplexSolidHarmonic, ComplexSurfaceHarmonic, RealSurfaceHarmonic] `, ` `, `> ComplexSurfaceHarmonic(3,3,theta,phi);factor("*sqrt(4*Pi/7));`, ` `, ` 3 1/2 1/2 `, ` sin(theta) exp(3 I phi) 7 5 `, ` - 1/8 ---------------------------------- `, ` 1/2 `, ` Pi `, ` `, ` 3 1/2 `, ` - 1/4 sin(theta) exp(3 I phi) 5 `, ` `, `> RealSurfaceHarmonic(5,2,theta,phi);`, ` `, `1/3225600 `, ` `, ` 2 3 1/2 1/2 `, ` sin(theta) (604800 cos(theta) - 201600 cos(theta)) cos(2 phi) 11 210 `, ` ---------------------------------------------------------------------------- `, ` 1/2 `, ` Pi `, ` `, `> ComplexSolidHarmonic(17,-12,a,b,c);`, ` `, ` 1/2 12 5 `, ` 78460462080000 1508087 (1/235438866432000 (a - I b) c `, ` `, ` 13 3 `, ` + 1/612141052723200 (- a - I b) (a - I b) c `, ` `, ` 2 14 / 1/2 `, ` + 1/11426632984166400 (- a - I b) (a - I b) c) / Pi `, ` / ` ): `help/text/RealSurfaceHarmonic`:=`help/text/ComplexSurfaceHarmonic`: `help/text/ComplexSolidHarmonic`:=`help/text/ComplexSurfaceHarmonic`: save `orbitals.m`; quit;