几种常见的优化方法课件_第1页
几种常见的优化方法课件_第2页
几种常见的优化方法课件_第3页
几种常见的优化方法课件_第4页
几种常见的优化方法课件_第5页
已阅读5页,还剩24页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

几种常见的优化方法电子结构几何机构函数稳定点最小点Taylor展开:V(x)=V(xk)+(x-xk)V’(xk)+1/2(x-xk)2V’’(xk)+…..当x是3N个变量的时候,V’(xk)成为3Nx1的向量,而V’’(xk)成为3Nx3N的矩阵,矩阵元如:Hessian1几种常见的优化方法电子结构函数稳定点Taylor展开:当x一阶梯度法a.SteepestdescendentSk=-gk/|gk|directiongradient知道了方向,如何确定步长呢?最常用的是先选择任意步长l,然后在计算中调节用体系的能量作为外界衡量标准,能量升高了则逐步减小步长。robust,butslow最速下降法2一阶梯度法Sk=-gk/|gk|directi最陡下降法(SD)

3最陡下降法(SD)3b.ConjugateGradient(CG)共轭梯度第k步的方向标量UsuallymoreefficientthanSD,alsorobust不需要外界能量等作为衡量量利用了上一步的信息4b.ConjugateGradient(CG)共轭2。二阶梯度方法这类方法很多,最简单的称为Newton-Raphson方法,而最常用的是Quasi-Newton方法。Quasi-Newton方法:useanapproximationoftheinverseHessian.Formofapproximationdiffersamongmethods牛顿-拉夫逊法BFGSmethodBroyden-Fletcher-Golfarb-ShannoDFPmethodDavidon-Fletcher-Powell52。二阶梯度方法这类方法很多,最简单的称为Newton-RaMoleculardynamics分子动力学HistoryItwasnotuntil1964thatMDwasusedtostudyarealisticmolecularsystem,inwhichtheatomsinteractedviaaLennard-Jonespotential.Afterthispoint,MDtechniquesdevelopedrapidlytoencompassdiatomicspecies,water(whichisstillthesubjectofcurrentresearchtoday!),smallrigidmolecules,flexiblehydrocarbonsandnowevenmacromoleculessuchasproteinsandDNA.Theseareallexamplesofcontinuousdynamicalsimulations,andthewayinwhichtheatomicmotioniscalculatedisquitedifferentfromthatinimpulsivesimulationscontaininghard-corerepulsions.6Moleculardynamics分子动力学HistWhatcanwedowithMD–CalculateequilibriumconfigurationalpropertiesinasimilarfashiontoMC.–Studytransportproperties(e.g.mean-squareddisplacementanddiffusioncoefficients).–MDintheNVT,NpTandNpHensembles–Theunitedatomapproximation–ConstraintdynamicsandSHAKE–Rigidbodydynamics–MultipletimestepalgorithmsExtendthebasicMDalgorithm7WhatcanwedowithMD–Calcul‘Impulsive’moleculardynamics

1.Dynamicsofperfectly‘hard’particlescanbesolvedexactly,butprocessbecomesinvolvedformanypart(N-bodyproblem).2.Canuseanumericalschemethatadvancesthesystemforwardintimeuntilacollisionoccurs. 3.Velocitiesofcollidingparticles(usuallyapair!)thenrecalculatedandsystemputintomotionagain.4.Simulationproceedsbyfitsandstarts,withameantimebetweencollisionsrelatedtotheaveragekineticenergyoftheparticles.5.Potentiallyveryefficientalgorithm,butcollisionsbetweenparticlesofcomplexshapearenoteasytosolve,andcannotbegeneralisedtocontinuouspotentials. 88Continuoustimemoleculardynamics1.Bycalculatingthederivativeofamacromolecularforcefield,wecanfindtheforcesoneachatomasafunctionofitsposition.2.Requireamethodofevolvingthepositionsoftheparticlesinspaceandtimetoproducea‘true’dynamicaltrajectory.3.StandardtechniqueistosolveNewton’sequationsofmotionnumerically,usingsomefinitedifferencescheme,whichisknownasintegration.4.ThismeansthatweadvancethesystembysomesmalltimestepΔt,recalculatetheforcesandvelocities,andthenrepeattheprocessiteratively.5.ProvidedΔtissmallenough,thisproducesanacceptableapproximatesolutiontothecontinuousequationsofmotion.9ContinuoustimemoleculardynaExampleofintegratorforMDsimulationOneofthemostpopularandwidelyusedintegratorsistheVerletleapfrogmethod: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)Dt10ExampleofintegratorforMDsOtherintegratorsforMDsimulationsAlthoughtheVerletleapfrogmethodisnotparticularlyfast,thisisrelativelyunimportantbecausethetimerequiredforintegrationisusuallytrivialincomparisontothetimerequiredfortheforcecalculations.Themostimportantconcernforanintegratoristhatitexhibitslowdrift,i.e.thatthetotalenergyfluctuatesaboutsomeconstantvalue.Anecessary(butnotsufficient)conditionforthisisthatitissymplectic.Crudelyspeaking,thismeansthatitshouldbetimereversible(likeNewton’sequations),i.e.ifwereversethemomentaofallparticlesatagiveninstant,thesystemshouldtracebackalongitsprevioustrajectory.11OtherintegratorsforMDsimulOtherintegratorsforMDsimulationsTheVerletmethodissymplectic,butmethodssuchaspredictor-correctorschemesarenot.Non-symplecticmethodsgenerallyhaveproblemswithlongtermenergyconservation.Havingachievedlowdrift,wouldalsoliketheenergyfluctuationsforagiventimesteptobeaslowaspossible.Alwaysdesirabletousethelargesttimesteppossible.Ingeneral,thetrajectoriesproducedbyintegrationwilldivergeexponentiallyfromtheirtruecontinuouspathsduetotheLyapunovinstability.However,thisdoesnotconcernusgreatly,asthethermalsamplingisunaffected⇒expectationvaluesunchanged.12OtherintegratorsforMDsimulChoosingthecorrecttimestep…1.

