A molecular dynamics primer.docx
《A molecular dynamics primer.docx》由会员分享,可在线阅读,更多相关《A molecular dynamics primer.docx(65页珍藏版)》请在冰点文库上搜索。
Amoleculardynamicsprimer
Amoleculardynamicsprimer
FurioErcolessi
UniversityofUdine,Italy
WWW:
http:
//www.fisica.uniud.it/~ercolessi/
Contents
∙Contents
∙Introduction
oTheroleofcomputerexperiments
▪Butisittheoryorexperiment?
oWhatismoleculardynamics?
oHistoricalnotes
oToday'sroleofmoleculardynamics
oLimitations
▪Useofclassicalforces
▪Realismofforces
▪Timeandsizelimitations
∙Thebasicmachinery
oModelingthephysicalsystem
▪TheLennard-Jonespotential
▪Potentialtruncationandlong-rangecorrections
oPeriodicboundaryconditions
▪Theminimumimagecriterion
▪Geometrieswithsurfaces
oTimeintegrationalgorithm
▪TheVerletalgorithm
▪Predictor-correctoralgorithm
∙Running,measuring,analyzing
oStartingasimulation
▪Startingfromscratch
▪Continuingasimulation
oControllingthesystem
oEquilibration
oLookingattheatoms
oSimplestatisticalquantitiestomeasure
▪Potentialenergy
▪Kineticenergy
▪Totalenergy
▪Temperature
▪Thecaloriccurve
▪Meansquaredisplacement
▪Pressure
oMeasuringthemeltingtemperature
oRealspacecorrelations
oReciprocalspacecorrelations
oDynamicalanalysis
oAnnealingandquenching:
MDasanoptimizationtool
oOtherstatisticalensembles
∙Interatomicpotentials
oTheBorn-Oppenheimerapproximation
oThedesignofpotentials
oTheproblemswithtwo-bodypotentials
oMany-bodypotentialsformetals
oMany-bodypotentialsforsemiconductors
▪TheStillinger-Weberpotential
▪TheTersoffpotential
oLong-rangeforces
oButdowereallyneedpotentials?
oFittingtoabinitiodataby``forcematching''
∙Choosinghardwareandsoftware
oWhatkindofcomputer?
▪Selectingacomputerformoleculardynamics
▪Storagespace
oWhatlanguage?
▪Highlevellanguages
▪FortranorC?
∙References
Introduction
Theroleofcomputerexperiments
Computerexperimentsplayaveryimportantroleinsciencetoday.Inthepast,physicalscienceswerecharacterizedbyaninterplaybetweenexperimentandtheory.Inexperiment,asystemissubjectedtomeasurements,andresults,expressedinnumericform,areobtained.Intheory,amodelofthesystemisconstructed,usuallyintheformofasetofmathematicalequations.Themodelisthenvalidatedbyitsabilitytodescribethesystembehaviorinafewselectedcases,simpleenoughtoallowasolutiontobecomputedfromtheequations.Inmanycases,thisimpliesaconsiderableamountofsimplificationinordertoeliminateallthecomplexitiesinvariablyassociatedwithrealworldproblems,andmaketheproblemsolvable.
Inthepast,theoreticalmodelscouldbeeasilytestedonlyinafewsimple``specialcircumstances''.So,forinstance,incondensedmatterphysicsamodelforintermolecularforcesinaspecificmaterialcouldbeverifiedinadiatomicmolecule,orinaperfect,infinitecrystal.Eventhen,approximationswereoftenrequiredtocarryoutthecalculation.Unfortunately,manyphysicalproblemsofextremeinterest(bothacademicandpractical)falloutsidetherealmofthese``specialcircumstances''.Amongthem,onecouldmentionthephysicsandchemistryofdefects,surfaces,clustersofatoms,organicmolecules,involvingalargeamountofdegreesoffreedom;anaccuratetreatmentoftemperatureeffects,includinganharmonicitiesandphasetransitions;disorderedsystemsingeneral,wheresymmetryisofnohelptosimplifythetreatment;andsoon.
Theadventofhighspeedcomputers--whichstartedtobeusedinthe50s--alteredthepicturebyinsertinganewelementrightinbetweenexperimentandtheory:
thecomputerexperiment.Inacomputerexperiment,amodelisstillprovidedbytheorists,butthecalculationsarecarriedoutbythemachinebyfollowinga``recipe''(thealgorithm,implementedinasuitableprogramminglanguage).Inthisway,complexitycanbeintroduced(stillwithcaution!
)andmorerealisticsystemscanbeinvestigated,openingaroadtowardsabetterunderstandingofrealexperiments.
Needlesstosay,thedevelopmentofcomputerexperimentsalteredsubstantiallythetraditionalrelationshipbetweentheoryandexperiment.Ononeside,computersimulationsincreasedthedemandforaccuracyofthemodels.Forinstance,amoleculardynamicssimulationallowstoevaluatethemeltingtemperatureofamaterial,modeledbymeansofacertaininteractionlaw.Thisisadifficulttestforthetheoreticalmodeltopass--andatestwhichhasnotbeenavailableinthepast.Therefore,simulation``bringstolife''themodels,disclosingcriticalareasandprovidingsuggestionstoimprovethem.
Ontheotherside,simulationcanoftencomeveryclosetoexperimentalconditions,totheextentthatcomputerresultscansometimesbecompareddirectlywithexperimentalresults.Whenthishappens,simulationbecomesanextremelypowerfultoolnotonlytounderstandandinterprettheexperimentsatthemicroscopiclevel,butalsotostudyregionswhicharenotaccessibleexperimentally,orwhichwouldimplyveryexpensiveexperiments,suchasunderextremelyhighpressure.
Lastbutnotleast,computersimulationsallowthoughtexperiments--thingswhicharejustimpossibletodoinreality,butwhoseoutcomegreatlyincreasesourunderstandingofphenomena--toberealized.Fantasyandcreativityareimportantqualitiesforthecomputersimulator!
Butisittheoryorexperiment?
Simulationisseensometimesastheory,sometimesasexperiment.Ononeside,wearestilldealingwithmodels,notwiththe``realthing'':
thissuggeststoclassifysimulationasbelongingtotheoreticalmethodswithouthesitation.Ontheotherside,theprocedureofverifyingamodelbycomputersimulationresemblesanexperimentquiteclosely:
weperformarun,andthenanalyzetheresultsinprettymuchthesamewayasexperimentalphysicistsdo.Sohowshouldweclassifysimulation?
Thereisnosharpanswertothisquestion:
bothsidesrepresentlegitimatepointofviews,andthisiswhatmakescomputationalscienceabranchonitsown.Thereishoweveranotherimportantconsideration.
Theoryistraditionallybasedonthereductionisticapproach:
wedealwithcomplexitybyreducingasystemtosimplersubsystems,continuinguntilthesubsystemsaresimpleenoughtoberepresentedwithsolvablemodels.Whenwelookatsimulationassimplyapracticaltoolto``verifyandtest''modelsinsituationswhicharetoocomplextohandleanalytically(forexample,whencomputingthephasediagramofasubstancemodeledbyacertainforcelaw),weareimplicitlyassumingthatthemodelrepresentsthe``theorylevel''wheretheinterestisfocused.
Butitisimportanttorealizethatsimulationmayplayamoreimportantandinterestingrole.Wecanconsideritnotasanaidtoreductionismbut--tosomeextent--asanalternativetoit.Simulationincreasesthethresholdofcomplexitywhichseparates``solvable''and``unsolvable''models.Wecantakeadvantageofthisthresholdshiftandmoveuponelevelinourdescriptionofphysicalsystems.Thankstothepresenceofsimulation,wedonotneedtoworkwithmodelsassimpleasthoseusedinthepast.Thisgivesusanadditionaldegreeoffreedomtoexploreandopensentirelynewpossibilities.
Oneexampleofthispointofviewisrepresentedbyinteratomicpotentials.Inthepast,interactionswereobtainedbytwo-bodypotentialswithsimpleanalyticalform,suchasMorseorLennard-Jones.Today,themostaccuratepotentialscontainmany-bodytermsandaredeterminednumericallybyreproducingascloselyaspossibleforcespredictedbyfirst-principlemethods(thisisdiscussedin4.8).Wehavethusmoveduponelevelinthedegreeofreductionismcontainedinthepotential,nowlimitedonlytotheselectionofitsanalyticalform.Theadvantageisofcourseamuchbetterrealism,whichinturnallowsinvestigationofphysicsproblemwhichrequirealevelofaccuracyinthemodelthatwasnotachievedbefore.Thesenewpotentialscouldnotexistwithoutsimulation:
simulationisnotonlyalinkbetweenexperimentandtheory,itisalsoapowefultooltopropelprogressinnewdirections.
Thereaderinterestedinthese``philosophical''aspectsofcomputationalsciencecanfindaveryenjoyablediscussioninchapter1ofref.[6].
Whatismoleculardynamics?
Wecallmoleculardynamics(MD)acomputersimulationtechniquewherethetimeevolutionofasetofinteractingatomsisfollowedbyintegratingtheirequationsofmotion.
Inmoleculardynamicswefollowthelawsofclassicalmechanics,andmostnotablyNewton'slaw:
(1)
foreachatomiinasystemconstitutedbyNatoms.Here,miistheatommass,
itsacceleration,and
theforceactinguponit,duetotheinteractionswithotheratoms.Therefore,incontrastwiththeMonteCarlomethod,moleculardynamicsisadeterministictechnique:
givenaninitialsetofpositionsandvelocities,thesubsequenttimeevolutionisinprinciple
completelydetermined.Inmorepictorialterms,atomswill``move''intothecomputer,bumpingintoeachother,wanderingaround(ifthesystemisfluid),oscillatinginwavesinconcertwiththeirneighbors,perhapsevaporatingawayfromthesystemifthereisafreesurface,andsoon,inawayprettysimilartowhatatomsinarealsubstancewoulddo.
Thecomputercalculatesatrajectoryina6N-dimensionalphasespace(3Npositionsand3Nmomenta).However,suchtrajectoryisusuallynotparticularlyrelevantbyitself.Moleculardynamicsisastatisticalmechanicsmethod.LikeMonteCarlo,itisawaytoobtainasetofconfigurationsdistributedaccordingtosomestatisticaldistributionfunction,orstatisticalensemble.Anexampleisthemicrocanon