lammps users manual - xiamen universitycmp.xmu.edu.cn/lammps/manual.pdf · lammps users manual i....

Download LAMMPS Users Manual - Xiamen Universitycmp.xmu.edu.cn/lammps/Manual.pdf · LAMMPS Users Manual i. ... fix enforce2d command

If you can't read please download the document

Upload: doanquynh

Post on 07-Feb-2018

278 views

Category:

Documents


20 download

TRANSCRIPT

  • LAMMPS Users ManualLargescale Atomic/Molecular Massively Parallel Simulator

    http://lammps.sandia.gov Sandia National LaboratoriesCopyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.

  • Table of ContentsLAMMPS Documentation.............................................................................................................................11. Introduction................................................................................................................................................3

    1.1 What is LAMMPS.............................................................................................................................31.2 LAMMPS features.............................................................................................................................4General features.......................................................................................................................................4Particle and model types..........................................................................................................................4Force fields..............................................................................................................................................4Atom creation..........................................................................................................................................5Ensembles, constraints, and boundary conditions...................................................................................5Integrators................................................................................................................................................5Diagnostics..............................................................................................................................................6Output......................................................................................................................................................6Pre and postprocessing........................................................................................................................6Specialized features.................................................................................................................................61.3 LAMMPS nonfeatures....................................................................................................................61.4 Open source distribution....................................................................................................................81.5 Acknowledgments and citations........................................................................................................9

    2. Getting Started.........................................................................................................................................132.1 What's in the LAMMPS distribution...............................................................................................132.2 Making LAMMPS...........................................................................................................................142.3 Making LAMMPS with optional packages.....................................................................................172.4 Building LAMMPS as a library......................................................................................................202.5 Running LAMMPS.........................................................................................................................212.6 Commandline options...................................................................................................................222.7 LAMMPS screen output..................................................................................................................232.8 Running on GPUs............................................................................................................................24GPU hardware.......................................................................................................................................25GPU single vs double precision............................................................................................................25GPU Memory........................................................................................................................................252.9 Tips for users of previous LAMMPS versions................................................................................26

    3. Commands...............................................................................................................................................273.1 LAMMPS input script.....................................................................................................................273.2 Parsing rules....................................................................................................................................283.3 Input script structure........................................................................................................................283.4 Commands listed by category.........................................................................................................293.5 Individual commands......................................................................................................................30Fix styles................................................................................................................................................31Compute styles......................................................................................................................................31Pair_style potentials...............................................................................................................................31Bond_style potentials............................................................................................................................32Angle_style potentials...........................................................................................................................32Dihedral_style potentials.......................................................................................................................32Improper_style potentials......................................................................................................................33Kspace solvers.......................................................................................................................................33

    4. Howto discussions.................................................................................................................................344.1 Restarting a simulation....................................................................................................................344.2 2d simulations..................................................................................................................................354.3 CHARMM and AMBER force fields..............................................................................................36

    LAMMPS Users Manual

    i

  • Table of Contents4.4 Running multiple simulations from one input script.......................................................................364.5 Parallel tempering............................................................................................................................384.6 Granular models..............................................................................................................................384.7 TIP3P water model..........................................................................................................................394.8 TIP4P water model..........................................................................................................................404.9 SPC water model.............................................................................................................................414.10 Coupling LAMMPS to other codes...............................................................................................414.11 Visualizing LAMMPS snapshots..................................................................................................434.12 Nonorthogonal simulation boxes................................................................................................434.13 NEMD simulations........................................................................................................................444.14 Extended spherical and aspherical particles..................................................................................454.15 Output from LAMMPS (thermo, dumps, computes, fixes, variables)..........................................474.16 Thermostatting, barostatting, and computing temperature............................................................514.16 Walls..............................................................................................................................................53

    5. Example problems....................................................................................................................................556. Performance &scalability.........................................................................................................................577. Additional tools........................................................................................................................................58

    amber2lmp tool......................................................................................................................................58binary2txt tool.......................................................................................................................................59ch2lmp tool............................................................................................................................................59chain tool...............................................................................................................................................59data2xmovie tool...................................................................................................................................59eam generate tool...................................................................................................................................59lmp2arc tool...........................................................................................................................................60lmp2cfg tool...........................................................................................................................................60lmp2traj tool..........................................................................................................................................60lmp2vmd tool.........................................................................................................................................60matlab tool.............................................................................................................................................60micelle2d tool........................................................................................................................................61msi2lmp tool..........................................................................................................................................61pymol_asphere tool...............................................................................................................................61python tool.............................................................................................................................................61restart2data tool.....................................................................................................................................61thermo_extract tool................................................................................................................................62vim tool..................................................................................................................................................62xmovie tool............................................................................................................................................62

    8. Modifying &extending LAMMPS...........................................................................................................63Atom styles............................................................................................................................................64Bond, angle, dihedral, improper potentials...........................................................................................65Compute styles......................................................................................................................................66Dump styles...........................................................................................................................................66Dump custom output options.................................................................................................................66Fix styles................................................................................................................................................67Input script commands..........................................................................................................................68Kspace computations.............................................................................................................................68Minimization solvers.............................................................................................................................69Pairwise potentials.................................................................................................................................69Region styles.........................................................................................................................................70

    LAMMPS Users Manual

    ii

  • Table of ContentsThermodynamic output options.............................................................................................................70Variable options.....................................................................................................................................70Submitting new features to the developers to include in LAMMPS.....................................................71

    9. Errors........................................................................................................................................................739.1 Common problems..........................................................................................................................739.2 Reporting bugs.................................................................................................................................749.3 Error &warning messages...............................................................................................................74Errors:....................................................................................................................................................74Warnings:............................................................................................................................................120

    10. Future and history................................................................................................................................12510.1 Coming attractions.......................................................................................................................12510.2 Past versions................................................................................................................................125

    angle_style charmm command...................................................................................................................128angle_style class2 command......................................................................................................................129angle_style cg/cmm command...................................................................................................................131angle_coeff command................................................................................................................................132angle_style cosine command.....................................................................................................................134angle_style cosine/delta command.............................................................................................................135angle_style cosine/squared command........................................................................................................136angle_style harmonic command.................................................................................................................137angle_style hybrid command.....................................................................................................................138angle_style none command........................................................................................................................139angle_style command.................................................................................................................................140angle_style table command........................................................................................................................142atom_modify command.............................................................................................................................144atom_style command.................................................................................................................................146bond_style class2 command.......................................................................................................................148bond_coeff command.................................................................................................................................149bond_style fene command.........................................................................................................................151bond_style fene/expand command.............................................................................................................152bond_style harmonic command.................................................................................................................154bond_style hybrid command......................................................................................................................155bond_style morse command.......................................................................................................................156bond_style none command.........................................................................................................................157bond_style nonlinear command.................................................................................................................158bond_style quartic command.....................................................................................................................159bond_style command.................................................................................................................................161bond_style table command.........................................................................................................................163boundary command....................................................................................................................................165change_box command................................................................................................................................166clear command...........................................................................................................................................167communicate command.............................................................................................................................168compute command.....................................................................................................................................170compute ackland/atom command...............................................................................................................174compute angle/local command...................................................................................................................176compute bond/local command...................................................................................................................178compute centro/atom command.................................................................................................................180compute cna/atom command.....................................................................................................................182

    LAMMPS Users Manual

    iii

  • Table of Contentscompute com command.............................................................................................................................184compute com/molecule command.............................................................................................................185compute coord/atom command..................................................................................................................187compute damage/atom command...............................................................................................................188compute dihedral/local command..............................................................................................................189compute displace/atom command..............................................................................................................190compute erotate/asphere command............................................................................................................192compute erotate/sphere command..............................................................................................................193compute event/displace command.............................................................................................................194compute group/group command................................................................................................................195compute gyration command.......................................................................................................................196compute gyration/molecule command.......................................................................................................197compute heat/flux command......................................................................................................................199

    Sample LAMMPS input script............................................................................................................200compute improper/local command.............................................................................................................202compute ke command................................................................................................................................203compute ke/atom command.......................................................................................................................204compute_modify command........................................................................................................................205compute msd command.............................................................................................................................206compute msd/molecule command..............................................................................................................208compute pair/local command.....................................................................................................................210compute pe command................................................................................................................................212compute pe/atom command.......................................................................................................................214compute pressure command.......................................................................................................................216compute property/atom command.............................................................................................................218compute property/local command..............................................................................................................220compute property/molecule command.......................................................................................................222compute rdf command...............................................................................................................................223compute reduce command.........................................................................................................................225compute reduce/region command..............................................................................................................225compute stress/atom command..................................................................................................................228compute temp command............................................................................................................................230compute temp/asphere command...............................................................................................................232compute temp/com command....................................................................................................................234compute temp/deform command...............................................................................................................236compute temp/partial command.................................................................................................................238compute temp/profile command................................................................................................................240compute temp/ramp command...................................................................................................................242compute temp/region command.................................................................................................................244compute temp/sphere command.................................................................................................................246create_atoms command..............................................................................................................................248create_box command.................................................................................................................................250delete_atoms command..............................................................................................................................251delete_bonds command..............................................................................................................................253dielectric command....................................................................................................................................255dihedral_style charmm command..............................................................................................................256dihedral_style class2 command.................................................................................................................258dihedral_coeff command............................................................................................................................261

    LAMMPS Users Manual

    iv

  • Table of Contentsdihedral_style harmonic command............................................................................................................263dihedral_style helix command...................................................................................................................264dihedral_style hybrid command.................................................................................................................265dihedral_style multi/harmonic command...................................................................................................266dihedral_style none command...................................................................................................................267dihedral_style opls command.....................................................................................................................268dihedral_style command............................................................................................................................269dimension command..................................................................................................................................271dipole command.........................................................................................................................................272displace_atoms command..........................................................................................................................273displace_box command..............................................................................................................................275dump command..........................................................................................................................................278dump_modify command............................................................................................................................284echo command...........................................................................................................................................287fix command..............................................................................................................................................288fix addforce command...............................................................................................................................292fix atc command.........................................................................................................................................294fix ave/atom command...............................................................................................................................298fix ave/histo command...............................................................................................................................300fix ave/spatial command............................................................................................................................304fix ave/time command................................................................................................................................309fix aveforce command................................................................................................................................313fix bond/break command...........................................................................................................................315fix bond/create command...........................................................................................................................318fix bond/swap command............................................................................................................................321fix box/relax command..............................................................................................................................324fix deform command..................................................................................................................................327fix deposit command..................................................................................................................................333fix drag command......................................................................................................................................336fix dt/reset command..................................................................................................................................337fix efield command....................................................................................................................................339fix enforce2d command.............................................................................................................................340fix evaporate command..............................................................................................................................341fix freeze command....................................................................................................................................342fix gravity command..................................................................................................................................343fix heat command.......................................................................................................................................345fix imd command.......................................................................................................................................347fix indent command...................................................................................................................................349fix langevin command................................................................................................................................352fix lineforce command...............................................................................................................................355fix_modify command.................................................................................................................................356fix momentum command...........................................................................................................................357fix move command.....................................................................................................................................359fix nph command.......................................................................................................................................362fix npt command........................................................................................................................................365fix npt/asphere command...........................................................................................................................369fix npt/sphere command.............................................................................................................................373fix nve command........................................................................................................................................377

    LAMMPS Users Manual

    v

  • Table of Contentsfix nve/asphere command..........................................................................................................................378fix nve/limit command...............................................................................................................................379fix nve/noforce command..........................................................................................................................381fix nve/sphere command............................................................................................................................382fix nvt command........................................................................................................................................384fix nvt/asphere command...........................................................................................................................387fix nvt/sllod command...............................................................................................................................390fix nvt/sphere command.............................................................................................................................393fix orient/fcc command..............................................................................................................................396fix planeforce command.............................................................................................................................400fix poems....................................................................................................................................................401fix pour command......................................................................................................................................403fix press/berendsen command....................................................................................................................405fix print command......................................................................................................................................408fix reax/bonds command............................................................................................................................410fix recenter command.................................................................................................................................411fix rigid.......................................................................................................................................................413fix setforce command.................................................................................................................................417fix shake command....................................................................................................................................418fix smd command.......................................................................................................................................420fix spring command...................................................................................................................................423fix spring/rg command...............................................................................................................................425fix spring/self command.............................................................................................................................427fix store/coord command...........................................................................................................................428fix store/force command............................................................................................................................430fix temp/berendsen command....................................................................................................................431fix temp/rescale command.........................................................................................................................433fix thermal/conductivity command............................................................................................................435fix tmd command.......................................................................................................................................438fix ttm command........................................................................................................................................440fix viscosity command...............................................................................................................................443fix viscous command.................................................................................................................................446fix wall/lj93 command...............................................................................................................................448fix wall/lj126 command.............................................................................................................................448fix wall/colloid command..........................................................................................................................448fix wall/harmonic command......................................................................................................................448fix wall/gran command..............................................................................................................................452fix wall/reflect command...........................................................................................................................455fix wall/region command...........................................................................................................................457fix wiggle command...................................................................................................................................460group command..........................................................................................................................................461if command................................................................................................................................................463improper_style class2 command................................................................................................................465improper_coeff command..........................................................................................................................467improper_style cvff command...................................................................................................................469improper_style harmonic command...........................................................................................................470improper_style hybrid command...............................................................................................................471improper_style none command..................................................................................................................472

    LAMMPS Users Manual

    vi

  • Table of Contentsimproper_style command...........................................................................................................................473include command.......................................................................................................................................475jump command...........................................................................................................................................476kspace_modify command..........................................................................................................................478kspace_style command..............................................................................................................................480label command...........................................................................................................................................482lattice command.........................................................................................................................................483log command..............................................................................................................................................486mass command...........................................................................................................................................487min_modify command...............................................................................................................................489min_style command...................................................................................................................................490minimize command....................................................................................................................................491neigh_modify command............................................................................................................................494neighbor command.....................................................................................................................................497newton command.......................................................................................................................................499next command............................................................................................................................................500orient command..........................................................................................................................................502origin command.........................................................................................................................................503pair_style airebo command........................................................................................................................504pair_style born/coul/long command...........................................................................................................507pair_style buck command..........................................................................................................................509pair_style buck/coul/cut command............................................................................................................509pair_style buck/coul/long command..........................................................................................................509pair_style buck/coul command..................................................................................................................511pair_style lj/charmm/coul/charmm command...........................................................................................514pair_style lj/charmm/coul/charmm/implicit command..............................................................................514pair_style lj/charmm/coul/long command.................................................................................................514pair_style lj/charmm/coul/long/opt command...........................................................................................514pair_style lj/class2 command.....................................................................................................................517pair_style lj/class2/coul/cut command.......................................................................................................517pair_style lj/class2/coul/long command.....................................................................................................517pair_style cg/cmm command.....................................................................................................................520pair_style cg/cmm/coul/cut command.......................................................................................................520pair_style cg/cmm/coul/long command.....................................................................................................520pair_coeff command..................................................................................................................................523pair_style colloid command.......................................................................................................................526pair_style coul/cut command.....................................................................................................................529pair_style coul/debye command.................................................................................................................529pair_style coul/long command...................................................................................................................529pair_style dipole/cut command..................................................................................................................531pair_style dpd command............................................................................................................................534pair_style dsmc command..........................................................................................................................536pair_style eam command...........................................................................................................................538pair_style eam/opt command.....................................................................................................................538pair_style eam/alloy command..................................................................................................................538pair_style eam/alloy/opt command............................................................................................................538pair_style eam/cd command.......................................................................................................................538pair_style eam/fs command.......................................................................................................................538

    LAMMPS Users Manual

    vii

  • Table of Contentspair_style eam/fs/opt command.................................................................................................................538pair_style gayberne command...................................................................................................................545pair_style gayberne/gpu command............................................................................................................545pair_style gran/hooke command................................................................................................................549pair_style gran/hooke/history command....................................................................................................549pair_style gran/hertz/history command......................................................................................................549pair_style lj/gromacs command.................................................................................................................553pair_style lj/gromacs/coul/gromacs command...........................................................................................553pair_style hybrid command........................................................................................................................555pair_style hybrid/overlay command...........................................................................................................555pair_style lj/cut command..........................................................................................................................558pair_style lj/cut/gpu command...................................................................................................................558pair_style lj/cut/opt command....................................................................................................................558pair_style lj/cut/coul/cut command............................................................................................................558pair_style lj/cut/coul/debye command.......................................................................................................558pair_style lj/cut/coul/long command..........................................................................................................558pair_style lj/cut/coul/long/tip4p command................................................................................................558pair_style lj96/cut command......................................................................................................................563pair_style lj/coul command........................................................................................................................565pair_style lj/expand command...................................................................................................................568pair_style lj/smooth command...................................................................................................................570pair_style lubricate command....................................................................................................................572pair_style meam command........................................................................................................................575pair_modify command...............................................................................................................................580pair_style morse command........................................................................................................................583pair_style morse/opt command..................................................................................................................583pair_style none command..........................................................................................................................585pair_style peri/pmb command....................................................................................................................586pair_style reax command...........................................................................................................................588pair_style resquared command...................................................................................................................590pair_style soft command............................................................................................................................593pair_style command...................................................................................................................................595pair_style sw command..............................................................................................................................598pair_style table command..........................................................................................................................601pair_style tersoff command........................................................................................................................604pair_style tersoff/zbl command..................................................................................................................608pair_write command..................................................................................................................................613pair_style yukawa command......................................................................................................................615pair_style yukawa/colloid command.........................................................................................................617prd command..............................................................................................................................................619print command...........................................................................................................................................623processors command..................................................................................................................................624read_data command...................................................................................................................................625read_restart command................................................................................................................................635region command.........................................................................................................................................637replicate command.....................................................................................................................................641reset_timestep command............................................................................................................................642restart command.........................................................................................................................................643

    LAMMPS Users Manual

    viii

  • Table of Contentsrun command..............................................................................................................................................645run_style command....................................................................................................................................648set command..............................................................................................................................................651shape command..........................................................................................................................................654shell command...........................................................................................................................................656special_bonds command............................................................................................................................658temper command........................................................................................................................................660thermo command........................................................................................................................................662thermo_modify command..........................................................................................................................663thermo_style command..............................................................................................................................665timestep command.....................................................................................................................................669uncompute command.................................................................................................................................670undump command......................................................................................................................................671unfix command..........................................................................................................................................672units command...........................................................................................................................................673variable command......................................................................................................................................676velocity command......................................................................................................................................684write_restart command...............................................................................................................................687

    LAMMPS Users Manual

    ix

  • LAMMPS Documentation

    (15 Jan 2010 version of LAMMPS)

    LAMMPS stands for Largescale Atomic/Molecular Massively Parallel Simulator.

    LAMMPS is a classical molecular dynamics simulation code designed to run efficiently on parallel computers. Itwas developed at Sandia National Laboratories, a US Department of Energy facility, with funding from the DOE.It is an opensource code, distributed freely under the terms of the GNU Public License (GPL).

    The primary developers of LAMMPS are Steve Plimpton, Paul Crozier, and Aidan Thompson who can becontacted at sjplimp,pscrozi,athomps at sandia.gov. The LAMMPS WWW Site at http://lammps.sandia.gov hasmore information about the code and its uses.

    The LAMMPS documentation is organized into the following sections. If you find errors or omissions in thismanual or have suggestions for useful information to add, please send an email to the developers so we canimprove the LAMMPS documentation.

    Once you are familiar with LAMMPS, you may want to bookmark this page at Section_commands.html#commsince it gives quick access to documentation for all LAMMPS commands.

    PDF file of the entire manual, generated by htmldoc

    IMPORTANT NOTE: If you browse the LAMMPS HTML doc pages from the LAMMPS WWW site, then theydescribe the most current, fullypatched version of LAMMPS, which has changed after the date listed above.These additions are described on this page. If you browse the HTML doc pages from the doc directory of thetarball you downloaded, then they will describe that tarball, whether it was the original version for the date listedabove, or an upgraded tarball including features up to the date you downloaded it, again as described on this page.When the tarball unpacks, it will contain the date that corresponds to which version you downloaded. The PDFfile described above is not regenerated for every patch, so it always corresponds to the original version with thedate listed above.

    Introduction1.1 What is LAMMPS1.2 LAMMPS features1.3 LAMMPS nonfeatures1.4 Open source distribution1.5 Acknowledgments and citations

    1.

    Getting started2.1 What's in the LAMMPS distribution2.2 Making LAMMPS2.3 Making LAMMPS with optional packages2.4 Building LAMMPS as a library2.5 Running LAMMPS2.6 Commandline options2.7 Screen output2.8 Running on GPUs2.9 Tips for users of previous versions

    2.

    Commands3.1 LAMMPS input script3.2 Parsing rules3.3 Input script structure

    3.

    1

    http://www.cs.sandia.gov/~sjplimphttp://lammps.sandia.govhttp://www.easysw.com/htmldochttp://lammps.sandia.gov/bug.htmlhttp://lammps.sandia.gov/bug.html

  • 3.4 Commands listed by category3.5 Commands listed alphabeticallyHowto discussions4.1 Restarting a simulation4.2 2d simulations4.3 CHARMM and AMBER force fields4.4 Running multiple simulations from one input script4.5 Parallel tempering4.6 Granular models4.7 TIP3P water model4.8 TIP4P water model4.9 SPC water model4.10 Coupling LAMMPS to other codes4.11 Visualizing LAMMPS snapshots4.12 Nonorthogonal simulation boxes4.13 NEMD simulations4.14 Extended spherical and aspherical particles4.15 Output from LAMMPS (thermo, dumps, computes, fixes, variables)4.16 Thermostatting, barostatting, and compute temperature4.17 Walls

    4.

    Example problems5. Performance &scalability6. Additional tools7. Modifying &Extending LAMMPS8. Errors9.1 Common problems9.2 Reporting bugs9.3 Error &warning messages

    9.

    Future and history10.1 Coming attractions10.2 Past versions

    10.

    2

  • Previous Section LAMMPS WWW Site LAMMPS Documentation LAMMPS Commands Next Section

    1. Introduction

    These sections provide an overview of what LAMMPS can and can't do, describe what it means for LAMMPS tobe an opensource code, and acknowledge the funding and people who have contributed to LAMMPS over theyears.

    1.1 What is LAMMPS1.2 LAMMPS features1.3 LAMMPS nonfeatures1.4 Open source distribution1.5 Acknowledgments and citations

    1.1 What is LAMMPS

    LAMMPS is a classical molecular dynamics code that models an ensemble of particles in a liquid, solid, orgaseous state. It can model atomic, polymeric, biological, metallic, granular, and coarsegrained systems using avariety of force fields and boundary conditions.

    For examples of LAMMPS simulations, see the Publications page of the LAMMPS WWW Site.

    LAMMPS runs efficiently on singleprocessor desktop or laptop machines, but is designed for parallelcomputers. It will run on any parallel machine that compiles C++ and supports the MPI messagepassing library.This includes distributed or sharedmemory parallel machines and Beowulfstyle clusters.

    LAMMPS can model systems with only a few particles up to millions or billions. See this section for informationon LAMMPS performance and scalability, or the Benchmarks section of the LAMMPS WWW Site.

    LAMMPS is a freelyavailable opensource code, distributed under the terms of the GNU Public License, whichmeans you can use or modify the code however you wish. See this section for a brief discussion of theopensource philosophy.

    LAMMPS is designed to be easy to modify or extend with new capabilities, such as new force fields, atom types,boundary conditions, or diagnostics. See this section for more details.

    The current version of LAMMPS is written in C++. Earlier versions were written in F77 and F90. See this sectionfor more information on different versions. All versions can be downloaded from the LAMMPS WWW Site.

    LAMMPS was originally developed under a US Department of Energy CRADA (Cooperative Research andDevelopment Agreement) between two DOE labs and 3 companies. It is distributed by Sandia National Labs. Seethis section for more information on LAMMPS funding and individuals who have contributed to LAMMPS.

    In the most general sense, LAMMPS integrates Newton's equations of motion for collections of atoms, molecules,or macroscopic particles that interact via short or longrange forces with a variety of initial and/or boundaryconditions. For computational efficiency LAMMPS uses neighbor lists to keep track of nearby particles. The listsare optimized for systems with particles that are repulsive at short distances, so that the local density of particlesnever becomes too large. On parallel machines, LAMMPS uses spatialdecomposition techniques to partition thesimulation domain into small 3d subdomains, one of which is assigned to each processor. Processorscommunicate and store "ghost" atom information for atoms that border their subdomain. LAMMPS is mostefficient (in a parallel sense) for systems whose particles fill a 3d rectangular box with roughly uniform density.

    3

    http://lammps.sandia.govhttp://lammps.sandia.govhttp://www-unix.mcs.anl.gov/mpihttp://lammps.sandia.govhttp://www.gnu.org/copyleft/gpl.htmlhttp://lammps.sandia.govhttp://www.sandia.gov

  • Papers with technical details of the algorithms used in LAMMPS are listed in this section.

    1.2 LAMMPS features

    This section highlights LAMMPS features, with pointers to specific commands which give more details. IfLAMMPS doesn't have your favorite interatomic potential, boundary condition, or atom type, see this section,which describes how you can add it to LAMMPS.

    General features

    runs on a single processor or in parallel distributedmemory messagepassing parallelism (MPI) spatialdecomposition of simulation domain for parallelism opensource distribution highly portable C++ optional libraries used: MPI and singleprocessor FFT easy to extend with new features and functionality runs from an input script syntax for defining and using variables and formulas syntax for looping over runs and breaking out of loops run one or multiple simulations simultaneously (in parallel) from one script

    Particle and model types

    (atom style command)

    atoms coarsegrained particles (e.g. beadspring polymers) unitedatom polymers or organic molecules allatom polymers, organic molecules, proteins, DNA metals granular materials coarsegrained mesoscale models extended spherical and ellipsoidal particles point dipolar particles rigid collections of particles hybrid combinations of these

    Force fields

    (pair style, bond style, angle style, dihedral style, improper style, kspace style commands)

    pairwise potentials: LennardJones, Buckingham, Morse, Yukawa, soft, class 2 (COMPASS), tabulated charged pairwise potentials: Coulombic, pointdipole manybody potentials: EAM, Finnis/Sinclair EAM, modified EAM (MEAM), StillingerWeber, Tersoff,AIREBO, ReaxFF

    coarsegrained potentials: DPD, GayBerne, REsquared, colloidal, DLVO mesoscopic potentials: granular, Peridynamics bond potentials: harmonic, FENE, Morse, nonlinear, class 2, quartic (breakable) angle potentials: harmonic, CHARMM, cosine, cosine/squared, class 2 (COMPASS) dihedral potentials: harmonic, CHARMM, multiharmonic, helix, class 2 (COMPASS), OPLS

    4

  • improper potentials: harmonic, cvff, class 2 (COMPASS) polymer potentials: allatom, unitedatom, beadspring, breakable water potentials: TIP3P, TIP4P, SPC implicit solvent potentials: hydrodynamic lubrication, Debye longrange Coulombics and dispersion: Ewald, PPPM (similar to particlemesh Ewald), Ewald/N forlongrange LennardJones

    forcefield compatibility with common CHARMM, AMBER, OPLS, GROMACS options handful of GPUenabled pair styles

    hybrid potentials: multiple pair, bond, angle, dihedral, improper potentials can be used in one simulation overlaidpotentials: superposition of multiple pair potentials

    Atom creation

    (read_data, lattice, create_atoms, delete_atoms, displace_atoms, replicate commands)

    read in atom coords from files create atoms on one or more lattices (e.g. grain boundaries) delete geometric or logical groups of atoms (e.g. voids) replicate existing atoms multiple times displace atoms

    Ensembles, constraints, and boundary conditions

    (fix command)

    2d or 3d systems orthogonal or nonorthogonal (triclinic symmetry) simulation domains constant NVE, NVT, NPT, NPH integrators thermostatting options for groups and geometric regions of atoms pressure control via Nose/Hoover or Berendsen barostatting in 1 to 3 dimensions simulation box deformation (tensile and shear) harmonic (umbrella) constraint forces rigid body constraints SHAKE bond and angle constraints bond breaking, formation, swapping walls of various kinds nonequilibrium molecular dynamics (NEMD) variety of additional boundary conditions and constraints

    Integrators

    (run, run_style, minimize commands)

    velocityVerlet integrator Brownian dynamics rigid body integration energy minimization via conjugate gradient or steepest descent relaxation rRESPA hierarchical timestepping

    5

  • Diagnostics

    see the various flavors of the fix and compute commands

    Output

    (dump, restart commands)

    log file of thermodynamic info text dump files of atom coords, velocities, other peratom quantities binary restart files peratom quantities (energy, stress, centrosymmetry parameter, CNA, etc) userdefined systemwide (log file) or peratom (dump file) calculations spatial and time averaging of peratom quantities time averaging of systemwide quantities atom snapshots in native, XYZ, XTC, DCD, CFG formats

    Pre and postprocessing

    Various pre and postprocessing serial tools are packaged with LAMMPS; see these doc pages. Our group has also written and released a separate toolkit called Pizza.py which provides tools for doingsetup, analysis, plotting, and visualization for LAMMPS simulations. Pizza.py is written in Python and isavailable for download from the Pizza.py WWW site.

    Specialized features

    These are LAMMPS capabilities which you may not think of as typical molecular dynamics options:

    realtime visualization and interactive MD atomtocontinuum coupling with finite elements coupled rigid body integration via the POEMS library parallel tempering parallel replica dynamics Direct Simulation Monte Carlo for lowdensity fluids Peridynamics mesoscale modeling targeted and steered molecular dynamics twotemperature electron model

    1.3 LAMMPS nonfeatures

    LAMMPS is designed to efficiently compute Newton's equations of motion for a system of interacting particles.Many of the tools needed to pre and postprocess the data for such simulations are not included in theLAMMPS kernel for several reasons:

    the desire to keep LAMMPS simple they are not parallel operations other codes already do them limited development resources

    Specifically, LAMMPS itself does not:

    6

    http://www.sandia.gov/~sjplimp/pizza.htmlhttp://www.python.orghttp://www.sandia.gov/~sjplimp/pizza.html

  • run thru a GUI build molecular systems assign forcefield coefficients automagically perform sophisticated analyses of your MD simulation visualize your MD simulation plot your output data

    A few tools for pre and postprocessing tasks are provided as part of the LAMMPS package; they are describedin this section. However, many people use other codes or write their own tools for these tasks.

    As noted above, our group has also written and released a separate toolkit called Pizza.py which addresses someof the listed bullets. It provides tools for doing setup, analysis, plotting, and visualization for LAMMPSsimulations. Pizza.py is written in Python and is available for download from the Pizza.py WWW site.

    LAMMPS requires as input a list of initial atom coordinates and types, molecular topology information, andforcefield coefficients assigned to all atoms and bonds. LAMMPS will not build molecular systems and assignforcefield parameters for you.

    For atomic systems LAMMPS provides a create_atoms command which places atoms on solidstate lattices (fcc,bcc, userdefined, etc). Assigning small numbers of force field coefficients can be done via the pair coeff, bondcoeff, angle coeff, etc commands. For molecular systems or more complicated simulation geometries, userstypically use another code as a builder and convert its output to LAMMPS input format, or write their own codeto generate atom coordinate and molecular topology for LAMMPS to read in.

    For complicated molecular systems (e.g. a protein), a multitude of topology information and hundreds offorcefield coefficients must typically be specified. We suggest you use a program like CHARMM or AMBER orother molecular builders to setup such problems and dump its information to a file. You can then reformat the fileas LAMMPS input. Some of the tools in this section can assist in this process.

    Similarly, LAMMPS creates output files in a simple format. Most users postprocess these files with their ownanalysis tools or reformat them for input into other programs, including visualization packages. If you areconvinced you need to compute something onthefly as LAMMPS runs, see this section for a discussion of howyou can use the dump and compute and fix commands to print out data of your choosing. Keep in mind thatcomplicated computations can slow down the molecular dynamics timestepping, particularly if the computationsare not parallel, so it is often better to leave such analysis to postprocessing codes.

    A very simple (yet fast) visualizer is provided with the LAMMPS package see the xmovie tool in this section. Itcreates xyz projection views of atomic coordinates and animates them. We find it very useful for debuggingpurposes. For highquality visualization we recommend the following packages:

    VMD AtomEye PyMol Raster3d RasMol

    Other features that LAMMPS does not yet (and may never) support are discussed in this section.

    Finally, these are freelyavailable molecular dynamics codes, most of them parallel, which may be wellsuited tothe problems you want to model. They can also be used in conjunction with LAMMPS to perform complementarymodeling tasks.

    7

    http://www.sandia.gov/~sjplimp/pizza.htmlhttp://www.python.orghttp://www.sandia.gov/~sjplimp/pizza.htmlhttp://www.scripps.edu/brookshttp://amber.scripps.eduhttp://www.ks.uiuc.edu/Research/vmdhttp://164.107.79.177/Archive/Graphics/Ahttp://pymol.sourceforge.nethttp://www.bmsc.washington.edu/raster3d/raster3d.htmlhttp://www.openrasmol.org

  • CHARMM AMBER NAMD NWCHEM DL_POLY Tinker

    CHARMM, AMBER, NAMD, NWCHEM, and Tinker are designed primarily for modeling biological molecules.CHARMM and AMBER use atomdecomposition (replicateddata) strategies for parallelism; NAMD andNWCHEM use spatialdecomposition approaches, similar to LAMMPS. Tinker is a serial code. DL_POLYincludes potentials for a variety of biological and nonbiological materials; both a replicateddata andspatialdecomposition version exist.

    1.4 Open source distribution

    LAMMPS comes with no warranty of any kind. As each source file states in its header, it is a copyrighted codethat is distributed freeof charge, under the terms of the GNU Public License (GPL). This is often referred to asopensource distribution see www.gnu.org or www.opensource.org for more details. The legal text of the GPLis in the LICENSE file that is included in the LAMMPS distribution.

    Here is a summary of what the GPL means for LAMMPS users:

    (1) Anyone is free to use, modify, or extend LAMMPS in any way they choose, including for commercialpurposes.

    (2) If you distribute a modified version of LAMMPS, it must remain opensource, meaning you distribute itunder the terms of the GPL. You should clearly annotate such a code as a derivative version of LAMMPS.

    (3) If you release any code that includes LAMMPS source code, then it must also be opensourced, meaning youdistribute it under the terms of the GPL.

    (4) If you give LAMMPS files to someone else, the GPL LICENSE file and source file headers (including thecopyright and GPL notices) should remain part of the code.

    In the spirit of an opensource code, these are various ways you can contribute to making LAMMPS better. Youcan send email to the developers on any of these items.

    Point prospective users to the LAMMPS WWW Site. Mention it in talks or link to it from your WWWsite.

    If you find an error or omission in this manual or on the LAMMPS WWW Site, or have a suggestion forsomething to clarify or include, send an email to the developers.

    If you find a bug, this section describes how to report it. If you publish a paper using LAMMPS results, send the citation (and any cool pictures or movies if youlike) to add to the Publications, Pictures, and Movies pages of the LAMMPS WWW Site, with links andattributions back to you.

    Create a new Makefile.machine that can be added to the src/MAKE directory. The tools subdirectory of the LAMMPS distribution has various standalone codes for pre andpostprocessing of LAMMPS data. More details are given in this section. If you write a new tool thatusers will find useful, it can be added to the LAMMPS distribution.

    LAMMPS is designed to be easy to extend with new code for features like potentials, boundaryconditions, diagnostic computations, etc. This section gives details. If you add a feature of general

    8

    http://www.scripps.edu/brookshttp://amber.scripps.eduhttp://www.ks.uiuc.edu/Research/namd/http://www.emsl.pnl.gov/docs/nwchem/nwchem.htmlhttp://www.cse.clrc.ac.uk/msi/software/DL_POLYhttp://dasher.wustl.edu/tinkerhttp://www.gnu.org/copyleft/gpl.htmlhttp://www.gnu.orghttp://www.opensource.orghttp://lammps.sandia.gov/authors.htmlhttp://lammps.sandia.govhttp://lammps.sandia.govhttp://lammps.sandia.gov/authors.htmlhttp://lammps.sandia.gov

  • interest, it can be added to the LAMMPS distribution.The Benchmark page of the LAMMPS WWW Site lists LAMMPS performance on various platforms.The files needed to run the benchmarks are part of the LAMMPS distribution. If your machine issufficiently different from those listed, your timing data can be added to the page.

    You can send feedback for the User Comments page of the LAMMPS WWW Site. It might be added tothe page. No promises.

    Cash. Small denominations, unmarked bills preferred. Paper sack OK. Leave on desk. VISA alsoaccepted. Chocolate chip cookies encouraged.

    1.5 Acknowledgments and citations

    LAMMPS development has been funded by the US Department of Energy (DOE), through its CRADA, LDRD,ASCI, and GenomestoLife programs and its OASCR and OBER offices.

    Specifically, work on the latest version was funded in part by the US Department of Energy's Genomics:GTLprogram (www.doegenomestolife.org) under the project, "Carbon Sequestration in Synechococcus Sp.: FromMolecular Machines to Hierarchical Modeling".

    The following papers describe the parallel algorithms used in LAMMPS.

    S. J. Plimpton, Fast Parallel Algorithms for ShortRange Molecular Dynamics, J Comp Phys, 117, 119(1995).

    S. J. Plimpton, R. Pollock, M. Stevens, ParticleMesh Ewald and rRESPA for Parallel Molecular DynamicsSimulations, in Proc of the Eighth SIAM Conference on Parallel Processing for Scientific Computing,Minneapolis, MN (March 1997).

    If you use LAMMPS results in your published work, please cite the J Comp Phys reference and include a pointerto the LAMMPS WWW Site (http://lammps.sandia.gov).

    If you send is information about your publication, we'll be pleased to add it to the Publications page of theLAMMPS WWW Site. Ditto for a picture or movie for the Pictures or Movies pages.

    The core group of LAMMPS developers is at Sandia National Labs. They include Steve Plimpton, Paul Crozier,and Aidan Thompson and can be contacted via email: sjplimp, pscrozi, athomps at sandia.gov.

    Here are various folks who have made significant contributions to features in LAMMPS. The most recentcontributions are at the top of the list.

    pair yukawa/colloid Randy Schunk (Sandia)

    fix wall/colloid Jeremy Lechman (Sandia)

    pair_style dsmc for Direct Simulation Monte Carlo(DSMC) modeling

    Paul Crozier (Sandia)

    fix imd for realtime viz and interactive MD Axel Kohlmeyer (Temple Univ)

    concentrationdependent EAM potential Alexander Stukowski (Technical University of Darmstadt)

    parallel replica dymamics (PRD) Mike Brown (Sandia)

    min_style hftn Todd Plantenga (Sandia)

    fix atc Reese Jones, Jon Zimmerman, Jeremy Templeton (Sandia)

    dump cfg Liang Wan (Chinese Academy of Sciences)

    fix nvt with Nose/Hoover chains Andy Ballard (U Maryland)

    9

    http://lammps.sandia.govhttp://lammps.sandia.govhttp://www.doe.govhttp://www.sc.doe.gov/ascr/home.htmlhttp://www.er.doe.gov/production/ober/ober_top.htmlhttp://www.doegenomestolife.orghttp://www.genomes2life.orghttp://lammps.sandia.govhttp://lammps.sandia.govhttp://www.cs.sandia.gov/~sjplimp

  • pair_style lj/cut/gpu, pair_style gayberne/gpu Mike Brown (Sandia)

    pair_style lj96/cut, bond_style table, angle_styletable

    Chuanfu Luo

    fix langevin tally Carolyn Phillips (U Michigan)

    compute heat/flux for GreenKuboReese Jones (Sandia), Philip Howell (Siemens), VikasVarsney (AFRL)

    region cone Pim Schravendijk

    fix reax/bonds Aidan Thompson (Sandia)

    pair born/coul/long Ahmed Ismail (Sandia)

    fix ttm Paul Crozier (Sandia) and Carolyn Phillips (U Michigan)

    fix box/relax Aidan Thompson and David Olmsted (Sandia)

    ReaxFF potential Aidan Thompson (Sandia) and Hansohl Cho (MIT)

    compute cna/atom Wan Liang (Chinese Academy of Sciences)

    Tersoff/ZBL potential Dave Farrell (Northwestern U)

    peridynamics Mike Parks (Sandia)

    fix smd for steered MD Axel Kohlmeyer (U Penn)

    GROMACS pair potentials Mark Stevens (Sandia)

    lmp2vmd tool Axel Kohlmeyer (U Penn)

    compute group/group Naveen MichaudAgrawal (Johns Hopkins U)

    CGCMM user package for coarsegraining Axel Kohlmeyer (U Penn)

    cosine/delta angle potential Axel Kohlmeyer (U Penn)

    VIM editor addons for LAMMPS input scripts Gerolf Ziegenhain

    pair lubricate Randy Schunk (Sandia)

    compute ackland/atom Gerolf Zeigenhain

    kspace_style ewald/n, pair_style lj/coul, pair_stylebuck/coul

    Pieter in 't Veld (Sandia)

    AIREBO bondorder potential Ase Henry (MIT)

    making LAMMPS a true "object" that can beinstantiated multiple times, e.g. as a library

    Ben FrantzDale (RPI)

    pymol_asphere viz tool Mike Brown (Sandia)

    NEMD SLLOD integration Pieter in 't Veld (Sandia)

    tensile and shear deformations Pieter in 't Veld (Sandia)

    GayBerne potential Mike Brown (Sandia)

    ellipsoidal particles Mike Brown (Sandia)

    colloid potentials Pieter in 't Veld (Sandia)

    fix heat Paul Crozier and Ed Webb (Sandia)

    neighbor multi and communicate multi Pieter in 't Veld (Sandia)

    MATLAB postprocessing scripts Arun Subramaniyan (Purdue)

    triclinic (nonorthogonal) simulation domains Pieter in 't Veld (Sandia)

    thermo_extract tool Vikas Varshney (Wright Patterson AFB)

    fix ave/time and fix ave/spatial Pieter in 't Veld (Sandia)

    MEAM potential Greg Wagner (Sandia)

    optimized pair potentials for lj/cut, charmm/long,eam, morse

    James Fischer (High Performance Technologies), DavidRichie and Vincent Natoli (Stone Ridge Technologies)

    10

  • fix wall/lj126 Mark Stevens (Sandia)

    StillingerWeber and Tersoff potentials Aidan Thompson and Xiaowang Zhou (Sandia)

    region prism Pieter in 't Veld (Sandia)

    LJ tail corrections for energy/pressure Paul Crozier (Sandia)

    fix momentum and recenter Naveen MichaudAgrawal (Johns Hopkins U)

    multiletter variable names Naveen MichaudAgrawal (Johns Hopkins U)

    OPLS dihedral potential Mark Stevens (Sandia)

    POEMS coupled rigid body integrator Rudranarayan Mukherjee (RPI)

    faster pair hybrid potentialJames Fischer (High Performance Technologies, Inc),Vincent Natoli and David Richie (Stone RidgeTechnology)

    breakable bond quartic potential Chris Lorenz and Mark Stevens (Sandia)

    DCD and XTC dump styles Naveen MichaudAgrawal (Johns Hopkins U)

    grain boundary orientation fix Koenraad Janssens and David Olmsted (Sandia)

    lj/smooth pair potential Craig Maloney (UCSB)

    radiusofgyration spring fixNaveen MichaudAgrawal (Johns Hopkins U) and PaulCrozier (Sandia)

    self spring fix Naveen MichaudAgrawal (Johns Hopkins U)

    EAM CoAl and AlCu potentials KwangReoul Lee (KIST, Korea)

    cosine/squared angle potential Naveen MichaudAgrawal (Johns Hopkins U)

    helix dihedral potentialNaveen MichaudAgrawal (Johns Hopkins U) and MarkStevens (Sandia)

    Finnis/Sinclair EAM Tim Lau (MIT)

    dissipative particle dynamics (DPD) potentials Kurt Smith (U Pitt) and Frank van Swol (Sandia)

    TIP4P potential (4site water) Ahmed Ismail and Amalie Frischknecht (Sandia)

    uniaxial strain fix Carsten Svaneborg (Max Planck Institute)

    thermodynamics enhanced by fix quantities Aidan Thompson (Sandia)

    compressed dump files Erik Luijten (U Illinois)

    cylindrical indenter fix Ravi Agrawal (Northwestern U)

    electric field fix Christina Payne (Vanderbilt U)

    AMBER LAMMPS toolKeir Novik (Univ College London) and Vikas Varshney (UAkron)

    CHARMM LAMMPS tool Pieter in 't Veld and Paul Crozier (Sandia)

    Morse bond potential Jeff Greathouse (Sandia)

    radial distribution functions Paul Crozier &Jeff Greathouse (Sandia)

    force tables for longrange Coulombics Paul Crozier (Sandia)

    targeted molecular dynamics (TMD)Paul Crozier (Sandia) and Christian Burisch (BochumUniversity, Germany)

    FFT support for SGI SCSL (Altix) Jim Shepherd (Ga Tech)

    lmp2cfg and lmp2traj tools Ara Kooser, Jeff Greathouse, Andrey Kalinichev (Sandia)

    parallel tempering Mark Sears (Sandia)

    embedded atom method (EAM) potential Stephen Foiles (Sandia)

    multiharmonic dihedral potential Mathias Puetz (Sandia)

    granular force fields and BC Leo Silbert &Gary Grest (Sandia)

    11

  • 2d Ewald/PPPM Paul Crozier (Sandia)

    CHARMM force fields Paul Crozier (Sandia)

    msi2lmp toolSteve Lustig (Dupont), Mike Peachey &John Carpenter(Cray)

    HTFN energy minimizer Todd Plantenga (Sandia)

    class 2 force fields Eric Simon (Cray)

    NVT/NPT integrators Mark Stevens (Sandia)

    rRESPA Mark Stevens &Paul Crozier (Sandia)

    Ewald and PPPM solvers Roy Pollock (LLNL)Other CRADA partners involved in the design and testing of LAMMPS were

    John Carpenter (Mayo Clinic, formerly at Cray Research) Terry Stouch (Lexicon Pharmaceuticals, formerly at Bristol Myers Squibb) Steve Lustig (Dupont) Jim Belak (LLNL)

    12

  • Previous Section LAMMPS WWW Site LAMMPS Documentation LAMMPS Commands Next Section

    2. Getting Started

    This section describes how to build and run LAMMPS, for both new and experienced users.

    2.1 What's in the LAMMPS distribution2.2 Making LAMMPS2.3 Making LAMMPS with optional packages2.4 Building LAMMPS as a library2.5 Running LAMMPS2.6 Commandline options2.7 Screen output2.8 Running on GPUs2.9 Tips for users of previous versions

    2.1 What's in the LAMMPS distribution

    When you download LAMMPS you will need to unzip and untar the downloaded file with the followingcommands, after placing the file in an appropriate directory.

    gunzip lammps*.tar.gz tar xvf lammps*.tar

    This will create a L