1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE 591-009 Prof. C. Heath Turner Lecture 11 Some materials adapted from Prof. Keith E. Gubbins:

Slides:



Advertisements
Similar presentations
Monte Carlo Methods and Statistical Physics
Advertisements

Partitioning and Divide-and-Conquer Strategies ITCS 4/5145 Parallel Computing, UNC-Charlotte, B. Wilkinson, Jan 23, 2013.
Use of Kalman filters in time and frequency analysis John Davis 1st May 2011.
Ch 11. Sampling Models Pattern Recognition and Machine Learning, C. M. Bishop, Summarized by I.-H. Lee Biointelligence Laboratory, Seoul National.
Bayesian Reasoning: Markov Chain Monte Carlo
1 CE 530 Molecular Simulation Lecture 8 Markov Processes David A. Kofke Department of Chemical Engineering SUNY Buffalo
Analyzing the Results of a Simulation and Estimating Errors Jason Cooper.
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
Resampling techniques Why resampling? Jacknife Cross-validation Bootstrap Examples of application of bootstrap.
CE 400 Honors Seminar Molecular Simulation Prof. Kofke Department of Chemical Engineering University at Buffalo, State University of New York Class 3.
CF-3 Bank Hapoalim Jun-2001 Zvi Wiener Computational Finance.
Class 5: Thurs., Sep. 23 Example of using regression to make predictions and understand the likely errors in the predictions: salaries of teachers and.
Reduced Support Vector Machine
Evaluating Hypotheses
統計計算與模擬 政治大學統計系余清祥 2003 年 5 月 26 日 ~ 6 月 3 日 第十四、十五週:蒙地卡羅積分
Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Evaluating Hypotheses.
Monte Carlo Methods in Partial Differential Equations.
Lecture II-2: Probability Review
Introduction to Monte Carlo Methods D.J.C. Mackay.
Component Reliability Analysis
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Analysis of Monte Carlo Integration Fall 2012 By Yaohang Li, Ph.D.
Simulation of Random Walk How do we investigate this numerically? Choose the step length to be a=1 Use a computer to generate random numbers r i uniformly.
Gaussian process modelling
01/24/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
1 LES of Turbulent Flows: Lecture 1 Supplement (ME EN ) Prof. Rob Stoll Department of Mechanical Engineering University of Utah Fall 2014.
Copyright © 2010 Lumina Decision Systems, Inc. Monte Carlo Simulation Analytica User Group Modeling Uncertainty Series #3 13 May 2010 Lonnie Chrisman,
General Principle of Monte Carlo Fall 2013 By Yaohang Li, Ph.D.
F.F. Assaad. MPI-Stuttgart. Universität-Stuttgart Numerical approaches to the correlated electron problem: Quantum Monte Carlo.  The Monte.
1 Lesson 3: Choosing from distributions Theory: LLN and Central Limit Theorem Theory: LLN and Central Limit Theorem Choosing from distributions Choosing.
1 CE 530 Molecular Simulation Lecture 17 Beyond Atoms: Simulating Molecules David A. Kofke Department of Chemical Engineering SUNY Buffalo
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
Module 1: Statistical Issues in Micro simulation Paul Sousa.
1 CE 530 Molecular Simulation Lecture 6 David A. Kofke Department of Chemical Engineering SUNY Buffalo
1 Lesson 8: Basic Monte Carlo integration We begin the 2 nd phase of our course: Study of general mathematics of MC We begin the 2 nd phase of our course:
Monte Carlo Methods.
Monte Carlo Methods1 T Special Course In Information Science II Tomas Ukkonen
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:
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.
Statistical Mechanics and Multi-Scale Simulation Methods ChBE
4. Numerical Integration. Standard Quadrature We can find numerical value of a definite integral by the definition: where points x i are uniformly spaced.
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 25 Some materials adapted from Prof. Keith E. Gubbins:
ECE 8443 – Pattern Recognition LECTURE 08: DIMENSIONALITY, PRINCIPAL COMPONENTS ANALYSIS Objectives: Data Considerations Computational Complexity Overfitting.
Molecular Modelling - Lecture 2 Techniques for Conformational Sampling Uses CHARMM force field Written in C++
Sampling and estimation Petter Mostad
Ensemble Methods in Machine Learning
Chapter 5 Sampling Distributions. The Concept of Sampling Distributions Parameter – numerical descriptive measure of a population. It is usually unknown.
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 17 Some materials adapted from Prof. Keith E. Gubbins:
Introduction to Sampling Methods Qi Zhao Oct.27,2004.
Statistical Mechanics and Multi-Scale Simulation Methods ChBE
01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
Basic Monte Carlo (chapter 3) Algorithm Detailed Balance Other points non-Boltzmann sampling.
Kevin Stevenson AST 4762/5765. What is MCMC?  Random sampling algorithm  Estimates model parameters and their uncertainty  Only samples regions of.
Evaluating Hypotheses. Outline Empirically evaluating the accuracy of hypotheses is fundamental to machine learning – How well does this estimate its.
Tree and Forest Classification and Regression Tree Bagging of trees Boosting trees Random Forest.
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 10) PHY4370. Simulation Details To simulate Ising models First step is to choose a lattice. For example, we can us SC,
Introduction to emulators Tony O’Hagan University of Sheffield.
CHEM-E7130 Process Modeling Lecture 6
Lesson 8: Basic Monte Carlo integration
Computational Physics (Lecture 10)
Statistical Mechanics and Multi-Scale Simulation Methods ChBE
Chapter 3 Component Reliability Analysis of Structures.
Lecture 2 – Monte Carlo method in finance
Lesson 9: Basic Monte Carlo integration
Fractional-Random-Weight Bootstrap
Presentation transcript:

