Marivi Fernandez-Serra CECAM

Slides:



Advertisements
Similar presentations
Time averages and ensemble averages
Advertisements

Simulazione di Biomolecole: metodi e applicazioni giorgio colombo
The Heat Capacity of a Diatomic Gas
Statistical mechanics
Review Of Statistical Mechanics
Biological fluid mechanics at the micro‐ and nanoscale Lecture 7: Atomistic Modelling Classical Molecular Dynamics Simulations of Driven Systems Anne Tanguy.
Advanced Molecular Dynamics Velocity scaling Andersen Thermostat Hamiltonian & Lagrangian Appendix A Nose-Hoover thermostat.
Molecular dynamics modeling of thermal and mechanical properties Alejandro Strachan School of Materials Engineering Purdue University
Molecular Dynamics at Constant Temperature and Pressure Section 6.7 in M.M.
Transfer FAS UAS SAINT-PETERSBURG STATE UNIVERSITY COMPUTATIONAL PHYSICS Introduction Physical basis Molecular dynamics Temperature and thermostat Numerical.
Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics.
Survey of Molecular Dynamics Simulations: Week 2 By Will Welch For Jan Kubelka CHEM 4560/5560 Fall, 2014 University of Wyoming.
Relaxation and Molecular Dynamics
Introduction to Molecular Orbitals
The Calculation of Enthalpy and Entropy Differences??? (Housekeeping Details for the Calculation of Free Energy Differences) first edition: p
Femtochemistry: A theoretical overview Mario Barbatti III – Adiabatic approximation and non-adiabatic corrections This lecture.
Statistical Mechanics
Mechanics.
Manipulator Dynamics Amirkabir University of Technology Computer Engineering & Information Technology Department.
Joo Chul Yoon with Prof. Scott T. Dunham Electrical Engineering University of Washington Molecular Dynamics Simulations.
Thermal Properties of Crystal Lattices
Molecular Modeling: Geometry Optimization C372 Introduction to Cheminformatics II Kelsey Forsythe.
Objectives of this course
Advanced methods of molecular dynamics Monte Carlo methods
Geometry Optimisation Modelling OH + C 2 H 4 *CH 2 -CH 2 -OH CH 3 -CH 2 -O* 3D PES.
Basics of Statistical Mechanics
Introduction to (Statistical) Thermodynamics
Molecular Dynamics Simulations
Room 2032 China Canada Winnipeg Manitoba.
Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Javier Junquera Molecular dynamics in the microcanonical (NVE) ensemble: the Verlet algorithm.
Molecular Dynamics Simulation Solid-Liquid Phase Diagram of Argon ZCE 111 Computational Physics Semester Project by Gan Sik Hong (105513) Hwang Hsien Shiung.
Constant-Volume Gas Thermometer
Molecular Dynamics A brief overview. 2 Notes - Websites "A Molecular Dynamics Primer", F. Ercolessi
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December 2001 Lecture 18: First Look at Molecular Dynamics CASTEP Developers’ Group.
Minimization v.s. Dyanmics A dynamics calculation alters the atomic positions in a step-wise fashion, analogous to energy minimization. However, the steps.
Basics of molecular dynamics. Equations of motion for MD simulations The classical MD simulations boil down to numerically integrating Newton’s equations.
Specific Heat of Solids Quantum Size Effect on the Specific Heat Electrical and Thermal Conductivities of Solids Thermoelectricity Classical Size Effect.
1 CE 530 Molecular Simulation Lecture 6 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Statistical Mechanics and Multi-Scale Simulation Methods ChBE
Geometry Optimization, Molecular Dynamics and Vibrational Spectra
1 CE 530 Molecular Simulation Lecture 23 Symmetric MD Integrators David A. Kofke Department of Chemical Engineering SUNY Buffalo
Molecular Modelling - Lecture 2 Techniques for Conformational Sampling Uses CHARMM force field Written in C++
Lecture 13. Geometry Optimization References Computational chemistry: Introduction to the theory and applications of molecular and quantum mechanics, E.
Molecular dynamics (2) Langevin dynamics NVT and NPT ensembles
Review Session BS123A/MB223 UC-Irvine Ray Luo, MBB, BS.
Chapter 2-OPTIMIZATION G.Anuradha. Contents Derivative-based Optimization –Descent Methods –The Method of Steepest Descent –Classical Newton’s Method.
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 17 Some materials adapted from Prof. Keith E. Gubbins:
Statistical Mechanics and Multi-Scale Simulation Methods ChBE
Chapter 6: Basic Methods & Results of Statistical Mechanics
Computational Physics (Lecture 11) PHY4061. Variation quantum Monte Carlo the approximate solution of the Hamiltonian Time Independent many-body Schrodinger’s.
Dynamical correlations & transport coefficients
Overview of Molecular Dynamics Simulation Theory
Fundamentals of Molecular Dynamics Simulations
Computational Physics (Lecture 20)
Maintaining Adiabaticity in Car-Parrinello Molecular Dynamics
Convergence in Computational Science
Lecture 41 Statistical Mechanics and Boltzmann factor
Boltzmann statistics Reservoir R U0 -  Combined system U0 = const
Molecular Modelling - Lecture 3
Basics of Statistical Mechanics
Molecular Dynamics.
Basics of Statistical Mechanics
Basics of Statistical Mechanics
Dynamical correlations & transport coefficients
Large Time Scale Molecular Paths Using Least Action.
Advanced Molecular Dynamics
Car Parrinello Molecular Dynamics
Computer Animation Algorithms and Techniques
Pivoting, Perturbation Analysis, Scaling and Equilibration
Presentation transcript:

Marivi Fernandez-Serra CECAM Molecular dynamics (MD) in different ensembles, geometry optimizations and calculation of vibrational spectrum Marivi Fernandez-Serra CECAM

Born-Oppenheimer dynamics Nuclei are much slower than electrons electronic decoupling nuclear

Extracting information from the Potential Energy Surface (PES) Optimizations and Phonons: We move on the PES Local vs global minima PES is harmonic close to minima MD We move over the PES Good Sampling is required!!

Theory of geometry optimization Gradients Hessian =1 for quadratic region

Methods of optimization(I) Ill conditioning: Condition number: Determines convergence Steepest descent: Move in the direction of maximum incline. Repeats search directions Converges to the first iteration If all  are equal

Methods of optimization(II) Energy and first derivatives (forces): - conjugate gradients (retains information) Conjugate search directions: Make sure that new search directions are orthogonal to previous ones.

Methods of optimization(III) Energy, first and second derivatives: - Newton-Raphson: An approximation of H at a position (Xk) is calculated. Then finding the inverse of that Hessian (H-1), and solving the equation P = -H-1*F(Xk) gives a good search direction P. Later, a line search procedure has to determine just how much to go in that direction (producing the scalar alpha). The new position is given by: Xk+1 = Xk + alpha*P BFGS updating of Hessian (reduces inversions) Basic idea, update the Hessian along the minimization to fit: SIESTA presently uses conjugate gradients and BFGS

Optimization (and MD) general basic Step.

Optimization in SIESTA(1) Set runtype to conjugate gradients: MD.TypeOfRun CG, Broyden Set maximum number of iterative steps: MD.NumCGsteps 100 Optionally set force tolerance: MD.MaxForceTol 0.04 eV/Ang Optionally set maximum displacement: MD.MaxCGDispl 0.2 Bohr

Optimizations in SIESTA(2) By default optimisations are for a fixed cell To allow unit cell to vary: MD.VariableCell true Optionally set stress tolerance: MD.MaxStressTol 1.0 Gpa Optionally set cell preconditioning: MD.PreconditionVariableCell 5.0 Ang Set an applied pressure: MD.TargetPressure 5.0 GPa

Advice on optimizations in SIESTA(I) Make sure that your MeshCutoff is high enough: - Mesh leads to space rippling - If oscillations are large convergence is slow - May get trapped in wrong local minimum  

Advice on Optimizations in SIESTA(II) Ill conditioned systems (soft modes) can slow down optimizations, very sensitive to mesh cuttof. - Use constraints when relevant. Fixed to Si Bulk

Advice on Optimizations in SIESTA(III) Decouple Degrees of freedom (relax separately different parts of the system). Look at the evolution of relevant physics quantities (band structure, Ef). Fix the Zeolite, Its relaxation is no Longer relevant. Ftube<0.04 eV/A Fzeol>0.1 eV/A No constraints

