Molecular DynamicsSimulations
Dr. Kasra Momeniwww.KNanoSys.com
PI: K. Momeni
Outline• LAMMPS
AdHiMad Lab 2
PI: K. Momeni
What is LAMMPS?• LMMPS=Large-scaleAtomic/MolecularMassivelyParallelSimulator• Open-Source(http://lammps.sandia.gov)• RunningclassicMD(althoughothercodeshaveimplementedinLAMMPSasitevolved,suchasquasi-continuummethods)
• Itutilizesparallelizationalgorithmstospeedupthesimulations• Differentfeature:MD,non-equilibriumMD,energyminimization• Abilitytorunondifferentparallelizationplatforms(GraphicProcessingUnits(GPU),MPI,OpenMP)
• Abilitytoconnecttootherscales:quantummechanics,kineticMonteCarlo,FiniteElement,...
AdHiMad Lab 3
PI: K. Momeni
LAMMPS Feature• Extendible• Extensivedocuments/tutorials• Strongusercommunity(mailinglist:http://lammps.sandia.gov/mail.html)• Extensiveexamples• Workshops• Textbased(usingascriptinglanguagetosetupthesimulations)- Nographics- Notinteractive- Linebylinerun
AdHiMad Lab 4
PI: K. Momeni
Structure of LAMMPS Scripts• DefinetheUnitsandatomattributes• Createsimulationcellandpositionatomsinthecell• Definegroupsofatoms(thathavethesameproperty)• Setpropertiesofatoms(velocityandmass)• Defineatomicinteractions• Definethesystemconstraints• Definethepropertiesofinterest(Youneedtodefinetheanalysisyouinterestedbeforerunningsimulations,thereislimitedpostprocessing)
• Settheoutputperiodsofthesimulation• Performingthesimulation
AdHiMad Lab 5
PI: K. Momeni
Flow Chart of Running LAMMPS• CommandforrunningLAMMPS
• Singleprocessorrun:
LAMMPSexecutable<inputfile• Multipleprocessor(parallel)run:
mpirun -np8LAMMPSexecutable<inputfile
AdHiMad Lab 6
PreparingInputFile(s)
RunningLAMMPS(Passingthescriptfile)
lmp <input_file.in
CollectingOutputFile(s)
AnalyzingOutputFile(s)–usingin-housecodesorothers(OVITO,VMD)
PI: K. Momeni
LAMMPS Common Commands – Initialization • Pleasetakealookatonlinedocumentationofeachcommandformoredetails• clear
• clearsallmemory• units
• unitsthatwillbeusedforthesimulation• dimension
• Dimensionofthesimulationcell• boundary
• Periodicornon-periodicboundaryconditions• atom_style
• Determinesattributesassociatedwiththeatoms.• atom_modify
• ModifycertainattributesofatomsdefinedandstoredwithinLAMMPS(otherthanwhatisspecifiedbythe atom_style )
AdHiMad Lab 7
PI: K. Momeni
LAMMPS Common Commands – Initialization • lattice
• Typeoflattice(fcc,bcc,hcp,etc. )
• region• Specifiesthesimulationcelldimension/geometry
• create_box• Createsthesimulationboxusingthedimensionsofregion
• create_atoms• Createsatoms(ormolecules)onalattice
• replicate• replicatetheperiodiccellineachdirection
AdHiMad Lab 8
PI: K. Momeni
LAMMPS Common Commands – Initialization • pair_style
• Specifiestheinteratomicpotential
• pair_coeff• Specifythepairwiseforcefieldcoefficients
• neighbor• setsparametersthataffectthebuildingofpairwiseneighborlists
• neigh_modify• Setstheparametersofpairwiseneighborlists
• compute• Definevariablestostorecertaincalculations
AdHiMad Lab 9
PI: K. Momeni
LAMMPS Common Commands – Running • reset_timestep
• Resetstimestep• fix
• Setssystemconstrains• thermo
• specifiestheoutputduringtherun• thermo_style
• specifieswhattypeofoutput• min_style
• specifiesminimizationtechnique• minimize
• startstheminimization
AdHiMad Lab 10
PI: K. Momeni
LAMMPS Common Commands – Post Process• variable
• Definesvariables
• print• Printtextorvalueofavariabel
AdHiMad Lab 11
PI: K. Momeni
Practice Problem • PerformthesimulationsofHomework2usingLAMMPS
AdHiMad Lab 12
PI: K. Momeni
Useful Links • LAMMPSTutorials
• http://lammps.sandia.gov/tutorials.html• https://scent.gist.ac.kr/downloads/tutorial/2012/1/Lammps_Tutorial_20120706.pdf
• http://www.u.arizona.edu/~stefanb/Files/HPCTutorials/MD-lammps-Final.pdf• http://zqex.dk/index.php/teaching/lammps-demo
• Manymoreareavailableonline
AdHiMad Lab 13
PI: K. Momeni AdHiMad Lab 14
Questions
Top Related