Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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 a cubic volume of edge 2  centered on the current position of the atom. Examine underlying transition probability to formulate the acceptance criterion Displacement trial move. 1. Specification ? Select an atom at random. Consider a region centered at it. Move atom to a point chosen uniformly in region. Consider acceptance of new configuration. 22 Step 1Step 2Step 3Step 4 general hitherto David A. Kofke, SUNY Buffalo

2 Displacement trial move. 4. Pseudo Code (Louis)

3 Rule of thumb: Size of the step is adjusted to reach a target acceptance rate of displacement trials, which is typically 50%. Large step leads to less acceptance but bigger moves. Small step leads to less movement but more acceptance. Displacement trial move. 6. Step size tuning

4 Error analysis in Metropolis Monte Carlo: Example of data correlation. 1D Harmonic oscillator (~NVT) assumes that the N measurements of x are all independent. in a sense of constant kinetic energy T (=0) i.e., E(x)=V(x)

5 Example of data correlation: 1D harmonic oscillator First 1000 steps in MC time history of x for three different step sizes  or  = 1; 10; 200 (corresponding acceptance rate = 0.70; 0.35; 0.02) Richard T. Scalettar rejected correlated xixi

6 Example of data correlation: 1D harmonic oscillator where (fluctuation around the average), which measure whether the fluctuations are related for x values l measurement apart. Autocorrelation functions for the complete data sets (400,000 steps) of x for three different step sizes  = 1; 10; 200 (acceptance rate = 0.70; 0.35; 0.02) e -1 correlation time  (short)correlation time  (long) In generating these results so far, x was measured every MC step.

7 c m (l) = correlation function when measurements are only every m-th MC step = c 1 (ml) If one choose m> , then the measurements all become independent. For correct error bar, measurements should be separated by awaiting time m larger than . Advantage: We don’t waste time making measurements when they are not independent. Disadvantage: We need longer (by m times) MC simulations to achieve the same accuracy. assumes that the N measurements of x are all independent. (Statistical) Error analysis in Metropolis Monte Carlo What happens if one instead measures only every m-th MC step? MC step: m m+1 m+2 m+3  Measurement: 1 MC step: 2m Measurement: 2 123 m mm MC step 3 Measurement 3

8 (Statistical) Error analysis in Metropolis Monte Carlo: Rebinning data. Block averages. Choose a bin size M b and average x over each of the L (= N/M b ) bins (N = total number of measurements) to create L “binned” “independent” measurements {m 1, m 2, , m j, , m L }. Error bars for different bin sizes m based on the same data sets (400,000 steps) of x for three different step sizes  = 1; 10; 200 (acceptance rate = 0.70; 0.35; 0.02) increase with M b (L  ) flat out to a correct asymptotic value   (L ,  2  ) & too small  1 (M b =1) (assume independence of each measurement) MbMb MbMb MbMb

9

10 Initialization Reset block sums Compute block average Compute final results “cycle” or “sweep” “block” Move each atom once (on average) 100’s or 1000’s of cycles Independent “measurement” moves per cycle cycles per block Add to block sum blocks per simulation New configuration Entire Simulation Monte Carlo Move Select type of trial move each type of move has fixed probability of being selected Perform selected trial move Decide to accept trial configuration, or keep original David A. Kofke, SUNY Buffalo Displacement trial move. 5. Implementation

11 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.


Download ppt "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."

Similar presentations


Ads by Google