上海交通大學(xué)理論物理研究所馬紅孺.ppt
模擬物理導(dǎo)論,凝聚態(tài)物質(zhì)的數(shù)值模擬方法(V)馬紅孺,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Molecularsystems:,Inmostcasestheinteractionpartcanbeapproximatedbypairinteractions:,OnefamousexampleistheLennard-Jonespotential,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Averyimportantquantityinstatisticalmechanicsisthepaircorrelationfunctiong(r,r0),definedas,where,Itmayalsobewrittenas,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Forahomogeneoussystemthepaircorrelationfunctiondependsonlyonthedistancebetweenrandr0.Inthiscasewedenoteitasg(r).,Theg(r,r0)isproportionaltotheprobabilitythatgivenaparticleatpointrandfindanotherparticleatpointr0.Atlargedistanceg(r)tendsto1,wemaydefinethetotalcorrelationfunction,TheFouriertransformoftheabovefunctiongivesthestaticstructurefunction(orstructurefactor),2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,ThestructurefunctionisdefinedasthecorrelationfunctionofFouriercomponentofdensityfluctuations,Thedensityisdefinedas:,andthedensityfluctuationis:,anditsFouriercomponentis:,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,當(dāng)體積趨于無限時(shí),紅顏色的部分可以略去.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Thestructurefactorcanbemeasureddirectlybyscatteringexperimentsandcanalsobecalculatedbysimulations.,Manyphysicalquantitiescanbeexpressedintermsofthepaircorrelationfunctions,forexampletheenergyinNVTensembleis,Thepressureis,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Thecompressibility,Thisexpressioncanbederivedfromthefluctuationsofparticlenumbers,Sinceso,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Ontheotherhand,itcanbeprovedthat,Wehavethefinalresult.,Thetimecorrelationfunctionisthecorrelationsoftwophysicalquantitiesatdifferenttimes,Forsystemsatequilibriumthetimecorrelationfunctionisafunctionofthetimedifferenceonlyandcanbewrittenas,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Thevelocityautocorrelationfunctionoftheithparticleis,Thiscanbederivedfromthedefinition(wewillbacktothispoint),Whichisrelatedtothediffusionconstantoftheparticle.,whichholdsforlarget.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Ingeneral,transportcoefficientisdefinedintermsoftheresponseofasystemtoaperturbation.,whereisthetransportcoefficient,andAisaphysicalvariableappearingintheperturbationHamiltonian.ThereisalsoanEinsteinrelationassociatedwiththiskindofexpression,whichholdsforlarget,(t,whereistherelaxationtimeof).,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子模型,Theshearviscosityisgivenby,or,Here,ThenegativeofPisoftencalledstresstensor.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,MonteCarlo模擬,MonteCarlosimulationofParticleSystems,粒子系統(tǒng)的MonteCarlo模擬和自旋系統(tǒng)原則上是一樣的。Metropolis算法為:1,隨機(jī)或順序選取一個(gè)粒子,其位置矢量為,對(duì)此粒子做移動(dòng)2,計(jì)算前后的能量差,決定是否接受移動(dòng)。3,在達(dá)到平衡后,收集數(shù)據(jù),計(jì)算物理量。,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Moleculardynamicssimulations,MDmethodisessentiallytheintegrationoftheequationofmotionoftheclassicalmany-particlesysteminaperiodoftime.Thetrajectoriesofthesysteminthephasespacearethusobtainedandaveragesofthetrajectoriesgivevariousphysicalproperties.SinceweworkonrealdynamicsinMDsimulationswecanalsostudythedynamicpropertiesofthesystemsuchasrelaxationtoequilibrium,transportetc.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,ConsiderarectangularvolumeofL1L2L3,withNclassicalparticlesputin.Theparticlesareinteractwitheachother.Inprinciple,theinteractionincludepairinteractions,threebodyinteractionsaswellasmanybodyinteractions.Forsimplicitywewillconsiderhereonlypairinteractions.Inthiscaseeachparticlefeelaforcebyallotherparticlesandwefurtherassumetheforceisdependonlyondistancesfromotherparticlesandforeachpairtheforcedirectedalongthelinejointhepairofparticles.Sotheforceontheithparticleis,whereisanunitvectoralongrj-ri.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Periodicboundarycondition(PBC),whereLarevectorsalongtheedgesoftherectangularsystemvolumeandthesumoverniswithallintegersn.Usuallythissumisthemosttimeconsumingpartinasimulation.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,GeneralprocedureofMD(NVEensemble),1.Initialize;2.Startsimulationandletthesystemreachequilibrium;3.Continuesimulationandstoreresults.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Initialize:1,Specifythenumberofparticlesandinteraction;2,Setupthesimulationbox;3,Specifythetotalenergyofthesystem;4,Assignpositionandmomentaofeachparticle.a,InmanycasesweassignparticlesinaFCClattice,IfweusecubicunitcellandcubeBOXthenthenumberofparticlesperunitcellis4,andthetotalnumberofparticlesarea4M3,M=1,2,3,.ThatiswemaysimulationsystemswithtotalnumberofparticlesN=108,256,500,864,.,b,ThevelocitiesofparticlesaredrawfromaMaxwelldistributionwiththespecifiedtemperature.,ThisisaccomplishedbydrawingthethreecomponentsofthevelocityfromtheGaussiandistribution.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Thedistributionofthex-componentofvelocityis,DrawnumbersfromaGaussian:Consider:,Then,wherev2=vx2+vy2and,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Sothedistributionofvxandvymaybeobtainedfromvand.Thedistributionofv:,Thedistributionofisuniformintheinterval0,2.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Generaterandomnumbersforagivendistribution,ForagivendistributionP(y)weconsiderhowtogetarandomnumberydrawfromP(y)fromarandomnumberxdrawfromuniform0,1,i.e.,wearegoingtofindafunctionf(x),fromwhichforaseriesofrandomnumbersxdistributeduniformlyintheinterval0,1,y=f(x)willdistributedaccordingtoP(y).,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,then,Since,Exponentialdistribution,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Thedistributionofv:,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Drawrandomnumbersuniformlydistributedintheinterval0,2.,AnothermethodofdrawrandomnumbersintheGaussiandistributionisthroughthefollowingempiricalmethods.,Considerthedistribution,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Accordingtothecentrallimittheorem,ifwedrawuniformrandomnumbersriininterval0,1,anddefineavariable,whenn!1thedistributionofistheGaussiandistribution,Ifwetaken=12,weget,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Afterthegenerationofthevelocityofeachparticle,wemayshiftthevelocitysothatthetotalmomentumiszero.,ThestandardVerletalgorithmisthefirstsuccessfulmethodinhistoryandstillwideusedtodayindifferentforms.Itis,Tostarttheintegrationweneedr(h),givenby,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Variationsofthismethodare,and,Bothofthesevariationsaremathematicallyequivalenttotheoriginalonebutmorestableunderfiniteprecisionarithmetic.,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Thetemperatureofthesystemisgivenbytheequalpartitiontheorem,thatistheaverageofkineticenergyofeachdegreeoffreedomishalfkBT,TheN-1isduetotheconservationofthetotalmomentumwhichreducethedegreeoffreedomby3.,Toreachthedesiredtemperaturewemayscalethevelocityateveryfewstepsofintegration,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Afterthesystemreachtoequilibriumtheintegrationcontinueinthesamemethodasabovewithoutscalingofvelocity.Thedataarestoredoraccumulatedforthecalculatingphysicalproperties.ThestaticpropertiesofphysicalquantityAisgivenbytimeaverage,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,hereAisthevalueofAatthtimestep.Usuallythedatastoredineachstepinclude:,1,thekineticenergy2,thepotentialenergy3,thevirial,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,Wealsoneedsdatatocalculatethepaircorrelationfunction,thisisdonebydividetheinterval0,rintosubintervalsir,(i+1)r,ateachstageofupdating,addthenumberofpairswithseparationintheintervalir,(i+1)r,toanarrayn(i)andfindtheaveragevalueaftersimulation,thepaircorrelationfunctiongivenby,2003-10-21,上海交通大學(xué)理論物理研究所馬紅孺,分子動(dòng)力學(xué)模擬,練習(xí):1,WriteprogramsforthetwomethodstogenerateGuassianrandomnumbers.2,Comparethetwomethodsforefficiencyandquality.3,Generaterandomnumberswithexponentialdistributionbymeansofthetransformationmethoddescribedbeforeandcheckthequality.,