DiffusionMonteCarloMethodsinQuantumMolecular Calculations · 𝑉. Synthesis of these two methods...

1
The Basics of Quantum Mechanics Quantum mechanics is the best model currently available for physically describing things ranging in size from atomic nuclei to molecules. In quantum mechanics, all objects may be thought as waves and particles simultaneously. These wave-particles are described by mathematical wavefunctions, which describe the shape of the wave travelling through space, as well as the probability of finding the object as a particle at each point in space-time. These wavefunctions are found by solving the following second order differential equation, known as the Schrödinger equation: −ℏ 2 2 2 + , , = ℏ Ψ , (note that this is the time-dependent form). Some of the predictions of quantum mechanics are very strange, but no experiment has ever contradicted its predictions. 4 The Born-Oppenheimer Approximation Wavefunctions become transcendental (not solvable exactly) even in fairly simple systems, thus simplifications must often be made to allow the Schrödinger equation to be solved. All molecules are transcendental quantum systems. In solving for the wavefunctions of electrons in a molecule, one common simplification is to observe that electrons are so much smaller and faster than atomic nuclei that we can act as if the electronic and nucleic wavefunctions are separable (not quantumly entangled). This is known as the Born-Oppenheimer approximation. We can usually calculate very accurate wavefunctions under this approximation, however in some systems the error due to Born-Oppenheimer is more significant, which leads us to consider alternative solution methods. 2,6 Monte Carlo Methods A Monte Carlo method is any mathematical method which uses random sampling and repetition to obtain numerical results. Because computers enable fast pseudorandom number generation and large-scale repetition, Monte Carlo methods have become one of the most powerful techniques for generating solutions to complex or transcendental equations in the modern era. One of the most valuable Monte Carlo techniques for simulating physical processes is called random walk. In these simulations, we begin with a random population of walkers distributed among the possible states of the system. Each walker represents a piece of information about the system, for example they may have spatial coordinates if the system being simulated has to do with distribution in space. Information about the entire system is used at each timestep to determine the probability that each walker will transition between its current state and the nearby states of the system. A random number then is compared to that probability to determine whether a transition actually occurs. Diffusion Monte Carlo (DMC) is a random walk technique modeled after fluid dynamics, used to solve equations similar to the diffusion equation, 2 = , where D is a constant and C is the distribution of the diffusing particles in space. For every increment of time, each walker is allowed to move in a random direction by a random amount. 5 To understand how we use Monte Carlo to simulate quantum mechanical systems, we must work with the time-dependent Schrödinger equation (left), which we rewrite in terms of imaginary time, = , and rearrange to obtain 2 (, ) − , , = , where = 2 2 . We now have an equation remarkably similar to the diffusion equation (left). The other term gives us a first-order rate equation, or “branching process,” which can also be simulated by a Monte Carlo method related to random walk, in which walkers are distributed among the system’s states and given a random chance of deletion or replication based on the potential function, . Synthesis of these two methods can reasonably be expected to approximate some form of the wavefunction. We call this method Diffusion Quantum Monte Carlo (DQMC). We now note from basic quantum mechanical calculations that Ψ , = =0 Ψ = 0 0 Ψ 0 + =1 Ψ 0 where the Ψ are the solutions to the time-independent Schrödinger equation, and −1 . As imaginary time approaches infinity, we find that the imaginary exponential terms in the parentheses become incoherent with each other, averaging to 0, and leaving only lim →∞ Ψ , = 0 Ψ 0 0 . This tells us that the wavefunction we simulate under DQMC will be the ground state. 3,5 The main challenge of implementing the simulation in multiple dimensions is the fact that, as opposed to 1 dimension where there are 2 directions for psips to move, we now have a continuum of directions. This was approached by implementation of polar coordinates for 2 dimensions and spherical polar coordinates for 3 dimensions. That is, rather than each psip simply traveling a distance which could be positive or negative (i.e. left or right), movement was determined by selection of both a random direction and a random distance. Visualization also presented new challenges. In 2 dimensions, we were able to use a heat map (shown below) to plot the number of psips vs. horizontal and vertical position, where number of psips is indicated via the color of a pixel in the graph. In 3 dimensions, we took a similar approach, plotting the 3rd dimension of space by Background Diffusion Monte Carlo Methods in Quantum Molecular Calculations Jules Randolph ([email protected]) Colorado College, Department of Physics To actually run DQMC simulations, we used a computer program in Python. The basic program was built by Zachary Eberhart in the summer of 2016, and most of my work with this project involved expanding the program’s functionality to enable new types of simulations. While programs like this have been built by others 1 , we hope to design a program which is simple enough to be understood at the level of an undergraduate student in a 300- or 400-level physics or chemistry class. Python was chosen as the coding language for the program because it is a high-level language, meaning many mathematical, imaging, and other functions could be imported rather than programmed from scratch. The program functions as follows (figure 1 depicts steps 1-3 and 5): 1. Initialization : A population of “psips” (walkers) is instantiated. Psips have spatial coordinates of all particles in the system. Initial distribution is dependent on the simulation, but is usually uniform in space. 2. Movement : The psips are allowed to move in random directions by random distances. The direction is chosen with a uniform distribution, and the distance is chosen with a Gaussian distribution 3. Birth/Death : Psips’ potentials are calculated based on a simulation-specific potential function. They are then given a random chance of replicating or being deleted based on how their potential compares to the average. 4. Repetition : Steps 2-3 are repeated until the system converges to a wavefunction. 5. Binning/Counting : Space is divided into even segments, and the numbers of psips in each segment are counted so that a distribution can be plotted. 6. Regression : A mathematical function is fit to the raw data from step 5. The goal of much of applied quantum mechanics is to solve the Schrödinger equation for molecules, resulting in a wavefunction describing behavior of the wave-particles (electrons and nuclei) that make up the molecule. Because solving Schrödinger exactly becomes impossible in even small molecules, the Born-Oppenheimer approximation is usually employed, which is often very accurate, however in some cases, such as H 2 + , it leads to noticeable error. One alternative technique to direct calculation is called Diffusion Quantum Monte Carlo (DQMC). The goal of this research is to use DQMC to calculate the ground state wavefunction of H 2 + without using the Born-Oppenheimer approximation. Last summer (2016), Zachary Eberhart built a Python program which ran DQMC simulations for one-dimensional quantum mechanical systems with external potentials. This summer (2017), working with Zack part of the time, I developed the program to run simulations in two and three dimensions, and attempted to simulate the non- Born-Oppenheimer hydrogen atom and the H 2 + molecule. The latter attempts are still in progress. Abstract Often, we are able to obtain very good solutions which predict experimental data with high accuracy under the Born-Oppenheimer approximation. However, in some systems, like very small symmetrical molecules, the motion of the electrons has a greater effect on that of the nuclei. DQMC has the advantage of eschewing such hard calculations, but still obtaining theoretically exact solutions as time and population size are allowed to approach infinity. This allows wavefunctions to be found numerically without using the Born- Oppenheimer approximation. We ask the following questions: Can we use a DQMC simulation to accurately find the groundstate wavefunction of H 2 + , the smallest molecule, without using the Born Oppenheimer approximation? Can such a simulation be used to calculate physical constants of H 2 + more accurately (as compared to experimental data) than other ab initio models which assume Born-Oppenheimer? Can such a simulation be kept computationally lightweight enough to make its use viable in the classroom setting? Can parallel/cluster computing be used to speed up DQMC simulations to make them more viable for use with typical undergraduate resources? Research Questions Approach The Algorithm 1. 2. 3. 5. Figure 1: Diagrams depicting a very small 2-dimensional particle-in-a-box DQMC simulation (see § “The Program” for an in-depth explanation) Results Now that the python simulation is working in multiple dimensions, the next step is to move on to real physical systems. I attempted to simulate the hydrogen atom and H 2 + ; both attempts are still in progress. To simulate these systems without using Born-Oppenheimer, every psip must be given spatial coordinates of every particle in the system, thus hydrogen becomes a 6-dimensional system, and H 2 + becomes 9-dimensional. Other researchers 1 have successfully simulated H 2 + using supercomputers, however we hope that we can keep such a simulation simple enough to be done in a typical undergraduate setting. One challenge of running such simulations is determining what parameters to measure to determine that the simulation is working. Additionally, more work must be done to enable regressions to be taken of the wavefunctions for H 2 + . Because all of the systems which have been simulated thus far have had well-known solutions for their wavefunctions, regressions have worked by parametrizing all constants in the known wavefunction and finding the combination with the lowest R 2 value. For H 2 + , alternative techniques will have to be employed, such as use of the convolution theorem to express the wavefunction as a linear combination of test functions. We also explored the possibility of using parallel computing with a computer cluster to improve computational speed. Although we were able to parallel process simulations on a single computer, future work will be needed to make the program compatible with cluster computing. Future Work 1. Anderson, J. B. (1975). A randomwalk simulation of the Schrödinger equation: H 3. The Journal of Chemical Physics, 63(4). doi:10.1063/1.431514 2. Born, M., & Oppenheimer, J. R. (1927). Zur Quantentheorie der Molekeln. Annalen der Physik, 389(20), 457-484. doi:10.1002/andp.19273892002 3. Griffiths, D. J. (2017). Introduction to quantum mechanics. Cambridge: Cambridge University Press. 4. Grimm, R. C., & Storer, R. G. (1971). Monte Carlo solution of Schrödinger's Equation. Journal of Computational Physics, 7(1), 134-156. doi:10.1016/0021-9991(71)90054-4 5. Hammond, B. L., Lester, W. A., & Reynolds, P. J. (1994). Monte Carlo methods in ab initio quantum chemistry. World scientific. 6. Pisana, S., Lazzeri, M., Casseraghi, C., Novoselov, K. S., Geim, A. K., Ferrari, A. C., & Mauri, F. (2007). Breakdown of the adiabatic Born–Oppenheimer approximation in graphene. Nature Materials, 6, 198-201. doi:10.1038/nmat1846 I would also like to extend my thanks to Professor Sally Meyer, Professor Stephanie Dicenzo, the Colorado College Department of Chemistry and Biochemistry, the Colorado College Department of Physics, the SCoRe Program, and the Dille Fund. References Number of Psips plotting cross sections of space at increments along the z-axis and showing the cross sec- tions as an animation. Using these techniques, we were able to successfully generate ground state wave- functions for particles in a 2- and 3-dimensional infinite square well, harmonic oscillator, and several other potentials.

