Monte Carlo Methods H. Rieger, Saarland University, Saarbrücken, Germany Summerschool on Computational Statistical Physics, 4.-11.8.2010 NCCU Taipei, Taiwan.

Slides:



Advertisements
Similar presentations
Review Of Statistical Mechanics
Advertisements

Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics.
Monte Carlo Methods and Statistical Physics
Ch 11. Sampling Models Pattern Recognition and Machine Learning, C. M. Bishop, Summarized by I.-H. Lee Biointelligence Laboratory, Seoul National.
Modern Monte Carlo Methods: (2) Histogram Reweighting (3) Transition Matrix Monte Carlo Jian-Sheng Wang National University of Singapore.
Lecture 3: Markov processes, master equation
CS774. Markov Random Field : Theory and Application Lecture 16 Kyomin Jung KAIST Nov
1 CE 530 Molecular Simulation Lecture 8 Markov Processes David A. Kofke Department of Chemical Engineering SUNY Buffalo
Monte Carlo Simulation Methods - ideal gas. Calculating properties by integration.
Ising Model Dr. Ernst Ising May 10, 1900 – May 11, 1998.
MAE 552 – Heuristic Optimization Lecture 6 February 6, 2002.
1 Cluster Monte Carlo Algorithms & softening of first-order transition by disorder TIAN Liang.
Simulated Annealing Van Laarhoven, Aarts Version 1, October 2000.
Monte Carlo Simulation of Ising Model and Phase Transition Studies
1 CE 530 Molecular Simulation Lecture 2 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Introduction to Monte Carlo Methods D.J.C. Mackay.
Monte Carlo Simulation of Ising Model and Phase Transition Studies By Gelman Evgenii.
Advanced methods of molecular dynamics Monte Carlo methods
Relating computational and physical complexity Computational complexity: How the number of computational steps needed to solve a problem scales with problem.
Classical and Quantum Monte Carlo Methods Or: Why we know as little as we do about interacting fermions Erez Berg Student/Postdoc Journal Club, Oct
Introduction to (Statistical) Thermodynamics
Monte-Carlo simulations of the structure of complex liquids with various interaction potentials Alja ž Godec Advisers: prof. dr. Janko Jamnik and doc.
F.F. Assaad. MPI-Stuttgart. Universität-Stuttgart Numerical approaches to the correlated electron problem: Quantum Monte Carlo.  The Monte.
Optimization Methods H. Rieger, Saarland University, Saarbrücken, Germany Summerschool on Computational Statistical Physics, NCCU Taipei,
Physics Fluctuomatics (Tohoku University) 1 Physical Fluctuomatics 7th~10th Belief propagation Appendix Kazuyuki Tanaka Graduate School of Information.
Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Lecture 11: Ising model Outline: equilibrium theory d = 1
TUTORIAL no. 2 Monte Carlo simulations: Lennard Jones gas G. Lattanzi Università degli studi di Bari “Aldo Moro” Trieste, July 10 th, 2012 CECAM school.
F.F. Assaad. MPI-Stuttgart. Universität-Stuttgart Numerical approaches to the correlated electron problem: Quantum Monte Carlo.  The Monte.
Outline Review of extended ensemble methods (multi-canonical, Wang-Landau, flat-histogram, simulated tempering) Replica MC Connection to parallel tempering.
Machine Learning Lecture 23: Statistical Estimation with Sampling Iain Murray’s MLSS lecture on videolectures.net:
1 Worm Algorithms Jian-Sheng Wang National University of Singapore.
Basic Monte Carlo (chapter 3) Algorithm Detailed Balance Other points.
Basics of molecular dynamics. Equations of motion for MD simulations The classical MD simulations boil down to numerically integrating Newton’s equations.
Monte Carlo Methods in Statistical Mechanics Aziz Abdellahi CEDER group Materials Basics Lecture : 08/18/
Monte Carlo Methods Versatile methods for analyzing the behavior of some activity, plan or process that involves uncertainty.
Simulated Annealing.
The Ising Model Mathematical Biology Lecture 5 James A. Glazier (Partially Based on Koonin and Meredith, Computational Physics, Chapter 8)
Two Temperature Non-equilibrium Ising Model in 1D Nick Borchers.
8. Selected Applications. Applications of Monte Carlo Method Structural and thermodynamic properties of matter [gas, liquid, solid, polymers, (bio)-macro-
1 Cluster Monte Carlo Algorithms: Jian-Sheng Wang National University of Singapore.
Molecular Modelling - Lecture 2 Techniques for Conformational Sampling Uses CHARMM force field Written in C++
ChE 452 Lecture 17 Review Of Statistical Mechanics 1.
13. Extended Ensemble Methods. Slow Dynamics at First- Order Phase Transition At first-order phase transition, the longest time scale is controlled by.
Monte Carlo method: Basic ideas. deterministic vs. stochastic In deterministic models, the output of the model is fully determined by the parameter values.
An Introduction to Monte Carlo Methods in Statistical Physics Kristen A. Fichthorn The Pennsylvania State University University Park, PA
General considerations Monte Carlo methods (I). Averages X = (x 1, x 2, …, x N ) – vector of variables P – probability density function.
Monte Carlo in different ensembles Chapter 5
1/18/2016Atomic Scale Simulation1 Definition of Simulation What is a simulation? –It has an internal state “S” In classical mechanics, the state = positions.
Graduate School of Information Sciences, Tohoku University
Javier Junquera Importance sampling Monte Carlo. Cambridge University Press, Cambridge, 2002 ISBN Bibliography.
1 Molecular Simulations Macroscopic EOS (vdW, PR) Little molecular detail Empirical parameters (  ) Seeking understanding of complex systems Surfactants.
Percolation Percolation is a purely geometric problem which exhibits a phase transition consider a 2 dimensional lattice where the sites are occupied with.
Basic Monte Carlo (chapter 3) Algorithm Detailed Balance Other points non-Boltzmann sampling.
Landau free energy density For large N we expect thermodynamic limit t=(T-T c )/T c (t=0 corresponds to the critical temperature Can think of this as averaging.
Monte Carlo Simulation of Canonical Distribution The idea is to generate states i,j,… by a stochastic process such that the probability  (i) of state.
6/11/2016Atomic Scale Simulation1 Definition of Simulation What is a simulation? –It has an internal state “S” In classical mechanics, the state = positions.
Computational Physics (Lecture 11) PHY4061. Variation quantum Monte Carlo the approximate solution of the Hamiltonian Time Independent many-body Schrodinger’s.
Computational Physics (Lecture 10) PHY4370. Simulation Details To simulate Ising models First step is to choose a lattice. For example, we can us SC,
Fluctuation relations in Ising models G.G. & Antonio Piscitelli (Bari) Federico Corberi (Salerno) Alessandro Pelizzola (Torino) TexPoint fonts used in.
Monte Carlo Simulation of the Ising Model Consider a system of N classical spins which can be either up or down. The total.
Systematic errors of MC simulations Equilibrium error averages taken before the system has reached equilibrium  Monitor the variables you are interested.
The Monte Carlo Method/ Markov Chains/ Metropolitan Algorithm from sec in “Adaptive Cooperative Systems” -summarized by Jinsan Yang.
Computational Physics (Lecture 10)
Phase diagram of a mixed spin-1 and spin-3/2 Ising ferrimagnet
DIAGRAMMATIC MONTE CARLO:
Common Types of Simulations
Biointelligence Laboratory, Seoul National University
Optimization Methods H. Rieger, Saarland University, Saarbrücken, Germany Summerschool on Computational Statistical Physics, NCCU Taipei,
Presentation transcript:

Monte Carlo Methods H. Rieger, Saarland University, Saarbrücken, Germany Summerschool on Computational Statistical Physics, NCCU Taipei, Taiwan

Monte Carlo Methods = Stochastic evaluation of physical quantities using random numbers Example: Pebble game on the beach of Monaco = computation of  using random events Kid‘s game: Adult‘s game: „Direct sampling“„Markov chain sampling“ [after W. Krauth, Statistical Mechanics, Algorithms and Computation, Oxford Univ. Press]

Direct sampling easy „hard spheres in 2d“ – hard! No direct sampling algorithm for hard spheres (NOT random sequantial adsorption!)

What to do, when a stone from the lady lands here? 1)Simply move on 2)Climb over the fence, and continue until, by accident, she will reenter the heliport 3) ….? Move a pebble in a 3x3 lattice probabilistically such that each site a is visited with the same probability p(a) = 1/9 w(a  b) = ¼ b  a w(a  a) = 0w(a  a) = 1/4w(a  a) = 1/2 Markov chain sampling

