Download Introduction To Md Simulation-Computational Physics-Lecture Slides and more Slides Computational Physics in PDF only on Docsity!
Introduction to MD Simulation:
- Why do simulations?
- Some history
- Review of statistical mechanics
- Newton’s equations and ergodicity
- The FPU “experiment”
- How to get something from simulations: statistical
errors
Why do simulations?
- Simulations are the only general method for “solving”
many-body problems. Other methods involve
approximations and experts.
- Experiment is limited and expensive. Simulations can
complement the experiment.
- Simulations are easy even for complex systems.
- They scale up with the computer power.
“The general theory of quantum mechanics is now almost
complete. The underlying physical laws necessary for
the mathematical theory of a large part of physics and
the whole of chemistry are thus completely known,
and the difficulty is only that the exact application of
these laws leads to equations much too complicated to
be soluble.”
Dirac, 1929
Challenges of Simulation
Physical and mathematical underpinings:
- What approximations come in:
- Computer time is limited to few particles for short
periods of time. (space-time is 4D. Moore’s Law implies
lengths and times will double every 6 years if O(N).)
- Systems with many particles and long time scales are
problematical.
- Hamiltonian is unknown, until we solve the quantum
many-body problem!
- How do we estimate errors? Statistical and systematic.
- How do we manage ever more complex codes?
Molecular Dynamics (MD)
- Pick particles, masses and potential.
- Initialize positions and momentum. (boundary
conditions in space and time)
- Solve F = m a to determine r (t), v (t).
Newton (1667-87)
- Compute properties along the trajectory
- Estimate errors.
- Try to use the simulation to answer physical
questions.
What are the forces?
- Crucial since V(q) determines the quality of result.
- In this lecture we will use semi-empirical potentials: potential is constructed on theoretical grounds but using some experimental data.
- Common examples are Lennard-Jones, Coulomb, embedded atom potentials. They are only good for simple materials. We will not discuss these potentials for reasons of time.
- The ab initio philosophy is that potentials are to be determined directly from quantum mechanics as needed.
- But computer power is not yet adequate in general.
- A powerful approach is to use simulations at one level to determine parameters at the next level.
Ergodicity
- Fermi- Pasta- Ulam “experiment” (1954)
- 1-D anharmonic chain: V= [(q (^) i+1-q (^) i)^2 + (q (^) i+1-q (^) i)^3 ]
- The system was started out with energy with the lowest energy mode. Equipartition would imply that the energy would flow into the other modes.
- Systems at low temperatures never come into equilibrium. The energy sloshes back and forth between various modes forever.
- At higher temperature many-dimensional systems become ergodic.
- Area of non-linear dynamics are devoted to these questions.
Let us say here that the results of our computations were, from the beginning, surprising us. Instead of a continuous flow of energy from the first mode to the higher modes, all of the problems show an entirely different behavior. … Instead of a gradual increase of all the higher modes, the energy is exchanged, essentially, among only a certain few. It is, therefore, very hard to observe the rate of “thermalization” or mixing in our problem, and this was the initial purpose of the calculation.
Fermi, Pasta, Ulam (1954)
Statistical ensembles
- (E, V, N) microcanonical, constant volume
- (T, V, N) canonical, constant volume
- (T, P N) constant pressure
- (T, V , ) grand canonical
- Which is best? It depends on:
- the question you are asking
- the simulation method: MC or MD (MC better for phase transitions)
- your code.
- Lots of work in last 2 decades on various ensembles.
Definition of Simulation
An internal state “S” A rule for changing the state Sn+1 = T (Sn) We repeat the iteration many time.
- Simulations can be
- Deterministic (e.g. Newton’s equations = MD)
- Stochastic (Monte Carlo, Brownian motion,…)
- Typically they are ergodic: there is a correlation time T for times much longer than that, all non-conserved properties are close to their average value. Used for: - Warm up period - To get independent samples for computing errors.
Estimating Errors
Trace of A(t) : Equilibration time. Histogram of values of A ( P(A) ). Mean of A (a). Variance of A ( v ). estimate of the mean: A(t)/N estimate of the variance , Autocorrelation of A (C(t)). Correlation time (k ). The (estimated) error of the (estimated) mean ( ). Efficiency [= 1/(CPU time * error 2 )]
Statistical thinking is slippery
- “Shouldn’t the energy settle down to a constant”
- NO. It fluctuates forever. It is the overall mean which converges.
- “My procedure is too complicated to compute errors”
- NO. Run your whole code 10 times and compute the mean and variance from the different runs
- “The cumulative energy has converged”.
- BEWARE. Even pathological cases have smooth cumulative energy curves.
- “Data set A differs from B by 2 error bars. Therefore it
must be different”.
- This is normal in 1 out of 10 cases.