Transcript of DiffusionMonteCarloMethodsinQuantumMolecular Calculations · 𝑉. Synthesis of these two methods...

Page 1: DiffusionMonteCarloMethodsinQuantumMolecular Calculations · 𝑉. Synthesis of these two methods can reasonably be expected to approximate some form of the wavefunction. We call

The Basics of Quantum MechanicsQuantum mechanics is the best model currently available for physicallydescribing things ranging in size from atomic nuclei to molecules. In quantummechanics, all objects may be thought as waves and particles simultaneously.These wave-particles are described by mathematical wavefunctions, whichdescribe the shape of the wave travelling through space, as well as theprobability of finding the object as a particle at each point in space-time. Thesewavefunctions are found by solving the following second order differentialequation, known as the Schrödinger equation:

−ℏ2

2𝑚𝛁2 + 𝑉 𝐫, 𝑡 𝛹 𝐫, 𝑡 = 𝑖ℏ

𝜕

𝜕𝑡Ψ 𝐫, 𝑡

(note that this is the time-dependent form). Some of the predictions of quantummechanics are very strange, but no experiment has ever contradicted its predictions.4

The Born-Oppenheimer ApproximationWavefunctions become transcendental (not solvable exactly) even in fairly simplesystems, thus simplifications must often be made to allow the Schrödingerequation to be solved. All molecules are transcendental quantum systems. Insolving for the wavefunctions of electrons in a molecule, one commonsimplification is to observe that electrons are so much smaller and faster thanatomic nuclei that we can act as if the electronic and nucleic wavefunctions areseparable (not quantumly entangled). This is known as the Born-Oppenheimerapproximation. We can usually calculate very accurate wavefunctions under thisapproximation, however in some systems the error due to Born-Oppenheimer ismore significant, which leads us to consider alternative solution methods.2,6

