The Nuts and Bolts of First-Principles Simulation

Slides:



Advertisements
Similar presentations
Wave function approaches to non-adiabatic systems
Advertisements

Statistical mechanics
Eric Prebys, FNAL.  We have focused largely on a kinematics based approach to beam dynamics.  Most people find it more intuitive, at least when first.
Quantum One: Lecture 6. The Initial Value Problem for Free Particles, and the Emergence of Fourier Transforms.
Beams and Frames.
Relaxation and Molecular Dynamics
Molecular Bonding Molecular Schrödinger equation
Molecular Quantum Mechanics
Introduction to Molecular Orbitals
MANE 4240 & CIVL 4240 Introduction to Finite Elements
Conical Intersections Spiridoula Matsika. The study of chemical systems is based on the separation of nuclear and electronic motion The potential energy.
ECIV 720 A Advanced Structural Mechanics and Analysis
The Nuts and Bolts of First-Principles Simulation Lecture 16: DFT for Metallic Systems CASTEP Developers’ Group with support from the ESF  k Network Durham,
FEA Simulations Usually based on energy minimum or virtual work Component of interest is divided into small parts – 1D elements for beam or truss structures.
Femtochemistry: A theoretical overview Mario Barbatti III – Adiabatic approximation and non-adiabatic corrections This lecture.
Molecular Orbitals.
Vibrations of polyatomic molecules
III Solution of pde’s using variational principles
Anharmonic Oscillator Derivation of Second Order Susceptibilities
Vibrational Spectroscopy
Network for Computational Nanotechnology (NCN) Purdue, Norfolk State, Northwestern, MIT, Molecular Foundry, UC Berkeley, Univ. of Illinois, UTEP DFT Calculations.
Ch 23 pages Lecture 15 – Molecular interactions.
Materials Process Design and Control Laboratory ON THE DEVELOPMENT OF WEIGHTED MANY- BODY EXPANSIONS USING AB-INITIO CALCULATIONS FOR PREDICTING STABLE.
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December : Is it running properly? CASTEP Developers’ Group with support from.
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December : DFT Plane Wave Pseudopotential versus Other Approaches CASTEP Developers’
Javier Junquera Molecular dynamics in the microcanonical (NVE) ensemble: the Verlet algorithm.
1 CE 530 Molecular Simulation Lecture 17 Beyond Atoms: Simulating Molecules David A. Kofke Department of Chemical Engineering SUNY Buffalo
MODULE 8 APPROXIMATION METHODS I Once we move past the two particle systems, the Schrödinger equation cannot be solved exactly. The electronic inter-repulsion.
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December 2001 Lecture 18: First Look at Molecular Dynamics CASTEP Developers’ Group.
1 CE 530 Molecular Simulation Lecture 6 David A. Kofke Department of Chemical Engineering SUNY Buffalo
ChE 551 Lecture 23 Quantum Methods For Activation Barriers 1.
Phase diagram calculation based on cluster expansion and Monte Carlo methods Wei LI 05/07/2007.
Ionic Conductors: Characterisation of Defect Structure Lecture 15 Total scattering analysis Dr. I. Abrahams Queen Mary University of London Lectures co-financed.
Progress in identification of damping: Energy-based method with incomplete and noisy data Marco Prandina University of Liverpool.
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December : Computational Materials Science: an Overview CASTEP Developers’ Group.
Quantum Two 1. 2 Evolution of Many Particle Systems 3.
1 MODELING MATTER AT NANOSCALES 4. Introduction to quantum treatments The variational method.
Fundamentals of DFT R. Wentzcovitch U of Minnesota VLab Tutorial Hohemberg-Kohn and Kohn-Sham theorems Self-consistency cycle Extensions of DFT.
Density Functional Theory A long way in 80 years L. de Broglie – Nature 112, 540 (1923). E. Schrodinger – 1925, …. Pauli exclusion Principle.
Lecture 26 Molecular orbital theory II
Physics “Advanced Electronic Structure” Frozen Phonon and Linear Response Calcuations of Lattice Dynamics Contents: 1. Total Energies and Forces.
Simple Harmonic Oscillator (SHO) Quantum Physics II Recommended Reading: Harris: chapter 4 section 8.
CHAP 3 WEIGHTED RESIDUAL AND ENERGY METHOD FOR 1D PROBLEMS
Last hour: Electron Spin Triplet electrons “avoid each other”, the WF of the system goes to zero if the two electrons approach each other. Consequence:
How do you build a good Hamiltonian for CEID? Andrew Horsfield, Lorenzo Stella, Andrew Fisher.
Materials Process Design and Control Laboratory ON THE DEVELOPMENT OF WEIGHTED MANY- BODY EXPANSIONS USING AB-INITIO CALCULATIONS FOR PREDICTING STABLE.
Vibrational Motion Harmonic motion occurs when a particle experiences a restoring force that is proportional to its displacement. F=-kx Where k is the.
Canonical Equations of Motion -- Hamiltonian Dynamics
Statistical Mechanics and Multi-Scale Simulation Methods ChBE
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December : Testing Testing. Basic procedure to “validate” calculations CASTEP.
Advanced methods of molecular dynamics 1.Monte Carlo methods 2.Free energy calculations 3.Ab initio molecular dynamics 4.Quantum molecular dynamics 5.Trajectory.
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December 2001 Lecture 15: Structural Calculations and Pressure CASTEP Developers’ Group.
Computational Physics (Lecture 22) PHY4061. In 1965, Mermin extended the Hohenberg-Kohn arguments to finite temperature canonical and grand canonical.
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December : Linear response theory CASTEP Developers’ Group with support from.
Comp. Mat. Science School Electrons in Materials Density Functional Theory Richard M. Martin Electron density in La 2 CuO 4 - difference from sum.
Ch.1. Elementary Quantum Chemistry
Celestial Mechanics VII
1 CHAP 3 WEIGHTED RESIDUAL AND ENERGY METHOD FOR 1D PROBLEMS FINITE ELEMENT ANALYSIS AND DESIGN Nam-Ho Kim.
Continuum Mechanics (MTH487)
Continuum Mechanics (MTH487)
3: Density Functional Theory
Chapter 6: Oscillations Sect. 6.1: Formulation of Problem
Maintaining Adiabaticity in Car-Parrinello Molecular Dynamics
The Nuts and Bolts of First-Principles Simulation
Quantum One.
FEA Simulations Boundary conditions are applied
The Nuts and Bolts of First-Principles Simulation
Car Parrinello Molecular Dynamics
Orbitals, Basis Sets and Other Topics
Quantum One.
Presentation transcript:

The Nuts and Bolts of First-Principles Simulation Lecture 14: Forces and Stresses Durham, 6th-13th December 2001 CASTEP Developers’ Group with support from the ESF k Network

Lecture 14: Forces and Stresses Overview of Lecture Why bother? Theoretical background CASTEP details Symmetry and User Constraints Conclusion Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses Why bother? (I) Structure optimisation Minimum energy corresponds to zero force Much more efficient than just using energy alone Equilibrium bond lengths, angles, etc. Minimum enthalpy corresponds to zero force and stress Can therefore minimise enthalpy w.r.t. supercell shape due to internal stress and external pressure Pressure-driven phase transitions Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses Why bother? (II) Molecular dynamics Can do classical dynamics of ions using forces derived from ab initio electronic structure Copes with unusual geometry, bond-breaking, chemical reactions, catalysis, diffusion, etc Incorporates effects of finite temperature of ions Can generate thermodynamic information from ensemble averaging Time dependent phenomena Temperature driven phase transitions Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Theoretical Background Hellman-Feynman Theorem basic Quantum Mechanics Density Functional Theory how it applies in DFT Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Hellman-Feynman Theorem (I) Classically we have the force F at position R is determined from the potential energy as Quantum mechanically we therefore expect where Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Hellman-Feynman Theorem (II) If we write the three unit cell vectors a, b, c as the columns of a matrix h then the effect of an applied strain is to change the shape of the unit cell: We then have the stress tensor s related to the strain tensor e by: where is the volume of the unit cell. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Stress and strain in action b c g aa+da b c a g sxx c b a NB Much messier if non-orthogonal cell sxy b g g+dg a Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Hellman-Feynman Theorem (III) The Hellman-Feynman Theorem states that for any perturbation l we have which obviously includes the case we are interested in. We have assumed that the wavefunction is properly normalised and is an exact eigenstate of H. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Hellman-Feynman Theorem (IV) To evaluate <E> for an unknown wavefunction Y we first expand it in terms of a complete set of fixed basis functions j and then use the Variational Principle to find the set of complex coefficients ci that minimise the energy. If the basis set is incomplete then we arrive at an upper-bound for the energy. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Hellman-Feynman Theorem (V) If we have an approximate eigenstate Y, for example from using an incomplete basis set, then we must keep all 3 terms in the general expression. If our basis set depends upon the ionic positions, such as atomic centred Gaussians, then the other derivatives in the general expression will contribute so-called Pulay forces (stresses). Note that Pulay forces (stresses) will vanish in the limit of a complete basis set, but that this is never realized in practice, or if position independent basis functions, such as plane-waves, are used. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Hellman-Feynman Theorem (VI) If we choose plane-waves as our basis functions, then because these functions are independent of the ionic coordinates, it can easily seen that the general expression for the forces becomes: Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Hellman-Feynman Theorem (VII) That is, we can calculate the forces using the same expansion coefficients as we used to variationally minimise the energy, using matrix elements of the ionic derivative of the Hamiltonian. This makes calculation of the forces relatively cheap once the variational energy minimisation has been completed if we are using a plane-wave basis set. Similar expressions can also be derived for the stresses. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Density Functional Theory (I) In DFT we have the Kohn-Sham Hamiltonian: Therefore we only get contributions to the forces from the electron-ion (pseudo)potential and the ion-ion Coulomb interaction (the Ewald sum). Also contribution from exchange-correlation potential if using non-linear core corrections. However, for the stresses, we also get a contribution from the kinetic energy and Hartree terms. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Density Functional Theory (II) As we do not have a complete basis, the wavefunction will not be exact even within DFT. If we use a variational method to minimize the total energy, then we know that the energy and hence the wavefunction will be correct to second order errors. However, the forces will only be correct to first order  need a larger basis set for accurate forces than for energies. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Density Functional Theory (III) However, if we use a non-variational minimisation technique, such as density mixing, then such statements cannot be made. We can no longer guarantee that the energy found is an upper-bound on the true ground state energy. This complicates the application of the Hellman-Feynman theorem. Consequently, non-variational forces and stresses are less reliable. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses CASTEP details (I) Forces and stresses are almost the highest level functionality Single subroutine call to first derivatives module is all that is required to return the forces for the current model if ground state is already known. Ditto stress. firstd puts together the different contributions to the force (stress) using other functional modules so the physics is obvious. These in turn call down to operations on charge densities and potentials. Even at this level the physics is obvious and the details of USPs etc are hidden. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses CASTEP details (II) The use of Ultra-Soft Pseudopotentials further complicates things, as there are now additional contributions to both the forces and the stresses from the charge augmentation. However, the modular design of new CASTEP completely hides this from the higher level programmer. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses CASTEP details (III) There is a problem with the application of the Hellman-Feynman theorem with non-variational minimisers Consequently the CASTEP code contains a first-order correction to the forces derived from density mixing. However, the corresponding correction to the stresses is not known. This has implications for structure optimisation and molecular dynamics with density mixing Therefore the more recent Ensemble DFT approach (which is fully variational) is to be preferred. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses CASTEP details (IV) If the unit cell changes shape then the number of plane-waves and the FFT grid will, at some point, change discontinuously. Consequently, it becomes difficult to compare results at different cell sizes at the same nominal basis set size (cut-off energy) as the effective quality of the basis set is not the same, unless the basis set is fully converged (impossible). This can be countered by using the Finite Basis Set Correction, which calculates the change in total energy upon changing the basis set size at a fixed cell size, and then uses this to correct the total energy and stress at nearby cell sizes. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses Symmetry If the symmetry of the system has been calculated (controlled by keyword in input file) then this can be used to symmetrise the forces and stresses. This ensures that the forces (stresses) have the same symmetry as the model. Consequently, the symmetry of the system will be preserved in any structural relaxation or dynamics. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses User Constraints (I) Sometimes it is desired to impose additional constraints on any structural relaxation or dynamics. Currently, CASTEP can apply any arbitrary number of linear constraints on the atomic coordinates, up to the number of degrees of freedom. E.g. fixing an atom, constraining an atom to move in a line or plane, fixing the relative positions of pairs of atoms, fixing the centre of mass of the system, etc. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses User Constraints (II) Both force and stress constraints work in the same way – by Lagrange multipliers in the extended Lagrangian of the system: So for a given set of constraints S(q) we need to know the derivatives of the constraints and then if we can determine l we have the constraint force. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

