Systematic errors of MC simulations Equilibrium error averages taken before the system has reached equilibrium  Monitor the variables you are interested.

Slides:



Advertisements
Similar presentations
PRAGMA – 9 V.S.S.Sastry School of Physics University of Hyderabad 22 nd October, 2005.
Advertisements

Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling.
Introduction to Markov Chain Monte Carlo Fall 2012 By Yaohang Li, Ph.D.
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
Optimization methods Morten Nielsen Department of Systems biology, DTU.
Lecture 14: Advanced Conformational Sampling
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.
MAE 552 – Heuristic Optimization Lecture 6 February 6, 2002.
Network Goodness and its Relation to Probability PDP Class Winter, 2010 January 13, 2010.
CE 400 Honors Seminar Molecular Simulation Prof. Kofke Department of Chemical Engineering University at Buffalo, State University of New York Class 4.
Monte Carlo Methods in Partial Differential Equations.
Introduction to Simulated Annealing 22c:145 Simulated Annealing  Motivated by the physical annealing process  Material is heated and slowly cooled.
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Advanced methods of molecular dynamics Monte Carlo methods
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 11 Some materials adapted from Prof. Keith E. Gubbins:
Monte Carlo Methods: Basics
Introduction to (Statistical) Thermodynamics
Free energies and phase transitions. Condition for phase coexistence in a one-component system:
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.
Monte Carlo Simulation: Simulate an Isothermal-Isobaric Ensemble Timothy Tie Dong Bing School of Physics, Computer Lab 25 th Jan 2013.
1 CE 530 Molecular Simulation Lecture 17 Beyond Atoms: Simulating Molecules David A. Kofke Department of Chemical Engineering SUNY Buffalo
Basic Monte Carlo (chapter 3) Algorithm Detailed Balance Other points.
Microscopic states (microstates) or microscopic configurations under external constraints (N or , V or P, T or E, etc.)  Ensemble (micro-canonical, canonical,
1 CE 530 Molecular Simulation Lecture 6 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Monte Carlo Methods in Statistical Mechanics Aziz Abdellahi CEDER group Materials Basics Lecture : 08/18/
Simulated Annealing.
For a new configuration of the same volume V and number of molecules N, displace a randomly selected atom to a point chosen with uniform probability inside.
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 14 Some materials adapted from Prof. Keith E. Gubbins:
8. Selected Applications. Applications of Monte Carlo Method Structural and thermodynamic properties of matter [gas, liquid, solid, polymers, (bio)-macro-
Monte Carlo Methods So far we have discussed Monte Carlo methods based on a uniform distribution of random numbers on the interval [0,1] p(x) = 1 0  x.
Markov Chain Monte Carlo and Gibbs Sampling Vasileios Hatzivassiloglou University of Texas at Dallas.
1 CE 530 Molecular Simulation Lecture 22 Chain-Molecule Sampling Techniques David A. Kofke Department of Chemical Engineering SUNY Buffalo
Importance sampling for MC simulation
Schematic representation of ‘Microstates’. Integretion over a Markovian Web. G. C. Boulougouris, D. Frenkel, J. Chem. Theory Comput. 2005, 1,
Molecular Modelling - Lecture 2 Techniques for Conformational Sampling Uses CHARMM force field Written in C++
Path Integral Quantum Monte Carlo Consider a harmonic oscillator potential a classical particle moves back and forth periodically in such a potential x(t)=
7. Metropolis Algorithm. Markov Chain and Monte Carlo Markov chain theory describes a particularly simple type of stochastic processes. Given a transition.
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
Monte Carlo in different ensembles Chapter 5
Review Session BS123A/MB223 UC-Irvine Ray Luo, MBB, BS.
1/18/2016Atomic Scale Simulation1 Definition of Simulation What is a simulation? –It has an internal state “S” In classical mechanics, the state = positions.
Monte Carlo methods (II) Simulating different ensembles
Javier Junquera Importance sampling Monte Carlo. Cambridge University Press, Cambridge, 2002 ISBN Bibliography.
MSc in High Performance Computing Computational Chemistry Module Parallel Molecular Dynamics (i) Bill Smith CCLRC Daresbury Laboratory
SUPA Advanced Data Analysis Course, Jan 6th – 7th 2009 Advanced Data Analysis for the Physical Sciences Dr Martin Hendry Dept of Physics and Astronomy.
1 Chapter 8: Model Inference and Averaging Presented by Hui Fang.
MC Simulation Lab 7: 2-Dimensional Lennard-Jones Simple Liquid (Off-Lattice) and Its Phase Transition.
Statistical Mechanics and Multi-Scale Simulation Methods ChBE
Basic Monte Carlo (chapter 3) Algorithm Detailed Balance Other points non-Boltzmann sampling.
CS621: Artificial Intelligence
Lecture 14: Advanced Conformational Sampling Dr. Ronald M. Levy Statistical Thermodynamics.
6/11/2016Atomic Scale Simulation1 Definition of Simulation What is a simulation? –It has an internal state “S” In classical mechanics, the state = positions.
Monte Carlo Simulation of the Ising Model Consider a system of N classical spins which can be either up or down. The total.
The Monte Carlo Method/ Markov Chains/ Metropolitan Algorithm from sec in “Adaptive Cooperative Systems” -summarized by Jinsan Yang.
Heuristic Optimization Methods
Van Laarhoven, Aarts Version 1, October 2000
Overview of Molecular Dynamics Simulation Theory
Monte Carlo: A Simple Simulator’s View
Maria Okuniewski Nuclear Engineering Dept.
14. TMMC, Flat-Histogram and Wang-Landau Method
Haim Kaplan and Uri Zwick
Boltzmann Machine (BM) (§6.4)
Common Types of Simulations
CE 530 Molecular Simulation
Simulated Annealing & Boltzmann Machines
Presentation transcript:

Systematic errors of MC simulations Equilibrium error averages taken before the system has reached equilibrium  Monitor the variables you are interested in.  Take averages only after they have stopped drifting. system stuck in a local minimum of the energy landscape The system may appear to equilibrate nicely inside the local well. However, it is not sampling phase-space correctly.  an “ergodicity” problem  Perform a simulation with several different starting configurations, if you can.  Otherwise, use one of the methods devised to get out of this problem. e.g. simulated annealing (T), parallel tempering (T), metadynamics (PE), etc. Finite size error Thermodynamic averages defined for infinite (impossible to simulate) system  Run on several different system sizes and extrapolate to N = . properties which depend on fluctuations with wavelengths larger than the smallest length of your simulation box  Test on several different system sizes until the property you study no longer varies.

Lab 5. Metropolis NVT Monte Carlo simulation of a particle moving in x  [-1,4] with a double-well potential U(x) = x 4 -6x 3 +8x 2 (-1 < x < 4) (still a 1B1D problem) ~ 9.91 ~ 3.23 U (x) A B X 0 = 0 : metastable state i.e. local minimum X max = 1.22 : unstable state, i.e. maximum (TS) X min = 3.28 : stable state, i.e. global minimum

1-Dimensional motion of a single particle (constant N = 1) moving on a potential landscape defined by U(x) = x 4 – 6 x x 2 confined within x  [-1, 4] (constant V = 5) at a constant temperature T (= 0.1, 0.25, 2.0, etc.)  NVT ensemble Let’s calculate the mean position (observable = x) of the particle. with 1. Modify the main program of exercise 4 to input the temperature (  temp  ). 2. Modify  atom_move.c  to sample a distribution proportional to e -  U(x) with k B = Run the program for M = 10 7 MC cycles for the following cases with  = 0.8 (maximum displacement for MC move). [Case A] Initial microstate defined by the particle at x 0 =  0.5 (What is U?) at two different temperatures: (A1) T = 0.10, (A2) T = 0.25 [Case B] Initial microstate defined by the particle at x 0 = +3.8 (What is U?) at two different temperatures: (B1) T = 0.25, (B2) T = Conclusion

Almost always involves a Markov process Move to a new configuration from an existing one according to a well-defined transition probability Simulation procedure 1. Generate a new “trial” configuration by making a perturbation to the present configuration. 2. Accept the new configuration based on the ratio of the probabilities for the new and old configurations, according to the Metropolis algorithm. 3. If the trial is rejected, the present configuration is taken as the next one in the Markov chain. 4. Repeat this many times, accumulating sums for averages. state k state k+1 Metropolis Monte Carlo Molecular Simulation (Review) David A. Kofke, SUNY Buffalo

Choices of Metropolis for canonical ensembles (review) N. Metropolis et al. J. Chem. Phys. 21, 1087 (1953) 1. Detailed balance condition 2.Symmetric  : 3.Limiting probability distribution for canonical ensemble = Boltzmann  Transition probability  & acceptance probability acc should satisfy: 4. Define the acceptance probability as:  Accept all the downhill moves.  Accept uphill moves only when not too uphill. naturally satisfies this condition.

/* generates a trial displacement of an interaction atom and accepts it based on the Metropolis criterion. Output: the return value is 1 if the move was accepted and 0 otherwise. */ #include "test.h" #include "atom_move.h" #include "ran3.h" #define XX_MIN-1.0 #define XX_MAX 4.0 double U(double x) { double x2, x3; x2 = x * x; x3 = x2 * x; return(8 * x2 - 6 * x3 + x2 * x2); } int atom_move(double *x, double displ_max, double temp, double k, long *seed, double *u_pot) { int accept; double U_old, U_new, delta_U; double displ, x_old; x_old = *x; U_old = U(x_old);

/* Generate random displacement within hypercube of size displ_max. */ displ = displ_max * (ran3(seed) - 0.5); *x += displ; /* Compute change in potential energy and accept move using Metropolis criterion. */ if (*x > XX_MAX || *x < XX_MIN) accept = 0; else{ //p_new = (*x) * exp(-(*x)); U_new = U(*x); delta_U = U_new - U_old; if (delta_U <= 0.0) accept = 1; else accept = ran3(seed) < exp(-delta_U/temp); } /* Update system potential energy if trial move is accepted. Otherwise, reset variables. */ if (!accept) { *x = x_old; } /* Return 1 if trial move is accepted, 0 otherwise. */ return accept; }

Case A: x 0 = -0.5 Case B: x 0 = 3.8 Remark: Lottery chance to find the 6 numbers drawn from a pool of 49 number: 1 chance / M = 10 7 MC steps