Monte Carlo MethodsA Monte Carlo method is any mathematical method which uses randomsampling and repetition to obtain numerical results. Because computers enablefast pseudorandom number generation and large-scale repetition, Monte Carlomethods have become one of the most powerful techniques for generatingsolutions to complex or transcendental equations in the modern era. One of themost valuable Monte Carlo techniques for simulating physical processes iscalled random walk. In these simulations, we begin with a random population ofwalkers distributed among the possible states of the system. Each walkerrepresents a piece of information about the system, for example they may havespatial coordinates if the system being simulated has to do with distribution inspace. Information about the entire system is used at each timestep todetermine the probability that each walker will transition between its currentstate and the nearby states of the system. A random number then is comparedto that probability to determine whether a transition actually occurs. DiffusionMonte Carlo (DMC) is a random walk technique modeled after fluid dynamics,used to solve equations similar to the diffusion equation,

𝐷𝛻2𝐶 =𝜕

𝜕𝑡𝐶,

where D is a constant and C is the distribution of the diffusing particles in space.For every increment of time, each walker is allowed to move in a randomdirection by a random amount.5

To understand how we use Monte Carlo to simulate quantum mechanicalsystems, we must work with the time-dependent Schrödinger equation (left),which we rewrite in terms of imaginary time, 𝜏 = 𝑖𝑡, and rearrange to obtain