Molecular Dynamics Follows the time evolution of a system Solve Newton’s equations of motion: Treats electrons quantum mechanically Treats nuclei classically Hydrogen may raise issues: - tunnelling (overestimating Energy barriers) Allows study of dynamic processes Annealing of complex materials Examines the influence of temperature Time averages Vs Statistical averages

Ergodicity In MD we want to replace a full sampling on the appropriate statistical ensemble by a SINGLE very long trajectory. This is OK only if system is ergodic. Ergodic Hypothesis: a phase point for any isolated system passes in succession through every point compatible with the energy of the system before finally returning to its original position in phase space. This journey takes a Poincare cycle. In other words, Ergodic hypothesis: each state consistent with our knowledge is equally “likely”. Implies the average value does not depend on initial conditions. <A>time= <A>ensemble , so <Atime> = (1/NMD) = ∑t=1,N At is good estimator. Are systems in nature really ergodic? Not always! Non-ergodic examples are glasses, folding proteins (in practice) and harmonic crystals (in principle).

Different aspects of ergodicity The system relaxes on a “reasonable” time scale towards a unique equilibrium state (microcanonical state) Trajectories wander irregularly through the energy surface eventually sampling all of accesible phase space. Trajectories initially close together separate rapidily.(sensitivity to initial conditions). Lyapunov exponent. Ergodic behavior makes possible the use of statistical methods on MD of small system. Small round-off errors and other mathematical approximations may not matter.

Particle in a smooth/rough circle From J.M. Haile: MD Simulations

Molecular Dynamics(I) In Molecular Dynamics simulations, one computes the evolution of the positions and velocities with time, solving Newton’s equations. Algorithm to integrate Newton’s equations: “Verlet” Initial conditions in space and time.

Molecular Dynamics(II) Choosing particles, masses and interatomic forces (model of interactions) Initialize positions and momenta at t=0 (initial conditions in space and time) Solve F = m a to determine r(t), v(t). (integrator) We need to make time discrete, instead of continuous!!! Calculate the properties of interest along the trajectory Estimate errors Use the results of the simulation to answer physical questions!!. h=t t0 t1 t2 tn-1 tn tn+1 tN

Molecular Dynamics III Timestep must be small enough to accurately sample highest frequency motion Typical timestep is 1 fs (1 x 10-15 s) Typical simulation length = Depends on the system of study!! (the more complex the PES the longer the simulation time) Is this timescale relevant to your process? Simulation has two parts: - equilibration (redistribute energy) System is equilibrated if averages of dynamical and structural quantities do not change with time. - production (record data) Results: - diffusion coefficients - Structural information (RDF’s,) - free energies / phase transformations (very hard!) Is your result statistically significant?

Choosing the integrator The interatomic potentials are highly non-linear, often with discontinuous high derivatives, or are evaluated with limited precision. Small errors (precision) or minimal differences in the initial conditions lead to completely different trajectories (Ergodicity!). Statistical averages are the relevant quantities; they do not depend on the details of the trajectories (IF the simulation is long enough!!!!). Because of this, and since potentials are not perfect (all potential models are approximations to the real ones), one does not need too much accuracy in the integration of the equations of motion (as long as errors are not too large, and they do not affect fundamental properties such as conserved quantities). Conservation of energy IS important!!. We can allow errors in the total energy conservation of the order of 0.01 kT. CPU time is completely dominated by the calculation of the forces. Therefore, it is preferable to choose algorithms that require few evaluations of the forces, and do not need higher derivatives of the potential.

Verlet algorithm The most commonly used algorithm: r(t+h) = r(t) + v(t) h + 1/2 a(t) h2 + b(t) h3 + O(h4) (Taylor series expansion) r(t-h) = r(t) - v(t) h + 1/2 a(t) h2 - b(t) h3 + O(h4) r(t+h) = 2 r(t) - r(t-h) + a(t) h2 + O(h4) Sum v(t) = (r(t+h) - r(t-h))/(2h) + O(h2) Difference (estimated velocity) Trajectories are obtained from the first equation. Velocities are not necessary. Errors in trajectory: O(h4) Preserves time reversal symmetry. Excellent energy conservation. Modifications and alternative schemes exist (leapfrog, velocity Verlet), always within the second order approximation Higher order algorithms: Gear