Detailled Balance ab c Together with This yields: The following condition for p(a) must hold: This condition is fulfilled when etc. This is called „detailled balance condition“ – and leads here to w(a  b,c)=1/4, w(a  a)=1/2

 More or less large piles close to the boundary due to „rejections“ Adult‘s pebbel game – solution: if a stone lands outside the heliport, stay there put a stone on top of the present stone and continue, i.e. reject move outside the square! Rejections

Master equation Markov chain described by „Master equation“ (t = time step) The time independent probability distribution p(a) is a solution of this equation, if the transition probabilities w(a  b) etc. fulfill For a given p(a) one can, for instance, choose Which is the „Metropolis“ rule detailed balance:

Monte Carlo for Thermodynamic Equilibrium a are configurations of a many particle system, E(a) the energy of configuration a. Thermodynamic equilibrium at temperature T is then described by the Boltzman distribution is the normalization, called partition function Thus the Metropolis rule for setting up a Markov chain leading to The Boltzmann distribution is  = 1/k B T inverse temperature

Hard spheres a = (r 1,r 2, …, r N ) - configurations = coordinates of all N spheres in d dimension All spheres have radius , they are not allowed to overlap, otherwise all configurations have the same energy (no interactions):  H(a) =  if there is a pair (i,j) with |r i -r j |<2  H(a) = 0 otherwise Define w(a  b) in the following way: In configuration a choose randomly a particle i and displace it by a random vector  - this constitutes configuration b. w(a  b) = 1 if b is allowed (no overlaps), w(a  b) = 0 (reject) if displaced particle overlaps with some other particle i.e.:

Hard spheres (2) Tagged particle Iteration:t t

Soft spheres / interacting particles a = {(r 1,p 1 ),(r 2,p 2 ),…,(r N,p N )} - configurations = coordinates and momenta of all N particles in d dimension Partition function Example: LJ (Lennard-Jones) Energy: L = box size Peforming the momentum integral (Gaussian)  Left with the configuration integral I

MC simulation for soft spheres: Metropolis if otherwise Choose randomly particle i, its position is r i Define new position by r i ‘=r i + ,  a random displacement vector,  [- ,  ] 3 All othe rparticle remain fixed. Acceptance probability for the new postion: Measurements: Energy, specific heat, spatial correlation functions, structure function Equlibration! Note: Gives the same results as molecular dynamics Repeat many times

Discrete systems: Ising spins System of N interacting Ising spins S i  {+1,-1}, placed on the nodes of a d-dimensional lattice a = (S 1,S 2,…,S N ): spin configurations Energy: J ij = coupling strengths, e.g. J ij = J > 0 for all (i,j)  ferromagnet h = external field strength For instance 1d: with periodic poundary conditions (i,j)

Quantities of interest / Measurements Magnetization Susceptibility Average energy Specific heat How to compute: where a t are the configurations generated by the Markov chain (the simulation) at time step t.

