1几种常见的优化方法电子结构几何机构函数稳定点最小点Taylor展开:V(x)=V(xk)+(x-xk)V’(xk)+1/2(x-xk)2V’’(xk)+…..当x是3N个变量的时候,V’(xk)成为3Nx1的向量,而V’’(xk)成为3Nx3N的矩阵,矩阵元如:jixxVHessian21.一阶梯度法a.SteepestdescendentSk=-gk/|gk|directiongradient知道了方向,如何确定步长呢?最常用的是先选择任意步长l,然后在计算中调节kkkkSXXl1用体系的能量作为外界衡量标准,能量升高了则逐步减小步长。robust,butslow最速下降法3最陡下降法(SD)4b.ConjugateGradient(CG)共轭梯度1kkkkvgvl第k步的方向11kkkkkggggl标量UsuallymoreefficientthanSD,alsorobust不需要外界能量等作为衡量量利用了上一步的信息52。二阶梯度方法这类方法很多,最简单的称为Newton-Raphson方法,而最常用的是Quasi-Newton方法。Newton抯methodforfindinganextremepointisxk+1=xk-H-1(xk)y(xk)Quasi-Newton方法:useanapproximationoftheinverseHessian.Formofapproximationdiffersamongmethods牛顿-拉夫逊法BFGSmethodBroyden-Fletcher-Golfarb-ShannoDFPmethodDavidon-Fletcher-Powell6Moleculardynamics分子动力学HistoryItwasnotuntil1964thatMDwasusedtostudyarealisticmolecularsystem,inwhichtheatomsinteractedviaaLennard-Jonespotential.Afterthispoint,MDtechniquesdevelopedrapidlytoencompassdiatomicspecies,water(whichisstillthesubjectofcurrentresearchtoday!),smallrigidmolecules,flexiblehydrocarbonsandnowevenmacromoleculessuchasproteinsandDNA.Theseareallexamplesofcontinuousdynamicalsimulations,andthewayinwhichtheatomicmotioniscalculatedisquitedifferentfromthatinimpulsivesimulationscontaininghard-corerepulsions.7WhatcanwedowithMD–CalculateequilibriumconfigurationalpropertiesinasimilarfashiontoMC.–Studytransportproperties(e.g.mean-squareddisplacementanddiffusioncoefficients).–MDintheNVT,NpTandNpHensembles–Theunitedatomapproximation–ConstraintdynamicsandSHAKE–Rigidbodydynamics–MultipletimestepalgorithmsExtendthebasicMDalgorithm8‘Impulsive’moleculardynamics1.Dynamicsofperfectly‘hard’particlescanbesolvedexactly,butprocessbecomesinvolvedformanypart(N-bodyproblem).2.Canuseanumericalschemethatadvancesthesystemforwardintimeuntilacollisionoccurs.3.Velocitiesofcollidingparticles(usuallyapair!)thenrecalculatedandsystemputintomotionagain.4.Simulationproceedsbyfitsandstarts,withameantimebetweencollisionsrelatedtotheaveragekineticenergyoftheparticles.5.Potentiallyveryefficientalgorithm,butcollisionsbetweenparticlesofcomplexshapearenoteasytosolve,andcannotbegeneralisedtocontinuouspotentials.9Continuoustimemoleculardynamics1.Bycalculatingthederivativeofamacromolecularforcefield,wecanfindtheforcesoneachatomasafunctionofitsposition.2.Requireamethodofevolvingthepositionsoftheparticlesinspaceandtimetoproducea‘true’dynamicaltrajectory.3.StandardtechniqueistosolveNewton’sequationsofmotionnumerically,usingsomefinitedifferencescheme,whichisknownasintegration.4.ThismeansthatweadvancethesystembysomesmalltimestepΔt,recalculatetheforcesandvelocities,andthenrepeattheprocessiteratively.5.ProvidedΔtissmallenough,thisproducesanacceptableapproximatesolutiontothecontinuousequationsofmotion.10ExampleofintegratorforMDsimulation•OneofthemostpopularandwidelyusedintegratorsistheVerletleapfrogmethod:positionsandvelocitiesofparticlesaresuccessively‘leap-frogged’overeachotherusingaccelerationscalculatedfromforcefield.•TheVerletschemehastheadvantageofhighprecision(oforderΔt4),whichmeansthatalongertimestepcanbeusedforagivenleveloffluctuations.•Themethodalsoenjoysverylowdrift,providedanappropriatetimestepandforcecut-offareused.r(t+Dt)=r(t)+v(t+Dt/2)Dtv(t+Dt/2)=v(t-Dt/2)+a(t+Dt/2)Dt11OtherintegratorsforMDsimulations•AlthoughtheVerletleapfrogmethodisnotparticularlyfast,thisisrelativelyunimportantbecausethetimerequiredforintegrationisusuallytrivialincomparisontothetimerequiredfortheforcecalculations.•Themostimportantconcernforanintegratoristhatitexhibitslowdrift,i.e.thatthetotalenergyfluctuatesaboutsomeconstantvalue.Anecessary(butnotsufficient)conditionforthisisthatitissymplectic.•Crudelyspeaking,thismeansthatitshouldbetimereversible(likeNewton’sequations),i.e.ifwereversethemomentaofallparticlesatagiveninstant,thesystemshouldtracebackalongitsprevioustrajectory.12OtherintegratorsforMDsimulations•TheVerletmethodissymplectic,butmethodssuchaspredictor-correctorschemesarenot.•Non-symplecticmethodsgenerallyhaveproblemswithlongtermenergyconservation.•Havingachievedlowdrift,wouldalsoliketheenergyfluctuationsforagiventimesteptobeaslowaspossible.•Alwaysdesirabletousethelargesttimesteppossible.•Ingeneral,thetrajectoriesproducedbyintegrationwilldivergeexponentiallyfromtheirtruecontinuouspathsduetotheLyapunovinstability.•However,thisdoesnotconcernusgreatly,asthethermalsamplingisunaffected⇒expectationvaluesunchanged.13Choosingthecorrecttimestep…1.Thechoiceoftimestepiscrucial:tooshortandphasespaceissampledinefficiently,toolongandtheenergywillfluctuatewildlyandthesimulationmaybecomecatastrophicallyunstable(“blowup”).2.Theinstabilitiesarecausedbythemotionofatomsbeingextrapolatedintoregionswherethepotentialenergyisprohibitivelyhigh(e.g.atomsoverlapping).3.Agoodruleofthumbisthatwhensimulatinganatomicfluid,thetimestepshouldbecomparabletothemeantimebetweencollisions(about5fsforArat298K).4.Forflexiblemolecules,thetimestepshouldbeanorderofmagnitudelessthantheperiodofthefastestmotion(usuallybondstretching:C—Haround10fssouse1fs).14ForclassicMD,therecouldbemanytr