Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December 2001 Lecture 18: First Look at Molecular Dynamics CASTEP Developers’ Group.

Similar presentations


Presentation on theme: "The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December 2001 Lecture 18: First Look at Molecular Dynamics CASTEP Developers’ Group."— Presentation transcript:

1 The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December 2001 Lecture 18: First Look at Molecular Dynamics CASTEP Developers’ Group with support from the ESF  k Network

2 Nuts and Bolts 2001 Lecture 18: First look at MD 2 Overview of Lecture  Why bother?  What can you it tell you?  How does it work?  Practical tips  Future directions  Conclusions

3 Nuts and Bolts 2001 Lecture 18: First look at MD 3 Why Bother?  Atoms move!  Time dependant phenomena Ionic vibrations (phonons, IR spectra, etc) Diffusion, transport, etc.  Temperature dependant phenomena Equilibrium thermodynamic properties Catalysis and reactions Free energies Temperature driven phase transitions, melting, etc

4 Nuts and Bolts 2001 Lecture 18: First look at MD 4 Radiation damage in zircon T=600 KT=300 K

5 Nuts and Bolts 2001 Lecture 18: First look at MD 5 Na + diffusion in quartz

6 Nuts and Bolts 2001 Lecture 18: First look at MD 6 What Can It Tell You?  Ensemble Averages Temperature, pressure, density, configuration energy, enthalpy, structural correlations, time correlations, elastic properties, etc.  Correlation Functions Time dependent, e.g. velocity auto-correlation function C vv (t) Spatially dependent, e.g. radial distribution function g(r)  Fluctuations Energy fluctuations  C v, enthalpy fluctuations  C p, etc.  Distribution Functions E.g. velocity distribution function, energy distribution function, etc.

7 Nuts and Bolts 2001 Lecture 18: First look at MD 7 Velocity Auto-Correlation Function Gas Liquid Solid t C vv 1 0

8 Nuts and Bolts 2001 Lecture 18: First look at MD 8 Radial Distribution Function g(r) r/a0 01234 1 Gas Liquid Solid

9 Nuts and Bolts 2001 Lecture 18: First look at MD 9 How Does It Work?  Classical dynamics of ions using ab initio forces derived from the electronic structure Integrate classical equation of motion Discretise time  time step Different integration algorithms Trade-off time step long-term stability vs. short-time accuracy  Ergodic Hypothesis MD trajectory samples phase space time average = ensemble average

10 Nuts and Bolts 2001 Lecture 18: First look at MD 10 Integration Algorithms (I)  Euler Simplest method but unstable to error propagation  Runge-Kutta Excellent stability but too many force evaluations and not symplectic (time reversible)  Predictor-Corrector Old CASTEP – not symplectic  unsuitable for MD  Verlet Position Verlet – not explicit velocities so using thermostats is not straightforward Velocity Verlet – current and new CASTEP

11 Nuts and Bolts 2001 Lecture 18: First look at MD 11 Integration Algorithms (II)  Multiple time / lengths scale algorithms Recent theoretical development Excellent results in special cases but hard to apply in general purpose code  Car-Parrinello Combines electron and ion MD Time step dominated by electrons not ions Cannot handle metals Iterative ab initio methods such as CASTEP require more effort to minimize the electrons but compensate by taking larger time steps based upon ions – even better with constraints …

12 Nuts and Bolts 2001 Lecture 18: First look at MD 12 Time Step  Should reflect physics not algorithm e.g. smallest phonon period/10 Effects the conservation properties of system and long-time stability Typically ~ femto-sec for ab initio calculations Limitation on time scale of observations – total run-length ~pico-sec routine, nano-sec exceptional  Use of constraints to increase time step Freeze motions that are not of interest

13 Nuts and Bolts 2001 Lecture 18: First look at MD 13 Types of MD  Micro-canonical= constant NVE Simplest MD - purely Newtonian dynamics  Canonical= constant NVT Closer to experiment but need to add a thermostat  Isobaric-Isothermal= constant NPT Closest to experimental conditions but need to add a barostat as well  Grand Canonical= constant  VT Cannot do with ab initio MD but has been used with MC

14 Nuts and Bolts 2001 Lecture 18: First look at MD 14 Micro-Canonical Ensemble  Suitable for investigating time dependent phenomena E.g. simple way to sample a single normal modes/ vibrational frequency of complex systems Set temperature=0 Tweak relevant bond Watch the system evolve

15 Nuts and Bolts 2001 Lecture 18: First look at MD 15

16 Nuts and Bolts 2001 Lecture 18: First look at MD 16 Canonical Ensemble  Ensemble of choice for investigating finite temperature phenomena E.g. diffusion Set appropriate temperature, let system evolve and monitor MSD E.g. vibrational spectra Set appropriate temperature, let system evolve and calculate Fourier transform of velocity auto- correlation function

