Intro Dft Castep

download Intro Dft Castep

If you can't read please download the document

Transcript of Intro Dft Castep

IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPIntroduction to rst-principles modelling andCASTEPPhil HasnipDepartment of PhysicsUniversity of YorkIntro to DFT + CASTEPIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPAtomistic SimulationsIf we know what the bonding in a material is beforehand,then we can often nd good expressions for the forcesbetween atoms, e.g.Ionic electrostatic potentialsCovalent directional potentials, e.g. Stillinger-WeberMetallic Bond Order Potentials, EAM...Van der Waals Born-Mayer, Lennard-Jones...These potentials can do a good job of computing themechanical properties of materials.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPAtomistic SimulationsThese forceeld potentials do have problems:Usually parameterised for bulk equilibrium behaviourParameterised for particular class of materialsCannot handle bond breaking or formationCannot provide electronic information, so nopredictions ofResistanceThermal conductivityColourIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPFirst Principles SimulationsWe want to be able to predict what atoms will do from rstprinciples, without needing to know what theyll dobeforehand! We can do this using quantum mechanics.Unfortunately, quantum mechanics is difcult!IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsWe want to solve the Schrdinger equation. For 1-particleits:_ 22m2+ V_ (r, t ) = i (r, t )tNow we just have to solve it for a real material.How hard can it be?IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPThe horror.... the horror...For M nuclei and N electrons:_

22_2n1m1+ ... + 2nMmM,2e1m + ... + 2eNm_+V (R1, ..., RM, r1, ..., rN, t )_ (R1, ..., RM, r1, ..., rN, t )= i (R1, ..., RM, r1, ..., rN, t )tHow big are M and N? For a few grams of material:M 100, 000, 000, 000, 000, 000, 000, 000N 1000, 000, 000, 000, 000, 000, 000, 000Oh dear.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPThe horror.... the horror...For M nuclei and N electrons:_

22_2n1m1+ ... + 2nMmM,2e1m + ... + 2eNm_+V (R1, ..., RM, r1, ..., rN, t )_ (R1, ..., RM, r1, ..., rN, t )= i (R1, ..., RM, r1, ..., rN, t )tHow big are M and N? For a few grams of material:M 100, 000, 000, 000, 000, 000, 000, 000N 1000, 000, 000, 000, 000, 000, 000, 000Oh dear.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPThe horror.... the horror...For M nuclei and N electrons:_

22_2n1m1+ ... + 2nMmM,2e1m + ... + 2eNm_+V (R1, ..., RM, r1, ..., rN, t )_ (R1, ..., RM, r1, ..., rN, t )= i (R1, ..., RM, r1, ..., rN, t )tHow big are M and N? For a few grams of material:M 100, 000, 000, 000, 000, 000, 000, 000N 1000, 000, 000, 000, 000, 000, 000, 000Oh dear.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPQM for the electronsNuclei are heavy, slow and boringno QM for nucleiElectrons are light, quick and interestingNuclei appear staticNo explicit time-dependence for electronsThis is the Born-Oppenheimer approximation. (R1, ..., RM, r1, ..., rN, t ) (r1, ..., rN)Now we can solve the time-independent Schrdingerequation.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure Simulations_ 22m_21 + ... +2N_+ V (R1, ..., RM, r1, ..., rN)_ (r1, ..., rN) = E (r1, ..., rN)Hmm, looks a bit like an eigenvalue problem...Still have N 1023though.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPConcentrate on the groundstateMaterials properties are dominated by the groundstateFor the groundstate we can use a different form of QMDensity Functional TheoryIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPDensity Functional TheoryThe groundstate energy E and density (r) of electrons areexactly the same as those of non-interacting particles in aspecially modied potential.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPDensity Functional TheorySolve N non-interacting Schrdinger equations:_ 22m2+ V [] (r)_j (r) = jj (r)V [] is a density functional.(r) =N

j =1|j(r)|2We dont know V [] exactly, but there are reasonableapproximations available.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPDensity Functional TheoryWe know the classical contributions to V [], e.g.EH [] (r) = 12__ (r) (r

)|r r