𝐷𝛁2𝛹(𝐫, 𝜏) − 𝑉 𝐫, 𝜏 𝛹 𝐫, 𝜏 =𝜕

𝜕𝜏𝛹 𝐫, 𝜏

where 𝐷 =ℏ2

2𝑚. We now have an equation remarkably similar to the diffusion

equation (left). The other term gives us a first-order rate equation, or “branchingprocess,” which can also be simulated by a Monte Carlo method related torandom walk, in which walkers are distributed among the system’s states andgiven a random chance of deletion or replication based on the potential function,𝑉. Synthesis of these two methods can reasonably be expected to approximatesome form of the wavefunction. We call this method Diffusion Quantum MonteCarlo (DQMC). We now note from basic quantum mechanical calculations that

Ψ 𝐫, 𝜏 =

𝑘=0

𝑐𝑘Ψ𝑘 𝐫 𝑒−𝐸𝑘𝜏

= 𝑒−𝐸0𝜏 𝑐0Ψ0 𝐫 +

𝑘=1

𝑐𝑘Ψ𝑘 𝐫 𝑒− 𝐸𝑘−𝐸0 𝜏

where the Ψ𝑘 are the solutions to the time-independent Schrödinger equation,and 𝐸𝑘 ≥ 𝐸𝑘−1 . As imaginary time approaches infinity, we find that theimaginary exponential terms in the parentheses become incoherent with eachother, averaging to 0, and leaving only lim𝜏→∞Ψ 𝐫, 𝜏 = 𝑐0Ψ0 𝐫 𝑒−𝐸0𝜏.This tells us that the wavefunction we simulate under DQMC will be the groundstate.3,5

The main challenge of implementing the simulation in multiple dimensions isthe fact that, as opposed to 1 dimension where there are 2 directions for psipsto move, we now have a continuum of directions. This was approached byimplementation of polar coordinates for 2 dimensions and spherical polarcoordinates for 3 dimensions. That is, rather than each psip simply traveling adistance which could be positive or negative (i.e. left or right), movement wasdetermined by selection of both a random direction and a random distance.Visualization also presented new challenges. In 2 dimensions, we were able touse a heat map (shown below) to plot the number of psips vs. horizontal andvertical position, where number of psips is indicated via the color of a pixel inthe graph. In 3 dimensions, we took a similar approach, plotting the 3rddimension of space by

Background

Diffusion Monte Carlo Methods in Quantum Molecular CalculationsJules Randolph ([email protected])

Colorado College, Department of Physics

To actually run DQMC simulations, we used a computer program in Python. The basicprogram was built by Zachary Eberhart in the summer of 2016, and most of my workwith this project involved expanding the program’s functionality to enable new types ofsimulations. While programs like this have been built by others 1, we hope to design aprogram which is simple enough to be understood at the level of an undergraduatestudent in a 300- or 400-level physics or chemistry class. Python was chosen as thecoding language for the program because it is a high-level language, meaning manymathematical, imaging, and other functions could be imported rather than programmedfrom scratch. The program functions as follows (figure 1 depicts steps 1-3 and 5):

1. Initialization: A population of “psips” (walkers) is instantiated. Psips have spatialcoordinates of all particles in the system. Initial distribution is dependent on thesimulation, but is usually uniform in space.

2. Movement: The psips are allowed to move in random directions by randomdistances. The direction is chosen with a uniform distribution, and the distance ischosen with a Gaussian distribution

3. Birth/Death: Psips’ potentials are calculated based on a simulation-specificpotential function. They are then given a random chance of replicating or beingdeleted based on how their potential compares to the average.

4. Repetition: Steps 2-3 are repeated until the system converges to a wavefunction.

5. Binning/Counting: Space is divided into even segments, and the numbers ofpsips in each segment are counted so that a distribution can be plotted.

6. Regression:Amathematical function is fit to the raw data from step 5.

The goal of much of applied quantum mechanics is to solve the Schrödinger equation for

molecules, resulting in a wavefunction describing behavior of the wave-particles (electrons and

nuclei) that make up the molecule. Because solving Schrödinger exactly becomes impossible in

even small molecules, the Born-Oppenheimer approximation is usually employed, which is often

very accurate, however in some cases, such as H2+, it leads to noticeable error. One alternative

technique to direct calculation is called Diffusion Quantum Monte Carlo (DQMC). The goal of this

research is to use DQMC to calculate the ground state wavefunction of H2+ without using the

