Example: barber

LAMMPS Features and Capabilities

LAMMPS Features and CapabilitiesSteve PlimptonSandia National Users and Developers WorkshopInternational Centre for Theoretical Physics (ICTP)March 2014 - Trieste, ItalyPresentation: SAND2014-2239 CClassical MD in a nutshellLAMMPS from 10,000 metersLarge-scale Atomic/Molecular Massively Parallel MD codeOpen source, portable C++3-legged stool: soft matter, solids, mesoscaleParticle simulator at varying length and time scaleselectrons atomistic coarse-grained continuumSpatial-decomposition of simulation domain for parallelismMD, non-equilibrium MD, energy minimizationGPU and OpenMP enhancedCan be coupled to other scales: QM, kMC, FE, CFD, .. LAMMPS from 10,000 metersLarge-scale Atomic/Molecular Massively Parallel MD codeOpen source, portable C++3-legged stool: soft matter, solids, mesoscaleParticle simulator at varying length and time scaleselectrons atomistic coarse-grained continuumSpatial-decomposition of simulation domain for parallelismMD, non-equilibrium MD

Structure of typical input scripts 1 Unitsandatom style 2 Create simulationboxandatoms region, create box, create atoms, region commands lattice command vs box units read data command data le is a text le

Tags:

  Script

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of LAMMPS Features and Capabilities

1 LAMMPS Features and CapabilitiesSteve PlimptonSandia National Users and Developers WorkshopInternational Centre for Theoretical Physics (ICTP)March 2014 - Trieste, ItalyPresentation: SAND2014-2239 CClassical MD in a nutshellLAMMPS from 10,000 metersLarge-scale Atomic/Molecular Massively Parallel MD codeOpen source, portable C++3-legged stool: soft matter, solids, mesoscaleParticle simulator at varying length and time scaleselectrons atomistic coarse-grained continuumSpatial-decomposition of simulation domain for parallelismMD, non-equilibrium MD, energy minimizationGPU and OpenMP enhancedCan be coupled to other scales: QM, kMC, FE, CFD, .. LAMMPS from 10,000 metersLarge-scale Atomic/Molecular Massively Parallel MD codeOpen source, portable C++3-legged stool: soft matter, solids, mesoscaleParticle simulator at varying length and time scaleselectrons atomistic coarse-grained continuumSpatial-decomposition of simulation domain for parallelismMD, non-equilibrium MD, energy minimizationGPU and OpenMP enhancedCan be coupled to other scales: QM, kMC, FE, CFD.

2 Reasons to use LAMMPS1 Versatilebio, materials, mesoscaleatomistic, coarse-grained, continuumuse with other codes, multiscale models2 Good parallel performance3 Easy to extendTuesday AM - Modifying & Extending LAMMPSW ednesday PM - Hands-on: Writing new code for LAMMPS4 Well documentedextensive web site1300 page manual5 Active and supportive user community45K postings to mail list, 1500 subscribersquick turn-around on Qs posted to mail listResources for learning LAMMPSE xamples: about 35 sub-dirs under examples in distroManual: , Commands, Packages, AcceleratingHowto, Modifying, ErrorsAlphabetized command list: one doc page per site: , Movies - examples of others workPapers - find a paper similar to what you want to modelWorkshops - slides from LAMMPS simulation talksMail list: search it, post to slides (more info than I can probably present!)

3 Structure of typical input scripts1 Units and atom style2 Create simulation box and atomsregion, createbox, createatoms, region commandslattice command vs box unitsreaddata commanddata file is a text filelook at examples/ readdata doc page for full syntax3 Define groups4 Set attributes of atoms: mass, velocity5 Pair style for atom interactions6 Fixes for time integration and constraints7 Computes for diagnostics8 Output: thermo, dump, restart9 Run or minimize10 Rinse and repeat ( script executed one command at a time)Debugging an input scriptLAMMPS tries hard to flag many kinds of errors and warnings1If an input command generates the error ..% lmplinux -echo screen< the doc page for the command2 For input, setup, run-time errors.

4 Search for text of error messagealso for warnings, they are usually importantif specific input command causes problems,look for IMPORTANT NOTE info on doc pagelook in the source code file at the line number3 Search the mail list, others may have similar problemgoogle for: LAMMPS -users fix npt, or error message4 Remember: an input script is like a programstart with small systemsstart with one processorturn-on complexity one command at a timemonitor thermo output, viz the results (use dump image)Debugging an input scriptLAMMPS tries hard to flag many kinds of errors and warnings1If an input command generates the error ..% lmplinux -echo screen< the doc page for the command2 For input, setup, run-time errors.

5 Search for text of error messagealso for warnings, they are usually importantif specific input command causes problems,look for IMPORTANT NOTE info on doc pagelook in the source code file at the line number3 Search the mail list, others may have similar problemgoogle for: LAMMPS -users fix npt, or error message4 Remember: an input script is like a programstart with small systemsstart with one processorturn-on complexity one command at a timemonitor thermo output, viz the results (use dump image)Debug by examining screen outputLAMMPS (15 Aug 2013)Lattice spacing in x,y,z = orthogonal box = (0 0 )to ( )4 by 1 by 1 MPI processor gridCreated 840 atoms120 atoms in group lower120 atoms in group upper240 atoms in group boundary600 atoms in group flowSetting atom values.