Ising spins: Metropolis update for Procedure Ising Metropolis: Initialize S = (S 1,…,S N ) labelGenerate new configuration S‘ Calculate  H=  H(S,S‘) if  H  0 accept S‘ (i.e. S‘  S) else generate random numer x  [0,1] if x<exp(-  H) accept S‘ (i.e. S‘  S) compute O(S) goto label  H(S,S‘) = H(S‘)-H(S)

Single spin flip Metropolis for 2d Ising Procedure single spin flip Input L, T, N=L*L Define arrays: S[i], i=1,…,N, h[i], i=1,…,N, etc. Initialize S[i], nxm[i], nxp[i],…., h[i] step = 0 while (step<max_step) choose random site i calculate dE = 2*h[i]*S[i] if ( dE <= 0 ) S[i]=-S[i]; update h[nxm[i]], h[nxp[i]],… else p = exp(-dE/T) x = rand() if ( x<p) S[i]=-S[i]; update h[nxm[i]], h[nxp[i]],… compute M(S), E(S), … accumulate M, E, … step++ Output m, e, …

Implementation issues Periodic boundary conditionsNeighbor tables if e.g.:

Implementation issues (2) With single spin flip E(S) and E(S‘) differ only by 4 terms in 2d (6 terms in 3d): Flip spin i means S i ‘ = -S i, all other spins fixed, i.e. S j ‘=S j for all j  i   Tabulate exponentials exp(-4  ), exp(-8  ) to avoid transcendental functions in the innermost loop Use array h[i] for local fields, if move (flip is rejected nothing to be done, if flip accepted update S i and h nxm[i], h nxp[i], etc.

Study of phase transitions with MC Ising model in d>1 has a 2nd order phase transition at h=0, T=T c Magnetization (order parameter): Phase diagram T<T c m h h0h0 h=0 1st order phase transition as a function of h! 2nd order phase transition as a function of T at h=0!

Critical behavior Magnetization: Susceptibility: Specific heat: Correlation function: Correlation length: Scaling relations: Singularities at T c in the thermodynamic limit (N  ):

Finite size behavior w. Periodic b.c.

Finite Size Scaling FSS forms: 4th order cumulant: Dimensionless (no L-dependent prefactor) - Good for the localization of the critical point

Critical exponents of the d-dim. Ising model

Slowing down at the critical point Quality of the MC estimats of therodynamic expectation values depends on the number of uncorrelated configurations – Need an estimate for the correlation time  of the Markov process! Autocorrelation- function Schematically:  for T  T c Configurations should decorrelate faster than with single spin-flip! Solution: Cluster Moves

Cluster Algorithms Construction process of the clusters in the Wolff algorith: Start from an initial + site, include other + sites with prbability p (left). The whole cluster (gray) is then flipped p(b) Here c 1 =10, c 2 =14 Detailled balance condition: p(a) A(a  b) w(a  b) = p(b) A(b  a) w(b  a) p(a)  „A priori“ or construction probability:

Wolff algorithm (cont.) Once the cluster is constructed with given p, one gets c 1 and c 2, with which one can compute the acceptance probability w(a  b) But with p = 1-e -2  the acceptance probability w(a  b) becomes 1! Thus with p=1-e -2  the constructed cluster is always flipped! Remarkable speed up, no critical slowing down at the critical point!

Wolff cluster flipping for Ising (1)Randomly choose a site i (2)Draw bonds to all nearest neighbors j with probability (3)If bonds have been drawn to any site j draw bonds to all nearest neighbors k of j with probability (4)Repeat step (3) until no more bonds are created (5)Flip all spins in the cluster (6)Got to (1) (Note for S=S‘, and = 0 for S  S‘, such that p=0 for S j  S k )

Swendsen-Wang algorithm Similar to Wolff, but (1)Draw bonds between ALL nearest neighbors with probability (2)Identify connected clusters (3)Flip each individual cluster with probability 1/2