When do we use MD? Amorphous systems: Molecular Liquids (H2O,CO2) Glasses (Si, SiO2) Displacive Phase transitions (P and T relevant). Study of kinetic effects. Diffusion at surfaces Thermal stability

Different ensembles, different Lagrangians, different Conserved magnitudes. NVT (Nose): Canonical System in thermal contact with a heat bath. Extended Lagrangian: N particles + Thermostat, mass Q. NVE (Verlet): Microcanonical. Integrates Newtons equations of motion, for N particles, in a fixed volume V. Natural time evolution of the system: E is a constant of motion NPE (Parrinello-Rahman) (isobarical) Extended Lagrangian Cell vectors are dynamical variables with an associated mass. NPT (Nose-Parrinello-Rahman) 2 Extended Lagrangians NVT+NPE.

Nose-Hoover thermostat MD in canonical distribution (TVN) Introduce a friction force (t) T Reservoir SYSTEM Dynamics of friction coefficient to get canonical ensemble. Feedback makes K.E.=3/2kT Q= fictitious “heat bath mass”. Large Q is weak coupling

Hints Nose Mass: Match a vibrational frequency of the system, better high energy frequency

Which Ensemble should we use? NVT (Nose): Canonical Good T control Equilibrates the system. Choice for Structural sampling. Sensitive to Nose mass. NVE (Verlet): Microcanonical Good trajectories. Time reversible (up to numerical error) Dynamical variables are well defined. Initial X and V are relevant: necessity of equilibration. Same sampling In the thermodynamic limit NPE (Parrinello-Rahman) Phase transitions systems under pressure. 1 mass parameter (barostat) NPT (Nose-Parrinello-Rahman) Phase transitions under P and T 2 mass parameters, barostat and thermostat. (Fluctuations!!

Molecular Dynamics in SIESTA(1) MD.TypeOfRun Verlet NVE ensemble dynamics MD.TypeOfRun Nose NVT dynamics with Nose thermostat MD.TypeOfRun ParrinelloRahman NPE dynamics with P-R barostat MD.TypeOfRun NoseParrinelloRahman NPT dynamics with thermostat/barostat MD.TypeOfRun Anneal Anneals to specified p and T Variable Cell

Molecular Dynamics in SIESTA(2) Setting the length of the run: MD.InitialTimeStep 1 MD.FinalTimeStep 2000 Setting the timestep: MD.LengthTimeStep 1.0 fs Setting the temperature: MD.InitialTemperature 298 K MD.TargetTemperature 298 K Setting the pressure: MD.TargetPressure 3.0 Gpa Thermostat / barostat parameters: MD.NoseMass / MD.ParrinelloRahmanMass Maxwell-Boltzmann

Timescale for achieving target MD.TauRelax 100.0 f Annealing in SIESTA MD can be used to optimize structures: MD.Quench true - zeros velocity when opposite to force MD annealing: MD.AnnealOption Pressure MD.AnnealOption Temperature MD.AnnealOption TemperatureAndPressure Timescale for achieving target MD.TauRelax 100.0 f

Vibrational spectrum: Phonons Calculating Dynamical Matrix: Mass weighted Hessian Matrix (Harmonic approximation). Frozen Phonon approximation: Numerical evaluation of the second derivatives. (finite differences). Density Functional Perturbation Theory (Linear Response): Perturbation theory used to obtain analytically the Energy second derivatives within a self consistent procedure. Molecular dynamics: Green-Kubo linear response. Link between time correlation functions and the response of the system to weak perturbations. Harmonic Approx. Beyond Harmonic Approx.

Phonons in Siesta (I) MD.FCDispl 0.04 Bohr (default) Frozen Phonon approximation: MD.TypeOfRun FC MD.FCDispl 0.04 Bohr (default) Total number of SCF cycles: 3 X 2 X N = 6N (x,y,z) (+,-) Nat Output file: SystemLabel.FC Building and diagonalization of Dynamical matrix: Vibra Suite (Vibrator)

Phonons in Siesta (II) Relax the system: Max F<0.02 eV/Ang Increase MeshCutof, and run FC. 3. If possible test the effect of MaxFCDispl.

Phonons and MD MD simulations (NVE) Fourier transform of Velocity-Velocity autocorrelation function. Anharmonic effects: (T) Expensive, but information available for MD simulations.