Information • Textbooks • Media • Resources
computer bulletin board
Using Maple To Obtain Analytic Expressions in Physical Chemistry Sean A. C. McDowell* Department of Chemistry, University of Western Ontario, London, ON N6A 5B7, Canada Although symbolic computational languages like Maple and Mathematica have been available for a number of years, it seems that they have not been used as widely as would be expected considering their great potential for saving time and tedious effort. Symbolic computational languages like Maple (1) have potential to ease the manipulation and derivation of analytical expressions in physical chemistry. They are able to handle and simplify complicated expressions. They also have the advantage of practically any level of precision in arithmetic and are therefore very useful for high-accuracy numerical work. In this note the usefulness of Maple to obtain explicit analytic expressions from general analytic formulas is illustrated by two examples from physical chemistry. The examples chosen are the expressions for the wellknown spherical harmonic functions and the electric multipole moment operators of a molecule.
on φ (2, 3)
Spherical Harmonic Functions
For negative m (3)
Angular momentum is extremely important in the quantum mechanics of atomic structure, since it provides a framework for the treatment of spin. The square of the total angular momentum of a particle (whether it be orbital or spin angular momentum), ^L 2, may be defined in terms of its components by 2
2
2
2
L = Lx + Ly + Lz
(1)
where ^ L x, ^ Ly, ^ Lz represent the projection of the angular momentum vector on the x, y, and z axes. This operator has the commutation properties 2
2
2
L , Lx = L , Ly = L , Lz = 0
(2)
so states can be constructed that are simultaneously eigenfunctions of ^L2 and any one component of ^L, say ^ Lz. The eigenfunctions of ^L 2 and ^ L z are called spherical harmonic functions, Ylm(θ, φ), and they satisfy 2
m
m
L Y l θ, φ = l l + 1 Y l θ, φ m
m
L z Y l θ, φ = mY l θ, φ
(3) (4)
where l and m are the orbital and projection angular momentum quantum numbers, θ is the polar angle, and φ the azimuthal angle describing the orientation of a particle in space. The spherical harmonics may be written as the product of two functions, one depending only on θ and the other *Current address: Department of Biological and Chemical Sciences, University of the West Indies, Cave Hill Campus, P.O. Box 64, Bridgetown, Barbados.
m
Y l θ, φ = Θlm θ Φm φ
(5)
with Φm given by
Φm φ = 2π
{1/2
exp imφ
(6)
and Θlm for m ≥ 0 by
Θlm θ =
{1
m
l
2 l!
1/2
2l + 1 l – m !
sin θ
2 l +m ! ×
Θl, {
d d cos θ
l+ m
m
cos2θ – 1
m
m
= {1 Θl
m
l
(7)
(8)
so that Θlm(θ) for m < 0 is still given by eq 7 but with m replaced by |m| and the factor of ({1)m omitted. The phase factor of the spherical harmonics is arbitrary, but the phase convention of Condon and Shortley is used here (3, 4). Thus explicit analytic expressions in terms of θ and φ may be obtained from eqs 5–8 for any values of l and m. However, most texts list only the first few spherical harmonics (typically up to l = 2 or 3). The analytic formulas for functions of higher values of l may be obtained with little effort by using Maple, as illustrated by the program shown in Figure 1. The resulting output shown in Figure 2 may be confirmed by a hand calculation. Electric Multipole Moments It has been known for a long time that the interactions between molecules, at separations that are large compared to their internal molecular dimensions, may be usefully described by perturbation theory—the perturbation being the electrostatic interaction between the particles (electrons and nuclei) comprising the individual molecules (5, 6). Various categories of the interaction energy are obtained depending on the order of the perturbation energy. The firstorder energy is the classical electrostatic interaction between the molecular charge distributions and is determined by the permanent multipole moments. The second-order energy can be separated into the induction energy, which arises from the distortion of each molecule in the electric field of its neighbors, and the dispersion energy, which describes the electrostatic interaction arising from the correlated instantaneous fluctuations in the molecular charge distributions. Therefore a detailed knowledge of the molecular charge dis-
Vol. 74 No. 12 December 1997 • Journal of Chemical Education
1491
Information • Textbooks • Media • Resources
Figure 1. Maple program to obtain the spherical harmonic function for l = 5, m = {1.
Figure 2. Output generated by the Maple program shown in Figure 1.
tributions (and consequently the electric multipole moments) is essential for an understanding of intermolecular forces. The electric multipole moments of a molecular charge distribution may be defined by first considering a set of charges ei located at vectorial positions ri relative to an origin fixed at some point in the molecule (let us call the molecule A). The total charge (the zeroth moment), the dipole moment (the first moment), and the quadrupole moment (the second moment with the trace removed) of molecule A are then defined by (5, 6)
qA = µAα =
Σ
ei
(9)
e i r iα
(10)
i∈A
Σ
i∈A
ΘAαβ = 1 Σ e i 3r iαr iβ – r 2i δαβ 2 i∈A
where α, β denote vector or tensor components and can be equal to x, y, or z in Cartesian coordinates. In general the moment of rank n (the 2n-pole moment) is defined by (5, 6)
ξα
n
1, α 2,…α n
= {1
n
n!
Σ
i∈A
e i r 2n+1 ∇α ∇α …∇α i 1
2
n
1 ri
(12)
where α1 , α2,... αn are the n vector labels for the components of the multipole moment. Usually only the multipole moments up to the quadrupole moments are explicitly shown in textbooks; the higher
Figure 3. Maple program to obtain the xxzz component of the electric multipole moment of rank 4.
Figure 4. Output generated by the Maple program shown in Figure 3.
1492
(11)
Journal of Chemical Education • Vol. 74 No. 12 December 1997
Information • Textbooks • Media • Resources moments may be obtained by the tedious application of eq 12. However, with Maple it is straightforward to obtain any component of the multipole moment of any rank in an insignificant amount of time. As an example, the Maple program for obtaining the xxzz component of the multipole moment of rank 4 (i.e., the hexadecapole moment) is shown in Figure 3 and the output from this program is shown in Figure 4. The result may be verified by a hand calculation. The program in Figure 3 may be modified for higher or lower rank multipoles by adding or deleting the appropriate lines: for example, the explicit formula for xi(x,z) or Θxz is obtained by setting n = 2, and assigning α (1) the value x and α (2) the value z. Thus it is easy to obtain analytic expressions for the electric multipole moments of any rank in a short time and with considerable ease, by using Maple routines like the one shown in Figure 3. Conclusion I hope that the preceding examples clearly illustrate the potential of Maple for saving time and effort in evaluating general analytical formulas in physical chemistry. Not
only is it possible to obtain the explicit expressions for higher-order terms, given a general analytical expression, but it is also possible to easily evaluate them numerically after assigning numerical values to the input parameters. It can also serve as a powerful teaching tool, since it can be used to show students of physics and physical chemistry that statements and expressions appearing in textbooks and the literature are verifiable. Literature Cited 1. Char, B. W.; Geddes, K. O.; Gonnet, G. H.; Leong, B. L.; Monagan, M. B.; Watt, S. M. Maple V Language Reference Manual; Springer: New York, 1991. 2. Levine, I. Quantum Chemistry, 2nd. ed.; Allyn & Bacon: Boston, 1974. 3. Zare, R. N. Angular Momentum; Wiley-Interscience: New York, 1988. 4. Condon, E. U.; Shortley, G. H. Theory of Atomic Spectra; Cambridge University: New York, 1935. 5. Buckingham, A. D. Adv. Chem. Phys. 1967, 12, 107. 6. Stone, A. J. In Theoretical Treatment of Large Molecules and Their Interactions; Theoretical Models of Chemical Bonding, Part 4; Maksic, Z. B., Ed.; Springer: Berlin, 1991; pp 103–121.
Vol. 74 No. 12 December 1997 • Journal of Chemical Education
1493