|but what about QM exchange and electron correlation? Wehave to approximate this exchange-correlation functional:Local density approximation (LDA)Tends to over-bind.In your param le use xc_functional : LDAGeneralised gradient approximations (GGAs) PBE isthe most popular. Tends to under-bind.In your param le use xc_functional : PBEThese approximations do not handle dynamic correlationwell, e.g. no van der Waals or Cooper pairs...IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPThe story so far...Started with time-dependent 1023-electron-nuclearwavefunctionBorn-Oppenheimer approximationtime-independent, 1023-electron wavefunctionDFT 10231-electron wavefunctionsIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPCrystals and Unit CellsIn the solid state, most materials like to have their atomsarranged in some kind of regular, repeating pattern, e.g.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPCrystals and Unit CellsIn the solid state, most materials like to have their atomsarranged in some kind of regular, repeating pattern, e.g.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPBlochs TheoremIf the nuclei are arranged in a periodically repeating pattern,their potential acting on the electrons must also be periodic.V(r +L) = V(r)where L is any lattice vector.What does this mean for the density and wavefunction?IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPBlochs TheoremIf the potential is periodic, then so is the density:(r +L) = (r)What about the wavefunction?(r) = |(r)|2i.e. if (r) is periodic, so is the magnitude of thewavefunction.Remember wavefunctions are complex; their magnitude isperiodic, but their phase can be anything.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPBlochs TheoremIf the potential is periodic, then so is the density:(r +L) = (r)What about the wavefunction?(r) = |(r)|2i.e. if (r) is periodic, so is the magnitude of thewavefunction.Remember wavefunctions are complex; their magnitude isperiodic, but their phase can be anything.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPBlochs TheoremBlochs theorem: in a periodic potential, the density has thesame periodicity. The possible wavefunctions are allquasi-periodic:k(r) = ei k.ruk(r),where uk(r +L) = uk(r), and ei k.ris an arbitrary phasefactor.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPBrillouin zone samplingThere are solutions for any k general solution is integralover Brillouin zone.We approximate this integral by a sum over discrete k;these k-points form a regular 3D grid in reciprocal space.In your cell le use one of:kpoint_mp_grid 5 5 5 kpoint_mp_spacing 0.04Always need to ensure we have enough k-points toapproximate the integral well.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPk-point convergenceIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPExploiting periodicityOnly compute j(r) and (r) in a single unit cellNo longer have 1023wavefunctions, more like 102Now computing energy per unit cellIn fact because weve exploited the periodicity, in some wayswere now calculating for an innite number of electrons!IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPElectronic Structure SimulationsHow can we make quantum mechanics easier forourselves?Only use QM for the electronsConcentrate on the groundstateExploit periodicity of crystalsGet a computer to do itIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPBasis setsWe need to choose a suitable basis set to represent ourwavefunctions, but what should we choose...Points on a grid?Polynomials?Gaussians?Atomic orbitals?None of these reect the periodicity of our problem.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPPlane-wavesSince (r) is periodic, we express it as a 3D Fourier series(r) =

GcGei G.rwhere cG are complex Fourier coefcients, and the sum isover all wavevectors (spatial frequencies) with the rightperiodicity.Each is now a vector of coefcients cG.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPCut-off Energyei G.ris a plane-wave travelling perpendicular to GThere are an innite number of allowed GAs |G| , |cG| 0can truncate the Fourier expansion safelyIn your param le:cut_off_energy : 420 eVIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPCut-off EnergyIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPAn Eigenvalue Problem_ 22m2+ V [] (r)_j (r) = jj (r)j is a vector of num_pw Fourier coefcientsThe {...} is a num_pwnum_pw matrixjust an eigenvalue problem!Hj = jjIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPA Large Eigenvalue ProblemSolve using the variational principle:The groundstate energy E0 is the lowest possibleenergyAny wavefunction has energy E E0guess a wavefunction (cG)compute E = Htweak cG to lower EWhen we cant lower E any more, is the groundstate!IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPSteepest Descent DiagonalisationStarting with j, compute jCompute the gradient jjThis is the change to cG that increases j quickestWe want to decrease j, so use jj.Make a new guess eigenstate, newj = j jjVary until weve found the lowest j in this direction.This procedure is often called a line search.There are better methods than steepest descent, e.g.conjugate gradients.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPFinding the GroundstateIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPSample CASTEP outputIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPValence electrons and pseudopotentialsCore electrons do not affect materials properties.Compute core electronic states for isolated atomTreat nucleus and core electrons as single ionreplace nuclear potential with ionicpseudopotential.In your cell le:%block species_potCo Co_00.uspMn Mn_00.uspSi Si_00.usp%endblock species_potIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPFame and fortuneNow have all the tools we needCan nd solve DFT eq. for lowest N eigenstatesget energy and electron densityCan now predict:Crystal and molecular structureBond breaking and formationIR spectraReactivitiesColour, X-ray absorption, NMR spectra... and much more!IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPSummaryPredictive materials simulations need QM calculationsDFT reduces QM to a large, simple eigenvalue problemUse periodicity and pseudopotentials to improve speedNeed to converge wrt k-points and cut-off energyWith these tools we can predict a vast range of propertiesfor all kinds of materials and chemicals.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPcell leYour simulation system; important keywords are:Lattice%block lattice_abc2.4 2.4 3.590 90 120%endblock lattice_abcor %block lattice_cart1.2000000 -2.0784610 0.00000001.2000000 2.0784610 0.00000000.0000000 0.0000000 3.0000000%endblock lattice_cartIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPcell leAtomic positions%block positions_fracC 0.000000 0.00000 0.5C 0.333333 0.66667 0.5%endblock positions_frac(or %block positions_abs for absolutecoordinates; units on 1st line)Pseudopotentials%block species_potC C_00.recpot%endblock species_potIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPcell lek-pointskpoint_mp_grid nkx nky nkzorkpoint_mp_spacing k-dist unitor%block kpoint_mp_listkx ky kz weight%endblock kpoint_mp_listIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPcell leSymmetrysymmetry_generatesnap_to_symmetryGeometry optimisationfix_all_ions : falseDo not x the ionic positions. fix_all_cell :falseDo not x the cell lattice parameters.IntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPparam leWhat you want to do. Important keywords are:Tasktask: singlepointtask: geometryoptimisationtask: elnesCalculationspin_polarized : true nextra_bands : 25Approximationsxc_functional : ldacut_off_energy : 500 eVIntroductionDFTBlochsTheoremPlane-wavesAn eigenvalueproblemSummaryCASTEPMore informationhttp://www.castep.orgLots of information including talks, tutorials anddocumentation.http://www.jiscmail.ac.uk/lists/CASTEP.htmlThe CASTEP email list (website includes archives).castep -help Returns information about that particular CASTEPkeyword (if it exists).castep -help search Searches the CASTEP keyword descriptions for alloccurrences of the keyword.