Thechoiceoftimestepiscrucial:tooshortandphasespaceissampledinefficiently,toolongandtheenergywillfluctuatewildlyandthesimulationmaybecomecatastrophicallyunstable(“blowup”).2.Theinstabilitiesarecausedbythemotionofatomsbeingextrapolatedintoregionswherethepotentialenergyisprohibitivelyhigh(e.g.atomsoverlapping).3.Agoodruleofthumbisthatwhensimulatinganatomicfluid,thetimestepshouldbecomparabletothemeantimebetweencollisions(about5fsforArat298K).4.Forflexiblemolecules,thetimestepshouldbeanorderofmagnitudelessthantheperiodofthefastestmotion(usuallybondstretching:C—Haround10fssouse1fs).13ChoosingthecorrecttimestepForclassicMD,therecouldbemanytrickstospeedupcalculations,allcenteringaroundreducingtheeffortinvolvedinthecalculationoftheinteratomicforces,asthisisgenerallymuchmoretime-consumingthanintegration.ForexampleTruncatethelong-rangeforces:charge-charge,charge-dipoleLook-uptablesForfirstprinciplesMD,asforcesareevaluatedfromquantummechanics,weareonlyconcernedwiththetime-step.14ForclassicMD,therecouldbeBecausetheinteractionsarecompletelyelasticandpairwiseacting,bothenergyandmomentumareconserved.Therefore,MDnaturallysamplesfromthemicrocanonicalorNVEensemble.Asmentionedpreviously,theNVEensembleisnotveryusefulforstudyingrealsystems.Wewouldliketobeabletosimulatesystemsatconstanttemperatureorconstantpressure.ThesimplestMD,likeverletmethod,isadeterministicsimulationtechniqueforevolvingsystemstoequilibriumbysolvingNewton’slawsnumerically.15BecausetheinteractionsarecMDindifferentthermodynamicensemblesInthislecture,wewilldiscusswaysofusingMDtosamplefromdifferentthermodynamicensembles,whichareidentifiedbytheirconservedquantities.

Canonical(NVT)–Fixednumberofparticles,totalvolumeandtemperature.Requirestheparticlestointeractwithathermostat.

Isobaric-isothermal(NpT)–Fixednumberofparticles,pressureandtemperature.Requiresparticlestointeractwithathermostatandbarostat.