17 Nuts and Bolts 2001 Lecture 18: First look at MD 17 Choice of Thermostat  Velocity rescaling Simple, but breaks the smooth evolution of the system and without theoretical foundation Not used in CASTEP  Nosé-Hoover Couples system to external heat bath using an auxiliary variable Deterministic evolution but not always ergodic  Langevin Based on fluctuation-dissipation theorem and coupling to an external heat bath Stochastic evolution but always ergodic

18 Nuts and Bolts 2001 Lecture 18: First look at MD 18 Nosé-Hoover Thermostat (I)  Extended Lagrangian and Hamiltonian  Modified equations of motion

19 Nuts and Bolts 2001 Lecture 18: First look at MD 19 Nosé-Hoover Thermostat (II)  Need to specify the thermostat ‘mass’ Q Choose Q so as to cause thermostat-system coupling frequency to resonate with characteristic frequency of system – tricky! New CASTEP – input coupling frequency instead and code then estimates appropriate Q

20 Nuts and Bolts 2001 Lecture 18: First look at MD 20

21 Nuts and Bolts 2001 Lecture 18: First look at MD 21 Langevin Thermostat (I)  Modified equation of motion  Fluctuation  Has proper statistical properties, e.g. thermal fluctuations of system obey

22 Nuts and Bolts 2001 Lecture 18: First look at MD 22 Langevin Thermostat (II)  Time-scale of thermal fluctuations depends on the Langevin damping time  L Need to choose s.t.  L is greater than the characteristic period  c of the system s.t. short- time dynamics is accurately reproduced  “Rule of 10s” Choose time step s.t.  c   t *10 Choose Langevin damping time s.t.  L   c *10 Choose run length s.t.  run   L *10

23 Nuts and Bolts 2001 Lecture 18: First look at MD 23

24 Nuts and Bolts 2001 Lecture 18: First look at MD 24 Influence of Electronic Minimizer  All-Bands Variational minimization  accurate forces Problems with metals  Density Mixing Non-variational minimization  need higher accuracy  to get same accuracy forces and need to correct forces  less accurate MD OK with metals  Ensemble DFT Variational minimization  accurate forces Great with metals

25 Nuts and Bolts 2001 Lecture 18: First look at MD 25 Wavefunction Extrapolation (I)  Advantages Generate better guess for  at new ionic configuration Less work for electronic minimizer  faster  Assumes can extrapolation  forwards in time in similar manner to ionic positions Can either do first or second order extrapolation Can either used fixed values for (  ) or those which minimize difference between MD and extrapolated coordinates

26 Nuts and Bolts 2001 Lecture 18: First look at MD 26 Wavefunction Extrapolation (II) t x  00 ++

27 Nuts and Bolts 2001 Lecture 18: First look at MD 27 Wavefunction Extrapolation (III)  All bands / Ensemble DFT Extrapolate  only  Density-Mixing Must extrapolate  and  independently else Residual = 0 and not ground state! Decompose  into atomic and non-atomic contributions Move the atomic charges onto the new ionic coordinate Extrapolate the non-atomic part only

28 Nuts and Bolts 2001 Lecture 18: First look at MD 28

29 Nuts and Bolts 2001 Lecture 18: First look at MD 29 Practical Tips (I)  Equilibration Sensitivity of system to initial conditions Depends on quantity of interest E.g. if after equilibrium average, then must allow system to evolve to equilibrium before start data collection Auto-correlation functions give useful information on the “memory” of the system to the quantity of interest.

30 Nuts and Bolts 2001 Lecture 18: First look at MD 30 equilibration production

31 Nuts and Bolts 2001 Lecture 18: First look at MD 31 Practical Tips (II)  Sampling It is very easy to over-sample the data and consequently under-estimate the variance Successive configurations are highly correlated - not independent data points Need to determine optimal sampling frequency of the quantity of interest ‘A’ and either save data at appropriate intervals or adjust error bars  need to analyse variance in blocks of size  b

32 Nuts and Bolts 2001 Lecture 18: First look at MD 32 Practical Tips (III)

33 Nuts and Bolts 2001 Lecture 18: First look at MD 33 Future Directions  Isothermal-Isobaric Ensemble Variable cell MD Allow cell size and shape to evolve under internal stress and external pressure Closest to experimental conditions Important for generic phase transitions

34 Nuts and Bolts 2001 Lecture 18: First look at MD 34 Conclusions  Two ensembles can be simulated in CASTEP using Velocity Verlet integration Large time step, excellent long term energy conservation and stability  Micro-Canonical (NVE)  Canonical (NVT) Nosé-Hoover thermostat – deterministic Langevin thermostat – stochastic  Can be used to study many phenomena - see later talks for example applications!


Download ppt "The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December 2001 Lecture 18: First Look at Molecular Dynamics CASTEP Developers’ Group."

Similar presentations


Ads by Google