Presentation is loading. Please wait.

Presentation is loading. Please wait.

Common Types of Simulations

Similar presentations


Presentation on theme: "Common Types of Simulations"— Presentation transcript:

1 Common Types of Simulations
Molecular Dynamics: to study the dynamics of many body systems in a vacuum, or with explicit solvent Brownian Dynamics: explores the dynamics of many body systems in a solvent. The solvent is not explicitly modelled, and is only included as random perturbations on the particle motion Monte Carlo: does not examine dynamics, but calculates equilibrium static quantities

2 Towards Monte Carlo: Statistical Physics Review
Fundamental assumption of statistical physics All microstates have an equal probability of occurring in the NVE ensemble. From this we can derive the partition function in the canonical (NVT) ensemble. For particles at positions rN with momentum pN the partition function is Integrating out momentum potential energy of system Planck’s constant Boltzmann distribution De Broglie wavelength

3 Statistical Physics Review
From the partition function, we can obtain all relevant statistical mechanics quantities, i.e. free energies, expectation values, etc. Unfortunately, we cannot calculate the partition functions numerically – too dominated by specific configurations. Need another avenue. Expectation values <A> are given by Note that this can be rewritten Boltzmann Distribution

4 Statistical Physics Review
Expectation values <A> are given by Thus, if we can generate a sequence of configurations distributed proportional to the Boltzmann distribution P(rN), we can calculate <A> by simply averaging over them: m’th measurement Number of measurements Goal of Monte Carlo simulation: Generate configurations according to the desired (Boltzmann) distribution

5 Intro to MC What does it mean for a system to be in equilibrium?
Idea behind MC: Generate a sequence of configurations by walking from one state to the other which obeys the equilibrium condition Transition probability to go from A to B Probability of being in state A

6 Detailed Balance A sufficient, but stronger than needed, condition for this is detailed balance: This says that the probability of being in state A and changing to state B is the same as the probability of being in state B and changing to state A. Probability of being in state A Transition probability to go from A to B

7 Acceptance rules In a Monte Carlo simulation, we try to change the state of the system by, for instance, moving a particle. Define the probability that a specific MC move is accepted as paccept(A→B), then the transition probability from A to B is given by Note the difference between the transition probability and the acceptance probability: The transition probability is the chance that a system in state A goes to B, while the acceptance probability is the chance that a specific type of change is accepted. Transition probability Probability to try a specific MC move Acceptance probability

8 Acceptance rules Simple MC moves, such as moving a particle, are typically symmetric: the probability of trying a move that moves a particle is the same as the probability of trying a move that moves it back: In this case, the relative probability of being in state A and B can be directly related to the acceptance rate for a move between them Detailed balance condition

9 Acceptance rules For particles in the canonical ensemble, the relative probability between two states should follow the Boltzmann distribution: Thus, the acceptance probabilities should obey: This still leaves some options in how we choose the acceptance criteria, Metropolis chose Potential energy of each state

10 Example: 1d Ising model Initial state
Select random spin with probability ptrial = 1/12 Flip spin 1-paccept paccept Accept trial move with probability paccept

11 Monte Carlo for Colloids
Set the size and shape of the simulation box - cubic, sphere, etc. Give each particle a position, e.g., start them on a simple cubic lattice or randomly distributed positions

12 Trial Move: Move Particle
Move attempt Choose particle Old System Try to move it a random amount (dx,dy) uniformly chosen from distributions dx = [-dxmax, dxmax] dy = [-dxmax, dxmax] Calculate energy of new system (Unew) Select a particle at random to move Calculate energy of total system (Uold)

13 Simple Trial Move: Move Particle
Accept the new position of the particle according to the acceptance criteria A is the old system B is the new system Rejected! Go back to initial state. Accepted! Keep new position

14 MC-NVT (pseudocode) program MC call initialize() for (cyc = 1 to Ncyc)
for (step = 1 to Nstep) ipart = randomint(1,N) call move(ipart) end for end program Number of MC cycles Steps per cycle Select a random particle to move Attempt to move the chosen particle


Download ppt "Common Types of Simulations"

Similar presentations


Ads by Google