Isobaric-isenthalpic(NpH)–Fixednumberofparticles,pressureandenthalpy.Unusual,butrequiresparticlestointeractwithabarostatonly.16MDindifferentthermodynamicAdvancedapplicationsofMDWewillthenstudysomemoreadvancedMDmethodsthataredesignedspecificallytospeedup,ormakepossible,thesimulationoflargescalemacromolecularsystems.Allthesemethodsshareacommonprinciple:theyfreezeout,ordecouple,thehighfrequencydegreesoffreedom.Thisenablestheuseofalargertimestepwithoutnumericalinstability.Thesemethodsinclude:–Unitedatomapproximation–ConstraintdynamicsandSHAKE–Rigidbodydynamics–Multipletimestepalgorithms17AdvancedapplicationsofMD17RevisionofNVEMDLet’sstartbyrevisinghowtodoNVEMD.Recallthatwecalculatedtheforcesonallatomsfromthederivativeoftheforcefield,thenintegratedthee.o.m.usingafinitedifferenceschemewithsometimestepΔt.Wethenrecalculatedtheforcesontheatoms,andrepeatedtheprocesstogenerateadynamicaltrajectoryintheNVEensemble.Becausethemeankineticenergyisconstant,theaveragekinetictemperatureTKisalsoconstant.However,inthermalequilibrium,weknowthatinstantaneousTKwillfluctuate.IfwewanttosamplefromtheNVTensemble,weshouldkeepthestatisticaltemperatureconstant.18RevisionofNVEMD18ExtendedLagrangiansThereareessentiallytwowaystokeepthestatisticaltemperatureconstant,andthereforesamplefromthetrueNVTensemble.–Stochastically,usinghybridMC/MDmethods–Dynamically,viaanextendedLagrangianWewilldescribethelattermethodinthislectureAnextendedLagrangianissimplyawayofincludingadegreeoffreedomwhichrepresentsthereservoir,andthencarryingoutasimulationonthisextendedsystem.Energycanflowdynamicallybackandforthfromthereservoir,whichhasacertainthermal‘inertia’associatedwithit.AllwehavetodoisaddsometermstoNewton’sequationsofmotionforthesystem.19ExtendedLagrangians19ExtendedLagrangiansThestandardLagrangianLiswrittenasthedifferenceofthekineticandpotentialenergies:Newton’slawsthenfollowbysubstitutingthisintotheEuler-Lagrangeequation:Newton’sequationsandLagrangianformalismareequivalent,butthelatterusesgeneralisedcoordinates...20ExtendedLagrangians..20CanonicalMDSo,ourextendedLagrangianincludesanextracoordinateζ,whichisafrictionalcoefficientthatevolvesintimesoastominimisethedifferencebetweentheinstantaneouskineticandstatisticaltemperatures.Themodifiedequationsofmotionare:TheconservedquantityistheHelmholtzfreeenergy.(modifiedformofNewtonII)21CanonicalMD(modifiedformofCanonicalMDByadjustingthethermostatrelaxationtimetT

(usuallyintherange0.5to2ps)thesimulationwillreachanequilibriumstatewithconstantstatisticaltemperatureTS.TSisnowaparameterofoursystem,asopposedtothemeasuredinstantaneousvalueofTKwhichfluctuatesaccordingtotheamountofthermalenergyinthesystematanyparticulartime.ToohighavalueoftTandenergywillflowveryslowlybetweenthesystemandthereservoir(overdamped).ToolowavalueoftTandtemperaturewilloscillateaboutitsequilibriumvalue(underdamped).ThisistheNosé-Hooverthermostatmethod.22CanonicalMD22CanonicalMDTherearemanyothermethodsforachievingconstanttemperature,butnotallofthemsamplefromthetrueNVTensembleduetoalackofmicroscopicreversibility.Wecallthesepseudo-NVTmethods,andtheyinclude:–BerendsenmethodVelocitiesarerescaleddeterministicallyaftereachstepsothatthesystemisforcedtowardsthedesiredtemperature–GaussianconstraintsMakesthekineticenergyaconstantofthemotionbyminimisingtheleastsquaresdifferencebetweentheNewtonianandconstrainedtrajectoriesThesemethodsareoftenfaster,butonlyconvergeonthetruecanonicalaveragepropertiesasO(1/N).23CanonicalMD23Isothermal-isobaricMDWecanapplytheextendedLagrangianapproachtosimulationsatconstantpressurebysimplyaddingyetanothercoordinatetooursystem.Weuseη,whichisafrictionalcoefficientthatevolvesintimetominimisethedifferencebetweentheinstantaneouspressurep(t),measuredbyavirialexpression,andthepressureofanexternalreservoirpext.TheequationsofmotionforthesystemcanthenbeobtainedbysubstitutingthemodifiedLagrangianintotheEuler-Lagrangeequations.Thesenowincludetworelaxationtimes:oneforthethermostattT,andoneforthebarostattp.24Isothermal-isobaricMD24Isothermal-isobaricMDTheisknownastheNosé-Hoovermethod(Melchionnatype)andtheequationsofmotionare:25Isothermal-isobaricMD25Isothermal-isobaricMD26Isothermal-isobaricMD26Constraintdynamicsfreezethebondstretchingmotionsofthehydrogens(oranyotherbond,inprinciple).Weapplyasetofholonomicconstraintstothesystem,whichar

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论