1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 11 Some materials adapted from Prof. Keith E. Gubbins: Some materials adapted from Prof. David Kofke:

2 Monte Carlo Simulation  Gives properties via ensemble averaging No time integration Cannot measure dynamical properties  Employs stochastic methods to generate a (large) sample of members of an ensemble “random numbers” guide the selection of new samples  Permits great flexibility members of ensemble can be generated according to any convenient probability distribution… …and any given probability distribution can be sampled in many ways strategies developed to optimize quality of results ergodicity — better sampling of all relevant regions of configuration space variance minimization — better precision of results  MC “simulation” is the evaluation of statistical-mechanics integrals still too hard! Taken from Dr. D. A. Kofke’s SUNY Buffalo:

3 One-Dimensional Integrals  Methodical approaches rectangle rule, trapezoid rule, Simpson’s rule  Quadrature formula n uniformly separated points Sum areas of shapes approximating shape of curve Evaluating the general integral Taken from Dr. D. A. Kofke’s SUNY Buffalo:

4 Monte Carlo Integration  Stochastic approach  Same quadrature formula, different selection of points  Click here for an applet demonstrating MC integration Click here n points selected from uniform distribution  (x) Taken from Dr. D. A. Kofke’s SUNY Buffalo:

5 Random Number Generation  Random number generators subroutines that provide a new random deviate with each call basic generators give value on (0,1) with uniform probability uses a deterministic algorithm (of course) usually involves multiplication and truncation of leading bits of a number  Returns set of numbers that meet many statistical measures of randomness histogram is uniform no systematic correlation of deviates no idea what next value will be from knowledge of present value (without knowing generation algorithm) but eventually, the series must end up repeating  Some famous failures be careful to use a good quality generator linear congruential sequence Plot of successive deviates (X n,X n+1 ) Not so random! Taken from Dr. D. A. Kofke’s SUNY Buffalo:

6 Errors in Random vs. Methodical Sampling  Comparison of errors methodical approach Monte Carlo integration  MC error vanishes much more slowly for increasing n  For one-dimensional integrals, MC offers no advantage  This conclusion changes as the dimension d of the integral increases methodical approach MC integration  MC “wins” at about d = 4 independent of dimension! for example (Simpson’s rule) d = 2 36 points, 36 1/2 = 6 in each row Taken from Dr. D. A. Kofke’s SUNY Buffalo:

