Using A Spreadsheet To Solve The Schrodinger Equat
Using A Spreadsheet To Solve The Schrodinger Equat
net/publication/263950857
CITATIONS READS
11 1,764
4 authors, including:
Yingbin Ge
Central Washington University
34 PUBLICATIONS 411 CITATIONS
SEE PROFILE
All content following this page was uploaded by Yingbin Ge on 16 October 2018.
Article
pubs.acs.org/jchemeduc
calculus skills. The wave functions of the S0, S1, and T1 states of H2 are constructed from the
Publication Date (Web): May 1, 2014 | doi: 10.1021/ed400693p
where Ĥ is the Hamiltonian operator. When the exact wave where xk, yk, and zk are Cartesian coordinates of the kth
function is unavailable, the variational theorem can be used to randomly sampled position of the electron within a box of a
obtain the approximate wave function and energy through the given volume V. The approximation is reasonable if (a) the
minimization of ⟨E⟩. Herein, we introduce a hands-on exercise integrand is a fast decaying function, (b) the volume V is large
that allows students with basic calculus knowledge to solve eq 2 enough that the value of the integrand outside the volume is
approximately for the ground and excited electronic states of negligible, and (c) the number of sampled points Nsampling per
H2 on a spreadsheet. For simplicity, the variational theorem is volume (Nsampling/V) is reasonably large (this poses a practical
not used to optimize the total wave function in the spreadsheet limit to the volume). Two-electron integrals can be calculated
calculations. The molecular orbitals (MO) of H2 are simply in a similar fashion. For example, the expectation value of the
constructed through the linear combination of the exact repulsion between two electrons can be calculated using the
exponential wave function of H atoms; the total wave function following equation:
is then constructed from the MOs.
In the description of this exercise and in all spreadsheet 1 ∫ ψ r112 ψ dτ
calculations, four fundamental atomic units (au) are used for =
simplicity and clarity:
r12 ∫ ψ 2 dτ
⎛ Nsampling k 2
me = 1 au (3) ⎜ ∑k = 1 (ψ )
≈⎜
( ) V ⎞⎟⎟/⎛⎜ ∑
1
r12 k 2
Nsampling
k=1
(ψ k)2 ⎞
V 2⎟⎟
e = 1 au (4) ⎜
⎜⎜ Nsampling ⎟⎟ ⎝ Nsampling ⎠
h ⎝ ⎠
ℏ= = 1 au
2π (5) N
(ψ k)2 ( )
1
Downloaded by 72.162.180.25 on September 9, 2015 | http://pubs.acs.org
∑k =sampling
1 r12 k
1 =
Publication Date (Web): May 1, 2014 | doi: 10.1021/ed400693p
= 1 au N
∑i =sampling (ψ k)2
4πε0 (6) 1 (11)
where me is the mass of an electron, e the charge of a proton, h where ψ = ψ (x1, y1, z1, x2, y2, z2) and dτ = dx1 dy1 dz1 dy2 dz2.
the Planck constant, ℏ the reduced Planck constant, and ε0 the The volume appearing in the preceding equation is squared
dielectric constant in vacuum. The atomic units for length and both in the numerator and denominator because the integrands
energy can be derived from the above four fundamental atomic are functions of the x/y/z coordinates of two electrons. The ψk
units: and r12k are the numerical values of ψ and r12 at the kth
randomly sampled positions of the two electrons. Note that the
(4πε0)ℏ2 numerator in the last term of the above equation is simply the
1 au of length =
mee 2 (7) weighted sum of the repulsion between the two electrons,
where the weight, (ψk)2, is the probability density of finding the
mee 4 two electrons at their corresponding positions.
1 au of energy = In the spreadsheet calculations, the total wave function ψ is
(4πε0)2 ℏ2 (8)
constructed from MOs that are linear combinations of real
The total energy of H2 consists of the nucleus−nucleus (N− exponential functions (e−r). Note that e−r is the exact solution
N) repulsion energy and the electronic energy. The N−N to the H atom, where r is in the atomic unit of length (1 au =
repulsion in H2 equals 1/RAB, where RAB is the distance 0.529177 Å). The following antisymmetric wave functions are
between the two H nuclei A and B. The electronic energy Eelec used for the H2 singlet ground state (S0), the first excited
of H2 is calculated using the following equation: singlet state (S1), and the first triplet excited state (T1) with a
magnetic quantum number of zero:7
∫ ψ Helecψ̂ dτ
Eelec =
∫ ψ 2 dτ ψ (S0) = [σ(1) σ(2)][α(1) β(2) − α(2) β(1)] (12)
⎡ ⎤
( −21 ∇12 + −21 ∇22 ) + ( r−1 + r−1 + r−1 + r−1 ) + ( r1 )
∫ ψ ⎢⎣ 1A 1B 2A 2B 12
⎥⎦ψ dτ ψ (S1) = [σ(1) σ *(2) + σ(2) σ *(1)][α(1) β(2) − α(2) β(1)]
= (13)
∫ ψ 2 dτ
(9) ψ (T)
1 = [σ (1) σ *(2) − σ (2) σ *(1)][α(1) β(2) + α(2) β(1)]
(14)
The terms enclosed within the first, second, and third
parentheses are the quantum mechanical operators of kinetic where σ and σ* denote the unnormalized symmetry-adapted
energy, attraction, and repulsion of electrons, respectively. The bonding and antibonding orbitals:
analytical expressions of the integrals appearing in eq 9 are very σ(i) = ΦiA + ΦiB = e−riA + e−riB (15)
complex when either exponential functions3 or Gaussian-type
functions2 are used to construct the total wave function ψ. σ*(i) = ΦiA − ΦiB = e−riA − e−riB (16)
Therefore, we estimate all quantum mechanical integrals using
the Monte Carlo integration method,5,6 a technique especially where i = 1, 2 denotes the coordinates of the ith electron in H2,
useful for high-dimensional integration. For example, the ΦiA = e−riA is the atomic function of nucleus A, and ΦiB = e−riB is
integral of a function f of the xyz coordinates of an electron the atomic function of nucleus B. The α and β spin functions
can be estimated as follows: are orthonormalized.
+∞ N
In eqs 12−14, the spin part of the total wave function is
∑k =sampling f (x k , y k , z k ) separated from the spatial part and thus the spin integrals can
∭ f (x , y , z ) d x d y d z ≈ 1
Nsampling
V be separated and canceled in eq 2 because the Hamiltonian
−∞ (10) operator does not contain spin coordinates. Therefore, the spin
854 dx.doi.org/10.1021/ed400693p | J. Chem. Educ. 2014, 91, 853−859
Journal of Chemical Education Article
■
numerator. Numerical values of these cross-terms and the
corresponding exchange energy can be estimated by slightly
modifying the spreadsheet. Motivated students may resort to RESULTS AND DISCUSSION OF SAMPLE
CALCULATIONS
Downloaded by 72.162.180.25 on September 9, 2015 | http://pubs.acs.org
The plots of the atomic orbitals are not exactly symmetrical breaking the symmetry of the molecular orbitals using open-
Publication Date (Web): May 1, 2014 | doi: 10.1021/ed400693p
because neither nucleus A or B is placed at the center of the z shell wave functions such as in an unrestricted HF (UHF)
axis and also because the sampling of the positions of the calculation.13 To further demonstrate the failure of the RHF
electron is random. The constructive and destructive theory and the success of the UHF theory at the dissociation
interferences between the two atomic orbitals are clearly limit of H2, we used the spreadsheet to calculate the energies of
illustrated in the plots of the bonding and antibonding the S0, S1, and T1 electronic states at the bond distance of 10 au
molecular orbitals. of length. The S0, S1, and T1 energies are determined to be
We have also carried out spreadsheet calculations to obtain −(0.691 ± 0.131), −(0.394 ± 0.227), and −(1.000 ± 0.000)
the single-point energy of the S0 state of H2 at various au, respectively. Our S0 energy is close to the HF energy
internuclear distances ranging from 0.8 to 3.5 au of length. In (−0.6875 au) at infinite bond distance calculated by Halpern
each calculation, the x/y dimensions of the box are set to be 6 and Glendening using the same exponential basis functions.3
au of length; the z dimension is set to be 6 au plus the bond For further comparison, the HF/cc-pV6Z energies of the S0 and
distance. The spreadsheet-calculated average energy and T1 states are −0.768 and −1.000 au at the bond distance of 10
standard deviation are illustrated in Figure 3 in comparison au, while the exact HF energies of the S0 and T1 states are
supposed to be exactly −1 au at the dissociation limit.
Because the relative energyrather than the absolute
energyis of more interest to chemists, binding energy (BE)
is calculated using the BE = |E(H2) − 2E(H)| equation. The
spreadsheet predicts the atomic energy of H to be exactly −0.5
au and the minimum energy of H2 to be −(1.102 ± 0.023) au;
thus the binding energy of H2 in the ground state is determined
to be 0.102 ± 0.023 au excluding the zero-point vibrational
energy (ZPVE) correction. Our result is very close to Halpern
and Glendening’s HF binding energy of 0.099 au using the
same basis set but calculated in an analytical and deterministic
manner.3 For comparison, the HF binding energies are 0.167,
0.185, 0.184, and 0.134 au using the STO-1G, STO-2G, STO-
3G, and cc-pV6Z basis sets, respectively. Among the above HF
energies, the HF/STO-1G energy is the closest to the
experimental binding energy at 0 K (0.17446 au without the
Figure 3. Spreadsheet-calculated potential energy surface of H2 in the ZPVE correction14) only because of the fortuitous cancellation
S0 electronic state versus those calculated at the HF level of theory of errors that originate from the very small basis set and from
with the STO-1G, STO-2G, STO-3G, and cc-pV6Z basis sets. the lack of correlation in the molecular calculation. The
spreadsheet-calculated binding energy contains the largest error
with the HF/STO-1G, HF/STO-2G, and HF/STO-3G of all partly because the error in the energy calculation for the
potential energy surfaces (PES). The HF/cc-pV6Z PES is H2 molecule cannot be canceled by any error in the calculation
also plotted serving as the benchmark within the realm of HF for the H atom.
theory. All of the HF calculations were carried out using the The spreadsheet-calculated PES reaches the minimum at the
GAMESS package.9,10 Note that the cc-pV6Z basis set bond distance of ∼1.5 au of length. This bond distance is
(6s5p4d3f on H) is large enough to provide a close estimate reasonably close to the experimental bond distance of H2
of the HF limit. For example, at the 1.5 au bond distance, the (1.401 au or 0.7414 Å)14 at equilibrium. It is also reasonably
HF limit (two-point extrapolation from the HF/cc-pV5Z and close to the equilibrium bond distance (1.603 au) calculated by
856 dx.doi.org/10.1021/ed400693p | J. Chem. Educ. 2014, 91, 853−859
Journal of Chemical Education Article
Downloaded by 72.162.180.25 on September 9, 2015 | http://pubs.acs.org
Publication Date (Web): May 1, 2014 | doi: 10.1021/ed400693p
Figure 4. Spreadsheet versus HF/STO-3G calculated results for H2 at the bond distance of 1.5 au: (A) total energy, (B) attraction, (C) e−e
repulsion, (D) potential energy, and (E) kinetic energy. The HF/cc-pV6Z data are plotted serving as the benchmark.
Figure 5. The mean (A) and the standard deviation (B) of the total energy of the S0, S1, and T1 electronic states of H2 with various numbers of
sampled data (Nsampling = 2,500, 5,000, 10,000, 20,000, 40,000).
Halpern and Glendening using the same exponential basis calculations are slightly less accurate than the HF/STO-3G
functions in their MO calculations.3 Therefore, we made more calculations for the ground state and are notably more accurate
detailed comparison of energy components at this bond for the excited states; similar patterns of the ranking of accuracy
distance between the spreadsheet calculations and the HF/ are observed for each energy component illustrated in Figure
STO-3G calculations in Figure 4. The HF/cc-pV6Z data are 4B−E.
also plotted serving as the benchmark. At the bond distance of 1.5 au, we also varied the value of
At the bond distance of 1.5 au, the average and standard Nsampling to 20,000, 10,000, 5,000, and 2,500 to test the
deviation of the 25 spreadsheet calculations of the total energy robustness of the spreadsheet calculations using fewer sampled
of the S0, S1, and T1 electronic states were −(1.102 ± 0.023), data. Figure 5A shows that the mean values of the 25 runs are
−(0.410 ± 0.035), and −(0.682 ± 0.018) in atomic units. The statistically the same regardless of the Nsampling value used within
energies of the S0, S1, and T1 electronic states are −1.112, the wide range from 2,500 to 40,000. Figure 5B shows that the
−0.222, and −0.591 au at the HF/STO-3G level of theory and standard deviation of the total energy is found to be
are −1.131, −0.674, and −0.794 au at the HF/cc-pV6Z level of asymptotically inversely proportional to the square root of
theory. Although only one basis function is employed on each the number of the sampled data per volume. Therefore, if the
H atom in the spreadsheet calculations, the quality of the PES is of interest, we suggest using a sample size of 40,000 (or
results is satisfactory: Figure 4A shows the spreadsheet even more) data in each run to achieve a reasonable precision.
857 dx.doi.org/10.1021/ed400693p | J. Chem. Educ. 2014, 91, 853−859
Journal of Chemical Education
■
Article
Even when a very large number of data are sampled, the ASSOCIATED CONTENT
computing time is not likely an issue because it takes only a *
S Supporting Information
split second to perform one run with 40,000 sampled data on a
Windows PC with one CPU of 3.20 GHz frequency and the Text describing a sample exercise including the step-by-step
computing time scales linearly with Nsampling. instruction of the construction of the spreadsheet and the
■
procedures of calculations and tables listing a Microsoft Excel
spreadsheet that contains the sample calculations of the S0, S1,
ADDITIONAL EXERCISES T1 electronic states of H2 and graphs and a much smaller
Although this spreadsheet is designed to calculate the Hartree− EXCEL spreadsheet that contains only a template with 2500
Fock energies of the S0, S1, and T1 electronic states of H2, sampled data. This material is available via the Internet at
quantum chemistry instructors may also develop many other http://pubs.acs.org.
activities appropriate for students at different levels. For
example, this spreadsheet can be easily modified to calculate
the energies of one-electron systems such as the H atom and
■ AUTHOR INFORMATION
Corresponding Author
the H2+ molecule. Students may also estimate the energy of the
*E-mail: yingbin@cwu.edu.
first excited state using a Hartree product wave function, σ(1)
σ*(2), which corresponds to the average of the S1 state shown Present Address
†
in eq 13 and the T1 state with a zero magnetic quantum Department of Mathematics, Oregon State University,
number shown in eq 14; they will be able to compare the Corvallis, OR 97331, United States.
Hartree-product wave function with the properly constructed Notes
wave functions for the S1 and T1 states. In this proposed
The authors declare no competing financial interest.
Downloaded by 72.162.180.25 on September 9, 2015 | http://pubs.acs.org
■
spreadsheet calculations, the exponential coefficients in the
atomic functions are fixed. The optimization of the exponential
Publication Date (Web): May 1, 2014 | doi: 10.1021/ed400693p
■
(6) Gould, H.; Tobochnik, J.; Christian, W. Numerical and Monte
Carlo Methods. Introduction to Computer Simulation Methods:
CONCLUSION Applications to Physical Systems; Addison-Wesley: Boston, MA, USA,
We have designed a spreadsheet to calculate the energy of the 2006.
S0, S1, and T1 electronic states of H2. The spreadsheet (7) Szabo, A.; Ostlund, N. S. Modern Quantum Chemistry, 1st ed.;
calculations circumvent the need for knowledge of linear McGraw-Hill: New York, 1982; pp 101−102.
algebra and advanced calculus and hence constitute a suitable (8) Szabo, A.; Ostlund, N. S. Modern Quantum Chemistry, 1st ed.;
McGraw-Hill: New York, 1982.
exercise for undergraduate physical chemistry students with (9) Schmidt, M. W.; Baldridge, K. K.; Boatz, J. A.; Elbert, S. T.;
very basic calculus skills. We suggest having students construct Gordon, M. S.; Jensen, J. H.; Koseki, S.; Matsunaga, N.; Nguyen, K. A.;
the spreadsheet themselves to learn how these complicated Su, S. J.; Windus, T. L.; Dupuis, M.; Montgomery, J. A. General
quantum calculations can be broken down into smaller, easily Atomic and Molecular Electronic-Structure System. J. Comput. Chem.
understood steps. The proposed spreadsheet calculations 1993, 14, 1347−1363.
employed only one basis function on each H atom and did (10) Gordon, M. S.; Schmidt, M. W. Advances in electronic structure
not involve the optimization of the exponential coefficients but theory: GAMESS a decade later. In Theory and Applications of
are still nearly as accurate as the HF/STO-3G calculations for Computational Chemistry; Dykstra, C. E., Frenking, G., Kim, K. S.,
the ground state and are more accurate for the excited states. Scuseria, G. E., Eds.; Elsevier: Amsterdam, 2005; Chapter 41.
The atomic and molecular orbitals, the total energy, and the (11) Martin, J. M. L. Ab initio total atomization energies of small
moleculesTowards the basis set limit. Chem. Phys. Lett. 1996, 259,
energy components of the H2 molecule in the ground and
669−678.
excited states can be easily calculated and plotted by students to (12) Karton, A.; Martin, J. M. L. Comment on: “Estimating the
better visualize and understand some important quantum Hartree-Fock limit from finite basis set calculations” [Jensen F (2005)
chemical concepts. The method presented in this work can also Theor Chem Acc 113:267]. Theor. Chem. Acc. 2006, 115, 330−333.
be extended to other problems of interest in quantum (13) Jensen, F. Introduction to Computational Chemistry, 2nd ed.; John
chemistry for upper-division students. Wiley & Sons: West Sussex, U.K., 2007; pp 145−153.