6 120 settings made for typeSetting atom values ..120 settings made for typeDeleted 36 atoms, new total = 804 Deleted 35 atoms, new total = 769 Thermodynamic outputLook for blow-ups or NaNs, print every step if necessaryWARNING: Temperature for thermo pressure is notfor group all (.. :436)Setting up run ..Memory usage per processor = MbytesStep Temp Epair Emol TotEng Press Volume0 0 0 1 0 1 0 1 0 1 0 time of on 4 procs for25000 steps with 769 atomsTiming infoLoop time of on 4 procs for25000 steps with 769 atomsPair time (%) = ( )Neigh time (%) = ( )Comm time (%) = ( )Outpt time (%) = ( )Other time (%) = ( )Run statisticsPer-processor values at end of runNlocal: ave 242 max 159 minHistogram: 2 0 0 0 0 1 0 0 0 1 Nghost: 43 ave 45 max 39 minHistogram: 1 0 0 0 0 0 0 0 2 1 Neighs: 414 ave 588 max 284 minHistogram.

7 2 0 0 0 0 0 1 0 0 1 Total # of neighbors = 1656 Ave neighs/atom = list builds = 1641 Dangerous builds = 1 Debug by visualization - what does your system do?Dump image for instant displayMac PreviewMake/view a movieImageMagickconvert *.jpg in browseropen -a Safari QuickTimeopen image sequenceWindows Media PlayerVMD, AtomEye, ..Defining variables in input scriptsStyles: index, loop, equal, atom, ..variable x index run1 run2 run3 run4variable x loop 100variable x equal trap(fJJ[3])*${scale}variable x atom -(cp[1]+cp[2]+cp[3])/(3*vol)Formulas can be complexsee keywords (temp, press, ..)math operators & functions (sqrt, log, cos, ..)group and region functions (count, xcm, fcm.)

8 Various special functions (min, ave, trap, stride, stagger, ..)per-atom vectors (x, vx, fx, ..)output from computes, fixes, other variablesFormulas can be time- and/or spatially-dependentDefining variables in input scriptsStyles: index, loop, equal, atom, ..variable x index run1 run2 run3 run4variable x loop 100variable x equal trap(fJJ[3])*${scale}variable x atom -(cp[1]+cp[2]+cp[3])/(3*vol)Formulas can be complexsee keywords (temp, press, ..)math operators & functions (sqrt, log, cos, ..)group and region functions (count, xcm, fcm, ..)various special functions (min, ave, trap, stride, stagger, ..)per-atom vectors (x, vx, fx, ..)output from computes, fixes, other variablesFormulas can be time- and/or spatially-dependentUsing variables in input scriptsSubstitute in any command via $x or ${myVar}Can define them as command-line arguments% lmplinux -v myTemp < in next command to increment a variablewith jump command to create loopsMany commands allow them as argumentsfix addforce vfy every vcountregion sphere vradiusAllows time- and spatially-dependent commandsPower tools for input scriptsFilename options:dump.

9 *.% for per-snapshot or per-processor outputreaddata *If/then/else via if commandInsert another script via include commanduseful for long list of parametersLooping via next and jump commandseasy to run incrementally and stop when condition metsee examples on jump command doc pageInvoke a shell command or external programshell cd subdir1shell myanalyze $n ${param}Various ways to run multiple simulations from one scriptsee Sectionhowto of manualPower tools for input scriptsFilename options:dump.*.% for per-snapshot or per-processor outputreaddata *If/then/else via if commandInsert another script via include commanduseful for long list of parametersLooping via next and jump commandseasy to run incrementally and stop when condition metsee examples on jump command doc pageInvoke a shell command or external programshell cd subdir1shell myanalyze $n ${param}Various ways to run multiple simulations from one scriptsee Sectionhowto of manualExample script for multiple runsvariable r equal random(1,1000000000,58798)variable a loop 8variable t index log.

10 $aread all create $t $rfix 1 all nvt $t $t 1 all atom 1000 dump.$a.*run 100000next tnext ajump 8 simulations on 3 partitions until finished:change a,t to universe-style variables% mpirun -np 12 lmplinux -p 3x4 -in script for multiple runsvariable r equal random(1,1000000000,58798)variable a loop 8variable t index log.$aread all create $t $rfix 1 all nvt $t $t 1 all atom 1000 dump.$a.*run 100000next tnext ajump 8 simulations on 3 partitions until finished:change a,t to universe-style variables% mpirun -np 12 lmplinux -p 3x4 -in systems: a pre-processing taskIn general, can be a hard problem!Molecular topology is an input to LAMMPSget it from a builder, massage into LAMMPS formatauto-magical assignment of force-fields is also hardLAMMPS includes some basic pre-processors (tools dir)bead-spring chain builderch2lmp = PDB to LAMMPS converteramber2lmp = AMBER to LAMMPS convertermsi2lmp = Accelrys to LAMMPS converter3rd party builders and force-field generatorsVMD TopoTools, Avogodro, PackMol, MoltemplateVotca for CG force-field Carlo builders and force-field assignmentTowhee (configurational bias) & othersBe willing to write system-building scripts yourselfBuilding systems: a pre-processing taskIn general, can be a hard problem!


Related search queries