7 Shape of High-Dimensional Regions  Two (and higher) dimensional shapes can be complex  How to construct and weight points in a grid that covers the region R? Example: mean-square distance from origin Taken from Dr. D. A. Kofke’s SUNY Buffalo:

8 Shape of High-Dimensional Regions  Two (and higher) dimensional shapes can be complex  How to construct and weight points in a grid that covers the region R? hard to formulate a methodical algorithm in a complex boundary usually do not have analytic expression for position of boundary complexity of shape can increase unimaginably as dimension of integral grows  We need to deal with 100+ dimensional integrals Example: mean-square distance from origin Taken from Dr. D. A. Kofke’s SUNY Buffalo:

9 Integrate Over a Simple Shape? 1.  Modify integrand to cast integral into a simple shaped region define a function indicating if inside or outside R  Difficult problems remain grid must be fine enough to resolve shape many points lie outside region of interest too many quadrature points for our high- dimensional integrals (see applet again)see applet again  Click here for an applet demonstrating 2D quadrature Click here Taken from Dr. D. A. Kofke’s SUNY Buffalo:

10 Integrate Over a Simple Shape? 2.  Statistical-mechanics integrals typically have significant contributions from miniscule regions of the integration space contributions come only when no spheres overlap e.g., 100 spheres at freezing the fraction is  Evaluation of integral is possible only if restricted to region important to integral must contend with complex shape of region MC methods highly suited to “importance sampling” Taken from Dr. D. A. Kofke’s SUNY Buffalo:

11 Importance Sampling  Put more quadrature points in regions where integral receives its greatest contributions  Return to 1-dimensional example  Most contribution from region near x = 1  Choose quadrature points not uniformly, but according to distribution  (x) linear form is one possibility  How to revise the integral to remove the bias? Taken from Dr. D. A. Kofke’s SUNY Buffalo:

12 The Importance-Sampled Integral  Consider a rectangle-rule quadrature with unevenly spaced abscissas  Spacing between points reciprocal of local number of points per unit length  Importance-sampled rectangle rule Same formula for MC sampling … Greater  more points  smaller spacing choose x points according to  Taken from Dr. D. A. Kofke’s SUNY Buffalo:

13 Generating Nonuniform Random Deviates  Probability theory says......given a probability distribution u(z) if x is a function x(z), then the distribution of  (x) obeys  Prescription for  (x) solve this equation for x(z) generate z from the uniform random generator compute x(z)  Example we want on x = (0,1) then so x = z 1/2 taking square root of uniform deviate gives linearly distributed values  Generating  (x) requires knowledge of a and c from “boundary conditions” Taken from Dr. D. A. Kofke’s SUNY Buffalo:

14 Choosing a Good Weighting Function  MC importance-sampling quadrature formula  Do not want  (x) to be too much smaller or too much larger than f(x) too small leads to significant contribution from poorly sampled region too large means that too much sampling is done in region that is not (now) contributing much Taken from Dr. D. A. Kofke’s SUNY Buffalo:

15 Variance in Importance Sampling Integration  Choose  to minimize variance in average  Smallest variance in average corresponds to  (x) = c  f(x) not a viable choice the constant here is selected to normalize  if we can normalize  we can evaluate this is equivalent to solving the desired integral of f(x)  Click here for an applet demonstrating importance sampling Click here Taken from Dr. D. A. Kofke’s SUNY Buffalo:

16 Summary  Monte Carlo methods use stochastic process to answer a non-stochastic question generate a random sample from an ensemble compute properties as ensemble average permits more flexibility to design sampling algorithm  Monte Carlo integration good for high-dimensional integrals better error properties better suited for integrating in complex shape  Importance Sampling focuses selection of points to region contributing most to integral selecting of weighting function is important choosing perfect weight function is same as solving integral  Next up: Markov processes: generating points in a complex region Taken from Dr. D. A. Kofke’s SUNY Buffalo: