daniel sánchez portal ricardo díez muiño centro de física de materiales centro mixto...
DESCRIPTION
CFM. centro de física de materiales. Daniel Sánchez Portal Ricardo Díez Muiño Centro de Física de Materiales Centro Mixto CSIC-UPV/EHU. Electronic structure calculations : Methodology and applications to nanostructures. Quantum Monte Carlo methods in - PowerPoint PPT PresentationTRANSCRIPT
Daniel Sánchez PortalRicardo Díez Muiño
Centro de Física de MaterialesCentro Mixto CSIC-UPV/EHU
centro de física de materialesCFM
Quantum Monte Carlo methods in electronic structure calculations
Electronic structure calculations: Methodology and applications to nanostructures
Lectures on Quantum Monte Carlo methods:
Tuesday March 10th: 9.45 --> 12.00theoretical background
Wednesday March 11th : ??1st exercise
Friday March 13th : 9.45 --> 12.302nd exercise
Electronic structure calculations: Methodology and applications to nanostructures
Outline
• Brief introduction
• Monte Carlo methods
• Quantum Monte Carlo
• Examples
Electronic structure calculations: Methodology and applications to nanostructures
- Variational Monte Carlo- Diffusion Monte Carlo- Other methods
Introduction• Fundamental object in quantum mechanics: wave function
• We want to find special wave functions such that
where
• This is a fundamentally many-body equation!
• A large variety of methods have been proposed and are being used to solve this problem.
(r1,r2,...,rN )
1 2 1 2( , ,..., ) ( , ,..., )n N n NH r r r E r r r
21 12
Ii
i iI i jiI ij
ZHr r
Electronic structure calculations: Methodology and applications to nanostructures
(r1,r2,...,rN ) 1 2 1 2( , ,..., ) ( , ,..., )n N n NH r r r E r r r
21 12
Ii
i iI i jiI ij
ZHr r
Quantum Monte Carlo (QMC)
The solution of the Schrödinger equation with a many-body wave function requires the evaluation of multi-dimensional integrals. For instance:
In general terms, Quantum Monte Carlo (QMC) refers to the use of Monte Carlo methodology (i.e., random samplings) to numerically solve these integrals and/or solve differential equations intrinsic to quantum mechanics.
Electronic structure calculations: Methodology and applications to nanostructures
Classical Monte Carlo
The central idea of classical Monte Carlo methods is to represent the solution of a mathematical (or physical) problem by a parameter of a true or hypothetical distribution and to estimate the value of this parameter by sampling from this distribution.
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo methods: General definition
•Monte Carlo methods can be broadly described as statistical simulation methods, where statistical simulation means here any method that utilizes sequences of random numbers to perform the simulation.
•Monte Carlo simulations are statistical and non-deterministic: each simulation will give a different result, but the results will be related via some statistical error.
•In general, a similar pattern is followed in all these methods based on random events: - A domain of possible inputs is defined- Inputs are randomly generated from the domain. - A deterministic calculation is performed using the inputs.
- The individual calculations are aggregated into the final result.
•Monte Carlo methods are naturally used to simulate random, or stochastic, processes. However, many Monte Carlo applications have no apparent stochastic content, such as the evaluation of a definite integral or the inversion of a system of linear equations.
Electronic structure calculations: Methodology and applications to nanostructures
A textbook example: The calculation of number p
Step I.- Draw a square on the ground, then inscribe a circle within it.
Step II.- Uniformly scatter some objects of uniform size throughout the square. For example, grains of rice or sand.
Step III.- Count the number of objects in the circle, multiply by four, and divide by the total number of objects in the square.
Step IV.- The proportion of objects within the circle vs objects within the square will approximate p/4, which is the ratio of the circle's area to the square's area, thus giving an approximation to p..
the approximation of p will become more accurate both as the grains are dropped more uniformly and as more are dropped.
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo methods: Brief Historical Note
Although statistical simulation methods have been used for centuries, the name ”Monte Carlo” was coined by Nicholas Metropolis (inspired by Stanislaw Ulam's interest in poker) during the Manhattan Project of World War II, in Los Alamos, because of the similarity of statistical simulation to games of chance.
The use of randomness and the repetitive nature of the process are analogous to the activities conducted at a casino.
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo methods: Brief Historical Note
First Monte Carlo article in 1953: N. Metropolis, A.W. Rosenbluth, M.N. Rosenbluth, A.H. Teller and E.Teller,
J. Chem. Phys. 21, 1087 (1953)
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo methods: Brief Historical Note
First Monte Carlo article in 1953: N. Metropolis, A.W. Rosenbluth, M.N. Rosenbluth, A.H. Teller and E.Teller,
J. Chem. Phys. 21, 1087 (1953)
Electronic structure calculations: Methodology and applications to nanostructures
A simple application: Monte Carlo integration
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo integration: traditional algorithm
Suppose we would like to perform the following integral:
The plain Monte Carlo algorithm samples points uniformly from the integration region to estimate the integral and its error. If the sample has size N and the points in the sample are denoted by x1, …, xN. , then the estimate for the integral is given by
and the variance by:
Monte Carlo integration gives only a probabilistic error bound, e.g. we can only give a probability that the Monte Carlo estimate lies within a certain range of the true value.
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo integration: variance reducing techniques
In the traditional Monte Carlo algorithm, the sample x1, …, xN. , used to evaluate the integral is randomly chosen over the full available domain, with equal probability for each value. But there are several techniques to improve the result by modifying this choice:
Stratified sampling: Divide the full integration space into subspaces, perform a Monte Carlo integration in each subspace, and add up the partial results in the end. If the subspaces and the number of points in each subspace are chosen carefully, this can lead to a dramatic reduction in the variance compared with crude Monte Carlo, but it can also lead to a larger variance if the choice is not appropriate.
Control variates: Mathematically, this technique is based on the linearity of the integral :
If the integral of g is known, the only uncertainty comes from the integral of (f − g), which will have smaller variance than f if g has been chosen carefully.
Importance sampling
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo integration: importance sampling
Simple schemes for Monte Carlo integration can suffer from low efficiency. Many functions of interest have significant weight in only a few regions.
For example, most of the contributions to an integral of a simple Gaussian are located near the central peak. In a simple Monte Carlo integration scheme, points are sampled uniformly, wasting considerable effort sampling the tails of the Gaussian.
Techniques for overcoming this problem act to increase the density of points in regions of interest and hence improve the overall efficiency. These techniques are called importance sampling.
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo integration: importance samplingMathematically, importance sampling corresponds to a change of integration variables :
with
andIf
then we can associate p(x) to a probability distribution function. The integral can be evaluated as:
But with the values of xi chosen accordingly to the probability distribution p(x). One has to be careful for values of p(xi)=0!!
In practice, this is a way to choose the xi values in which we sample to reduce the variance. The idea behind importance sampling is that certain values of the input random variables in a simulation have more impact on the parameter being estimated than others.
Electronic structure calculations: Methodology and applications to nanostructures
Monte Carlo integration: importance sampling
We try p(x) to be as similar as possible to f(x). The best case would obviously be p(x)=a*f(x) (a being a constant, a=1/E to be normalized).
Then the sum above would be a normalized sum of N-terms of constant value ‘E’ and the integral would be exact.
But we do not know E (it is our goal!) so we cannot fix p(x) in this way!
In practice, one uses probability distribution functions p(x) as close in shape to f(x) as possible.
Electronic structure calculations: Methodology and applications to nanostructures
Importance sampling in Variational Quantum Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
Importance sampling in Variational Quantum Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
Importance sampling: Metropolis algorithmGenerating samples according to a specified probability distribution
The Metropolis algorithm generates a random walk of points distributed according to a required probability distribution p(r1, r2,…,rN).
1.- From an initial position (x1,x2,…,xN) in phase or configuration space, a proposed move to (y1,y2,…,yN) is generated.
2.- The move is either accepted or rejected according to the Metropolis algorithm .
Electronic structure calculations: Methodology and applications to nanostructures
Importance sampling: Metropolis algorithm
The Metropolis algorithm was based on the notion of detailed balance that describes equilibrium for systems whose congurations have probability proportional to the Boltzmann factor. It can be interpreted as sampling the space of possible configurations in a thermal way.
Consider two configurations A and B, each of which occurs with probability proportionalto the Boltzmann factor:
1.- Starting from a configuration A, with known energy EA, make a change in the configuration to obtain a new (nearby) configuration B.2.- Compute EB (typically as a small change from EA.3.- If EB < EA, assume the new configuration, since it has lower energy (a desirablething, according to the Boltzmann factor).4.- If EB > EA, accept the new (higher energy) configuration with probability p =e-(EB-EA)/T .
This means that when the temperature is high, we don't mind taking steps in the “wrong" direction, but as the temperature is lowered, we are forced to settle into the lowest configuration we can find in our neighborhood.
Importance sampling: Metropolis algorithm
If we follow these rules, then we will sample points in the space of all possible configurations with probability proportional to the Boltzmann factor, consistent with the theory of equilibrium statistical mechanics.
We can compute average properties by summing them along the path we follow through possible configurations.
Since one can start from any arbitrary state, it takes a finite number of steps to reach the desired equilibrium distribution.
Importance sampling: Metropolis algorithm
• The equilibrium distribution p(x) is generated if the detailed balancecondition is fulfilled:
• Detailed balance relates the transition probability P to the probabilitydistribution p. Detailed balance is fulfilled for
• In words: If p(y) > p(x), one moves from x to y. Otherwise, the moveis accepted only with probability p(y)/p(x).
• The algorithm generates the desired probability function in the limitof a large number of moves.
Importance sampling: Metropolis algorithmGenerating samples according to a specified probability distribution
By taking a sufficient number of trial steps all of phase space is explored and the Metropolis algorithm ensures that the points are distributed according to the required probability distribution.
For the Metropolis algorithm to be valid, it is essential that the random walk is ergodic. That is: any point in configuration space may be reached from any other point .
In some applications of the Metropolis algorithm, parts of configuration space may be difficult to reach. Long simulations or a modification of the algorithm are then necessary.
Electronic structure calculations: Methodology and applications to nanostructures
Direct sampling versus Markov-chain sampling
Electronic structure calculations: Methodology and applications to nanostructures
New candidates in the Metropolis algorithm are picked out at random.
A Markov chain is a process with a finite number of steps, in which the probability of being in a particular state at step n + 1 depends only on the state occupied at step n (loss of memory).
Markov chains and random walks
Electronic structure calculations: Methodology and applications to nanostructures
A Markov chain, named after Andrey Markov, is a stochastic (non-deterministic) process in which, given the present state, future states are independent of the past states (Markov property). In other words, the description of the present state fully captures all the information that could influence the future evolution of the process. Future states will be reached through a probabilistic process instead of a deterministic one.
The Metropolis algorithm generates a Markov chain, which satisfies 2 conditions: 1. The outcome of each trial depends only on the preceding trial, and not on any prior trials 2. Each trial belongs to a finite set of possible states.
An example of a Markov chain is a simple random walk where the state space is a set of vertices of a graph and the transition steps involve moving to any of the neighbours of the current vertex with equal probability (regardless of the history of the walk).
Summary of Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
•Monte Carlo integration offers an efficient tool for numerical evaluation of integrals in high dimensions.
•Importance sampling algorithms (Metropolis) improve the efficiency and accuracy of the calculation.
•Numerical error scales as 1/(N)1/2
Quantum Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
Calculating the electronic properties of matter using random numbers
Quantum Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
• Fundamental object in quantum mechanics: wave function
• We want to find special wave functions such that
where
• This is a fundamentally many-body equation!
(r1,r2,...,rN )
1 2 1 2( , ,..., ) ( , ,..., )n N n NH r r r E r r r
21 12
Ii
i iI i jiI ij
ZHr r
Quantum Monte Carlo looks for a direct representation of many-body effects in the wavefunction at the cost of statistical uncertainty.
Quantum Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
1st method.- Variational Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
Ertekin, Grossman, Wagner, Neaton (UC Berkeley and LBNL)http://www.nanohub.org
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
• General form of wave function
– Slater determinant (Hartree-Fock)
– Two-body Jastrow
– Three-body Jastrow
T (R)Det[ i(rj )]exp(U)
U 0
U ckeiak (riI )
k
iI ck
eebk (rij )k
ij
U two body cklmeei [ak (riI )
klm
ijI al (rjI ) ak (rjI )al (riI )]bk (rij )
Jastrow factor
Electronic structure calculations: Methodology and applications to nanostructures
• General form of wave function
– Slater determinant (Hartree-Fock)
– Two-body Jastrow
– Three-body Jastrow
T (R)Det[ i(rj )]exp(U)
U 0
U ckeiak (riI )
k
iI ck
eebk (rij )k
ij
U two body cklmeei [ak (riI )
klm
ijI al (rjI ) ak (rjI )al (riI )]bk (rij )
Jastrow factor
c coefficients to optimize
Electronic structure calculations: Methodology and applications to nanostructures
More on the trial wave functions
Slater determinants:
Jastrow factor:
It is important that the trial wavefunction satisfies as many known properties of the exact wavefunction as possible. A determinantal wavefunction is correctly anti-symmetric with respect to the exchange of any two electrons.
Electronic structure calculations: Methodology and applications to nanostructures
Jastrow factors
The functions u(ri) are chosen to miminize the energy of the system under consideration, by choosing to increase the probability of particles being at a distance that minimizes their interaction energy.
Well chosen correlation functions include correlation effects more efficiently than CI-based approaches.
An additional local set of constraints which may be readily imposed are for electron-electron and electron-nucleus coalescence. These constraints are the cusp conditions, and are a constraint on the derivatives of the wavefunction:
z=-Z for electron-nucleus-
z=1/2 for electron-electron (spin parallel)
z=1/4 for electron-electron (spin antiparallel)
Electronic structure calculations: Methodology and applications to nanostructures
• Rewrite expectation value
2
2
( , ) ( , )( )( , )( , )
R P H R PE P dRR PR P dR
Probability Distribution Function (PDF)
• Generate random walkers with probability equal to the above PDF and average (Metropolis method)
• Either minimize the variance of the local energy with respect to the parameters or minimize the energy itself.
Fluctuation minimization
Example: Harmonic OscillatorEigenfunction and Non-eigenfunction
• One way to approximate the eigenfunction is to minimize deviation from a constant
• Eigenvalue problem:
( )( )n
nn
H x Ex
( )( )( )
H xE xx
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
The VMC algorithm consists of two distinct phases:
- In the first a walker consisting of an initially random set of electron positions is propagated according to the Metropolis algorithm, in order to equilibrate it and begin sampling .
- In the second phase, the walker continues to be moved, but energies and other observables are also accumulated for later averaging and statistical analysis.
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
Flow chart for variational Monte Carlo procedure
Electronic structure calculations: Methodology and applications to nanostructures
The major limitation of the variational QMC method appears obvious: What happens when the assumed
trial wavefunction isn't accurate enough?
Powerful, simple, and full of physical insight
No sign problem (Pauli principle: Antisymmetric wave functions)
Large class of possible trial wave functions
Methods favors simple over complex states
Trial wave function insensitive to long-range order
Result cannot be better than trial wave function allows
Variational MC: Strengths and Weaknesses
Quantum Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
2nd method.- Diffusion Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
What happens when the assumed trial wavefunction isn't accurate enough?
Main weakness of variational MC:
Main idea of diffusion MC:
Avoid the dependence on the trial wave function.
For this purpose: Project out the ground state from a trial wave function
using a function that depends on the Hamitonian.
It is based on the imaginary-time Schrödinger equation
Electronic structure calculations: Methodology and applications to nanostructures
The DMC method is based on rewriting the Schrödinger equation in imaginary time, t=it. The imaginary time Schrödinger equation is:
The wave function yis the initial state in our simulation and can be expanded in terms of the eigenstates of the Hamiltonian :
Diffusion Monte Carlo DMC
where
Electronic structure calculations: Methodology and applications to nanostructures
A formal time-dependent solution of the evolution is:
Any initial state y, that is not orthogonal to the ground state f0, will evolve to the ground state in the long time limit!!!
Diffusion Monte Carlo DMC
Electronic structure calculations: Methodology and applications to nanostructures
A formal time-dependent solution of the evolution is:
Any initial state y, that is not orthogonal to the ground state f0, will evolve to the ground state in the long time limit!!!
Diffusion Monte Carlo DMC
The DMC method is the realization of the above derivation in position space:
Electronic structure calculations: Methodology and applications to nanostructures
So far, Monte Carlo is out of the picture. We have to solve the following equation:
Electronic structure calculations: Methodology and applications to nanostructures
So far, Monte Carlo is out of the picture. We have to solve the following equation:
Diffusion equation + a ‘source’
This equation is a diffusion equation where the wave function y(R,t) may be interpreted as the density of diffusing particles (or ”random walkers”), and the term
(V(R)-ET) is a rate term describing a potential-dependent increase or decrease in the particle density.
The imaginary-time Schrödinger equation describes walkers diffusingin 3N-dimensional space while dying out or multiplying at a rate determined
by the value of V (R).
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures
A one-dimensional example: A single particle confined in a simple potential well V(x)
Foulkes et al., RMP 73, 33 (2001)
Electronic structure calculations: Methodology and applications to nanostructures
Sign problem in DMC: Fixed-node approximation
The diffusion QMC method finds the overall ground state of the system. We have used nowhere that electrons are fermions, and that the many-electron wave function must be antisymmetric. In other words, without further constraints, the algorithm would lead to the ground state for bosons (a totally symmetric wave function).
A practical solution to avoid this is to take a trial function that satisfies the Pauli exclusion principle as a starting guess, and design our rules so that we don’t break it. It turns out that one can do this by just not allowing the walkers to cross a zero (we always have either “positive” or “negative” walkers).
Fixed-node approximation: we guess the shapes of the regions of configuration space within which the wave function is positive and negative and solve the imaginary-time Schrodinger equation to and the lowest energy state consistent with that guess.�
Van Bemmel et al., PRL 72, 2442 (1994)
Electronic structure calculations: Methodology and applications to nanostructures
Fixed-node DMC and excited states
Foulkes et al., RMP 73, 33 (2001)
Ground state for a particle in a box 1st excited state for a particle in a box
Quantum Monte Carlo
Electronic structure calculations: Methodology and applications to nanostructures
Other methods
Electronic structure calculations: Methodology and applications to nanostructures
•Path-integral Quantum Monte Carlo
•Green's function Quantum Monte Carlo (more general than DMC)
•Reptation Quantum Monte Carlo
•Auxiliary field Quantum Monte Carlo
Other Quantum Monte Carlo methods
Electronic structure calculations: Methodology and applications to nanostructures
QMC calculations: Examples
Electronic structure calculations: Methodology and applications to nanostructures
QMC calculations: Examples
Electronic structure calculations: Methodology and applications to nanostructures
1.- Cohesive energy of solids
The cohesive energy of a solid is the difference between the energy of a dispersed gas of the constituent atoms or molecules and the energy of the solid at zerotemperature.
An accurate calculation requires a correct description of both gas-phase and solid-state atoms.
Electronic structure calculations: Methodology and applications to nanostructures
2.- Paramagnetic / Ferromagnetic electron gas
Wigner was the first to predict that a system of electrons in a uniform background would crystallize at low densities. Localizing electrons around lattice sites increases their kinetic energy, but at sufficiently low densities the reduction in their interaction energy is always greater.
Electronic structure calculations: Methodology and applications to nanostructures
3.- Exchange and correlation energy in solids
QMC includes exchange and correlation (XC) much more accurately than standard DFT calculations (although computationally is much more expensive as well). But QMC can serve as a guide to estimate how the XC contributions can be improved.
The LDA exchange energy density is not negative enough on average, while the LDA correlation energy density is too negative. When integrated over the unit cell the two errors largely cancel, and thus the total LDA exchange-correlation energy is pretty accurate;
Electronic structure calculations: Methodology and applications to nanostructures
4.- Exchange and correlation energy functionals
There is a strong similarity between the LDA errors and the Laplacian of the
electron density. This suggests that gradient-corrected exchange-
correlation energy functionals should includea Laplacian dependence
as well as the more familiar gradient terms.
Electronic structure calculations: Methodology and applications to nanostructures
5.- Clusters
There are a few works on applying QMC methods to the study of of Si and C clusters of intermediate sizes up to 20 atoms. QMC has been succesful in providing the lowest energy isomer.
Electronic structure calculations: Methodology and applications to nanostructures
Summarizing Monte Carlo…
Electronic structure calculations: Methodology and applications to nanostructures
Summarizing Monte Carlo…
more accurate
Electronic structure calculations: Methodology and applications to nanostructures
Summarizing Monte Carlo…
more accurate computationally more expensive
Electronic structure calculations: Methodology and applications to nanostructures
To know more: http://www.fz-juelich.de/video/wsqs/all/content.html
Quantum Monte Carlo methods in electronic structure calculations
Electronic structure calculations: Methodology and applications to nanostructures
Electronic structure calculations: Methodology and applications to nanostructures