Forces: Calculatig Them, ad Usig Them Shobhaa Narasimha JNCASR, Bagalore, Idia shobhaa@jcasr.ac.i Shobhaa Narasimha, JNCASR 1
Outlie Forces ad the Hellma-Feyma Theorem Stress Techiques for miimizig a fuctio Geometric optimizatio usig forces Froze Phoo Calculatios Molecular Dyamics with forces Shobhaa Narasimha, JNCASR 2
The Bor-Oppeheimer Approimatio Ma Bor (1882-1970 R. Oppeheimer (1904-1967 Shobhaa Narasimha, JNCASR 3
The Bor-Oppeheimer Approimatio The may-particle wavefuctio y is a fuctio of both uclear ad electroic coordiates. Separate out the Hamiltoia ito a uclear ad electroic part. The wavefuctio ca the be writte as: tot y y uc elec OK because electros are much lighter tha uclei ad therefore respod istatly o time-scale of uclear motio. Shobhaa Narasimha, JNCASR 4
Forces Need for geometry optimizatio ad molecular dyamics. Ca also use to get phoos. Could get as fiite differeces of total eergy - too epesive! Use force (Hellma-Feyma theorem. Richard Feyma s Seior Thesis! (whe he was 21 Shobhaa Narasimha, JNCASR 5
Hellma-Feyma Theorem Wat to calculate force o io I: Get three terms: Whe is a eigestate, -Substitute this Shobhaa Narasimha, JNCASR 6
Hellma-Feyma Theorem Wat to calculate force o io I: Get three terms: Whe is a eigestate, -Substitute this Shobhaa Narasimha, JNCASR 7
Hellma-Feyma Theorem Wat to calculate force o io I: Get three terms: Whe is a eigestate, -Substitute this Shobhaa Narasimha, JNCASR 8
Hellma-Feyma Theorem (cotd. The force is ow give by Note that we ca ow calculate the force from a calculatio at ONE cofiguratio aloe huge savigs i time. If the basis depeds o ioic positios (ot true for plae waves, would have etra terms = Pulay forces. If is ot a eact eigestate (electroic calculatio ot well coverged, may get big errors i forces calculated usig this prescriptio! Shobhaa Narasimha, JNCASR 9
Hellma-Feyma Theorem (cotd. The force is ow give by Note that we ca ow calculate the force from a calculatio at ONE cofiguratio aloe huge savigs i time. If the basis depeds o ioic positios (ot true for plae waves, would have etra terms = Pulay forces. If is ot a eact eigestate (electroic calculatio ot well coverged, may get big errors i forces calculated usig this prescriptio! Shobhaa Narasimha, JNCASR 10
Hellma-Feyma Theorem (cotd. The force is ow give by Note that we ca ow calculate the force from a calculatio at ONE cofiguratio aloe huge savigs i time. If the basis depeds o ioic positios (ot true for plae waves, would have etra terms = Pulay forces. If is ot a eact eigestate (electroic calculatio ot well coverged, may get big errors i forces calculated usig this prescriptio! Shobhaa Narasimha, JNCASR 11
Usig H-F Theorem i a (plae-wave DFT calculatio Force o io I give by: where =(pseudopotetial due to io cores ad = iteractio of ios with each other. Shobhaa Narasimha, JNCASR 12
Strai: Stress Stress: Stress Theorem (Nielse & Marti, 1985 as for forces, ca calculate at a sigle cofiguratio. What if the primitive lattice vectors (specifyig uit cell are ot optimal? - Forces o atoms may = 0 (e.g., a FCC crystal with wrog lattice costat - Stress will ot be zero, however. < 0 cell would like to epad. > 0 cell would like to cotract. Shobhaa Narasimha, JNCASR 13
Geometric Optimizatio Wat to move the atomic positios aroud util the lowest-eergy equilibrium cofiguratio is obtaied. At equilibrium, for all I. We are searchig for a miimum i a 3N I -dim space. Fidig global miimum is hard! Will usually ed up i earest miimum Shobhaa Narasimha, JNCASR 14
Miimizatio Relevat to may parts of DFT calculatios: - Optimizig ioic positios - Miimizig eergy fuctioal - Diagoalizig Hamiltoia - Achievig self-cosistecy (miig A brief foray ito umerical methods. Covetio: subscripts coordiates, superscripts iteratios Shobhaa Narasimha, JNCASR 15
Miimizatio i 1-D usig gradiets Cosider a fuctio f(; we wat to fid 0, the value of where the fuctio has its miimum value. Iterative methods: successive approimatios 1, 2, 3, 0 Ca take several small dowhill steps, i the directio opposite the gradiet f (. '( 1 ( f Might take a log time to coverge. Note: eed first derivatives Shobhaa Narasimha, JNCASR 16
Fidig zeroes i 1-D: the Newto-Raphso Method Use iformatio from first derivatives to make a series of guesses: f( f '( f ( 0 1 1 f ( f '( Note: will coverge i oe step if f is liear +1 Shobhaa Narasimha, JNCASR 17
Fidig miimum i 1-D: the Newto-Raphso Method Lookig for a miimum i f is equivalet to lookig for a zero of f. So replace f by f ad f by f to get: or sometimes: 1 1 f '( f "( f '( f "( Note: eed first derivatives ad secod derivatives Note: will coverge i oe step if f is liear. So will coverge i oe step if f is quadratic. Shobhaa Narasimha, JNCASR 18
Miimizatio i a N-d space Cosider a fuctio f( of N variables = 1, 2,, N The gradiet is f(. Note that at a give, this poits i directio of maimum icrease of f(. Wat to fid 0 s.t. f( has its miimum value at 0, i.e., f( 0 = 0. Will fid iteratively, through a sequece of poits i the N-dimesioal space that are steppig stoes to fidig 0. Covetio: subscripts coordiates, superscripts iteratios. Shobhaa Narasimha, JNCASR 19
Steepest Descet Keep goig dowhill i directio opposite local gradiet. Could try takig lots of little dowhill steps: +1 = f( = + g Always, g perpedicular to g +1. Better: Oce directio g idetified, do lie miimizatio alog it. Ca be slow (may ot reach miimum! Problem: whe movig alog ew directio, lose some miimizatio alog old oe(s. Shobhaa Narasimha, JNCASR 20
Secod derivatives i a N-d space: The Hessia is a NN matri, whose elemets are give by: H ij 2 f ( / i j It gives iformatio about the curvature of the fuctio. Shobhaa Narasimha, JNCASR 21
Newto-Raphso Miimizatio i N-d 1-d N-d f f( 1/f H -1 1 f '( f "( [ H( ] f ( 1 1 Need to compute gradiets ad iverse Hessias Shobhaa Narasimha, JNCASR 22
Quasi-Newto-Raphso Methods We had: [ H( ] f ( 1 1 But H -1 may be hard/epesive to compute directly. Istead, build up estimates for H -1 by aalyzig successive gradiet vectors. Various prescriptios for doig this, e.g., Broyde method, BFGS method. Shobhaa Narasimha, JNCASR 23
Shobhaa Narasimha, JNCASR 24 BFGS Miimizatio Broyde, Fletcher, Goldfarb, Shao (1970. ( ] [ ( ] [ 1 1 1 f f H H T T T T T T T γ s s γ H H γ s γ s s s γ s γ H γ H H ( ( ( ( ( ( ( 1 1 1 1 1 1 1 Trust radius Iverse Hessia approimated as: where ( ( 1 f f γ ad ( ] ( [ 1 f H s (No doubt you will agree that this is a good poit at which to ed our foray ito umerical methods Newto-Raphso
Back to the Problem of Ioic Relaatio Fuctio f to be miimized is total eergy E tot. Poits i 3N I -d space correspod to set of ioic coordiates ( 1, y 1, z 1, 2, y 2, z 2, NI, y NI, z NI. Gradiets f( correspod to set of 3 compoets of forces o the N I ios. Forces ca be computed usig Hellma-Feyma theorem. Now use a miimizatio scheme to fid the ioic positios that give the lowest value of E tot, which is also whe the forces o all ios are (close to zero. Shobhaa Narasimha, JNCASR 25
A Outer Loop: Ioic Relaatio Move ios Ier SCF loop for electroic iteratios Outer loop for ioic iteratios Shobhaa Narasimha, JNCASR Shobhaa Narasimha, Forces =0? Structure Optimized! 26
The Vibratioal Frequecy of a Diatomic Molecule Ca obtai from eergies or from forces: e.g., for CO: E 1 2 3 2 k O( F k O( 2 Saada Biswas Shobhaa Narasimha, JNCASR 27
Froze-Phoo Calculatios Take sapshots of a crystal as it is vibratig i a particular mode. Use Hellma-Feyma theorem to compute forces as a fuctio of displacemet. Force vs. displacemet gives phoo frequecy. Note: Ca istead use desity fuctioal perturbatio theory (someoe *might* cover later this week or et. Shobhaa Narasimha, JNCASR 28
The Force-Costat Tesor F a, (R i -R j force iduced o atom j i directio, upo movig atom i i directio a Ca be obtaied easily if forces ca be computed. Shobhaa Narasimha, JNCASR 29
Gettig Phoo Frequecies Dyamical Matri: ~ D( k k R e i R F( R Diagoalize to get phoo frequecies: Det ~ ~ 2 D( k M ( k 0 Shobhaa Narasimha, JNCASR 30
What else ca you do with forces? Newto s equatios of motio: F I m I a I m I 2 d R 2 dt I If forces ca be computed, ca itegrate these to get ioic positios as a fuctio of time. Molecular Dyamics (tomorrow Shobhaa Narasimha, JNCASR 31
Forces ad the Nudged Elastic Bad Forces ca also be used to fid trasitio states (saddle poits i the eergy ladscape, e.g., as doe i the udged elastic bad method. Sheppard, Terrell & Hekelma, J. Chem. Phys., 2008 Shobhaa Narasimha, JNCASR 32
Computig Forces & Stress with PWscf tprfor =.TRUE. (Set automatically if calculatio = rela or md or vc-md tstress =.TRUE. (Set automatically if calculatio = vc-md Shobhaa Narasimha, JNCASR 33
Forces Obtaied usig PWscf e.g., for a (urelaed poit defect (vacacy i graphee: Kacha Ulma Shobhaa Narasimha, JNCASR 34
Ioic Relaatio i PWscf Tell the program to carry out ioic relaatio, ad say which method to use to fid miimum &cotrol calculatio = rela. io_dyamics = bfgs &cotrol calculatio = md. io_dyamics = damp Shobhaa Narasimha, JNCASR 35
Ioic Relaatio i PWscf (cotd. Say which atoms are to be moved & i which directios. e.g., for a four-layer Al(001 slab: ATOMIC_POSITIONS Al 0.000 0.000 2.828 0 0 1 Al 0.500 0.500 2.121 0 0 1 Al 0.000 0.000 1.414 0 0 0 Al 0.500 0.500 0.707 0 0 0 Allow these atoms to move oly alog z Fi these atoms Shobhaa Narasimha, JNCASR 36
The Ed! May the Force Be With You. Shobhaa Narasimha, JNCASR 37