User Constraints (III) Linear constraints for the ionic motion makes the matrix of constraint derivatives trivial and therefore determining l: Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses User Constraints (IV) If we have multiple constraints, S(q), R(q), etc. then we may satisfy each constraint simultaneously if the constraint matrices are all mutually orthogonal and so we use Gram-Schmidt on the coefficients. With non-linear constraints, both the constraints and their derivatives need to be specified, and it is not possible in general to satisfy them all simultaneously. Consequently, iterative procedures such as SHAKE or RATTLE are required. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses User Constraints (V) Constraints can also be applied to the unit cell lengths and angles (giving 6 degrees of freedom). Any length (angle) can be held constant, or tied to one or both of the others. This is most useful if only a subset of the symmetries of the original unit cell is to be enforced. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses User Constraints (VI) Cell constraints are implemented in a slightly different way. The stress tensor is transformed from its normal symmetric representation in Cartesian coordinates into the space of cell lengths and angles. There is then a 1:1 correspondence between the stress components and the cell degrees of freedom and so the constraints may be trivially applied to the stress and hence to the evolution of the system. Nuts and Bolts 2001 Lecture 14: Forces and Stresses

Lecture 14: Forces and Stresses Conclusion Hellman-Feynman Theorem gives us a simple recipe for calculating ab initio forces and stresses plane-wave basis has big advantage DFT implementation Can be combined with symmetry and/or constraints Major use in structural relaxation and molecular dynamics Nuts and Bolts 2001 Lecture 14: Forces and Stresses