Born-Oppenheimer approximation. Last summer (2016), Zachary Eberhart built a Python

program which ran DQMC simulations for one-dimensional quantum mechanical systems with

external potentials. This summer (2017), working with Zack part of the time, I developed the

program to run simulations in two and three dimensions, and attempted to simulate the non-

Born-Oppenheimer hydrogen atom and the H2+ molecule. The latter attempts are still in progress.

Abstract

Often, we are able to obtain very good solutions which predict experimentaldata with high accuracy under the Born-Oppenheimer approximation. However,in some systems, like very small symmetrical molecules, the motion of theelectrons has a greater effect on that of the nuclei. DQMC has the advantageof eschewing such hard calculations, but still obtaining theoretically exactsolutions as time and population size are allowed to approach infinity. Thisallows wavefunctions to be found numerically without using the Born-Oppenheimer approximation. We ask the following questions:• Can we use a DQMC simulation to accurately find the groundstate

wavefunction of H2+, the smallest molecule, without using the Born

Oppenheimer approximation?• Can such a simulation be used to calculate physical constants of H2

+ moreaccurately (as compared to experimental data) than other ab initio modelswhich assume Born-Oppenheimer?

• Can such a simulation be kept computationally lightweight enough to makeits use viable in the classroom setting?

• Can parallel/cluster computing be used to speed up DQMC simulations tomake them more viable for use with typical undergraduate resources?

Research Questions

Approach The Algorithm

1. 2. 3. 5.

Figure 1: Diagrams depicting a very small 2-dimensional particle-in-a-box DQMC simulation (see § “The Program” for an in-depth explanation)

Results

Now that the python simulation is working in multiple dimensions, the next stepis to move on to real physical systems. I attempted to simulate the hydrogenatom and H2

+; both attempts are still in progress. To simulate these systemswithout using Born-Oppenheimer, every psip must be given spatial coordinatesof every particle in the system, thus hydrogen becomes a 6-dimensionalsystem, and H2

+ becomes 9-dimensional. Other researchers1 have successfullysimulated H2

+ using supercomputers, however we hope that we can keep sucha simulation simple enough to be done in a typical undergraduate setting. Onechallenge of running such simulations is determining what parameters tomeasure to determine that the simulation is working.

Additionally, more work must be done to enable regressions to be taken of thewavefunctions for H2

+. Because all of the systems which have been simulatedthus far have had well-known solutions for their wavefunctions, regressionshave worked by parametrizing all constants in the known wavefunction andfinding the combination with the lowest R2 value. For H2

+, alternativetechniques will have to be employed, such as use of the convolution theorem toexpress the wavefunction as a linear combination of test functions.

We also explored the possibility of using parallel computing with a computercluster to improve computational speed. Although we were able to parallelprocess simulations on a single computer, future work will be needed to makethe program compatible with cluster computing.

Future Work

1. Anderson, J. B. (1975). A random‐walk simulation of the Schrödinger equation: H 3. The Journal of Chemical Physics, 63(4). doi:10.1063/1.431514

2. Born, M., & Oppenheimer, J. R. (1927). Zur Quantentheorie der Molekeln. Annalen der Physik, 389(20), 457-484. doi:10.1002/andp.19273892002

3. Griffiths, D. J. (2017). Introduction to quantum mechanics. Cambridge: Cambridge University Press.

4. Grimm, R. C., & Storer, R. G. (1971). Monte Carlo solution of Schrödinger's Equation. Journal of Computational Physics, 7(1), 134-156. doi:10.1016/0021-9991(71)90054-4

5. Hammond, B. L., Lester, W. A., & Reynolds, P. J. (1994). Monte Carlo methods in ab initio quantum chemistry. World scientific.

6. Pisana, S., Lazzeri, M., Casseraghi, C., Novoselov, K. S., Geim, A. K., Ferrari, A. C., & Mauri, F. (2007). Breakdown of the adiabatic Born–Oppenheimer approximation in graphene. Nature Materials, 6, 198-201. doi:10.1038/nmat1846

I would also like to extend my thanks to Professor Sally Meyer, Professor StephanieDicenzo, the Colorado College Department of Chemistry and Biochemistry, theColorado College Department of Physics, the SCoRe Program, and the Dille Fund.

References

Num

ber o

f Psip

s

plotting cross sectionsof space at incrementsalong the z-axis andshowing the cross sec-tions as an animation.Using these techniques,we were able tosuccessfully generateground state wave-functions for particles ina 2- and 3-dimensionalinfinite square well,harmonic oscillator, andseveral other potentials.