Lammps Manual

779
LAMMPS Users Manual Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov - Sandia National Laboratories Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.

Transcript of Lammps Manual

LAMMPS Users ManualLargescale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov Sandia National Laboratories Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.

LAMMPS Users Manual

Table of ContentsLAMMPS Documentation.............................................................................................................................1 1. Introduction................................................................................................................................................3 1.1 What is LAMMPS.............................................................................................................................3 1.2 LAMMPS features .............................................................................................................................4 General features.......................................................................................................................................4 Particle and model types ..........................................................................................................................4 Force fields..............................................................................................................................................4 Atom creation..........................................................................................................................................5 Ensembles, constraints, and boundary conditions...................................................................................5 Integrators................................................................................................................................................5 Diagnostics..............................................................................................................................................6 Output......................................................................................................................................................6 Multireplica models ...............................................................................................................................6 Pre and postprocessing........................................................................................................................6 Specialized features.................................................................................................................................6 1.3 LAMMPS nonfeatures....................................................................................................................6 1.4 Open source distribution ....................................................................................................................8 1.5 Acknowledgments and citations........................................................................................................9 2. Getting Started.........................................................................................................................................13 2.1 What's in the LAMMPS distribution...............................................................................................13 2.2 Making LAMMPS...........................................................................................................................13 2.3 Making LAMMPS with optional packages.....................................................................................17 2.4 Building LAMMPS as a library......................................................................................................20 2.5 Running LAMMPS.........................................................................................................................21 2.6 Commandline options...................................................................................................................22 2.7 LAMMPS screen output..................................................................................................................24 2.8 Running on GPUs............................................................................................................................25 GPU hardware.......................................................................................................................................25 GPU single vs double precision............................................................................................................26 2.9 Tips for users of previous LAMMPS versions................................................................................26 3. Commands...............................................................................................................................................27 3.1 LAMMPS input script.....................................................................................................................27 3.2 Parsing rules....................................................................................................................................28 3.3 Input script structure........................................................................................................................28 3.4 Commands listed by category.........................................................................................................29 3.5 Individual commands......................................................................................................................30 Fix styles ................................................................................................................................................31 Compute styles......................................................................................................................................31 Pair_style potentials ...............................................................................................................................32 Bond_style potentials............................................................................................................................32 Angle_style potentials...........................................................................................................................32 Dihedral_style potentials.......................................................................................................................33 Improper_style potentials......................................................................................................................33 Kspace solvers.......................................................................................................................................33 4. Howto discussions.................................................................................................................................34 4.1 Restarting a simulation....................................................................................................................34 4.2 2d simulations ..................................................................................................................................35 4.3 CHARMM and AMBER force fields..............................................................................................36 i

LAMMPS Users Manual

Table of Contents4.4 Running multiple simulations from one input script.......................................................................36 4.5 Multireplica simulations ................................................................................................................38 4.6 Granular models..............................................................................................................................38 4.7 TIP3P water model..........................................................................................................................39 4.8 TIP4P water model..........................................................................................................................40 4.9 SPC water model.............................................................................................................................41 4.10 Coupling LAMMPS to other codes...............................................................................................42 4.11 Visualizing LAMMPS snapshots..................................................................................................43 4.12 Nonorthogonal simulation boxes................................................................................................44 4.13 NEMD simulations........................................................................................................................45 4.14 Extended spherical and aspherical particles..................................................................................45 4.15 Output from LAMMPS (thermo, dumps, computes, fixes, variables)..........................................48 4.16 Thermostatting, barostatting, and computing temperature............................................................52 4.17 Walls..............................................................................................................................................54 4.18 Elastic constants............................................................................................................................55 5. Example problems ....................................................................................................................................57 6. Performance &scalability .........................................................................................................................59 7. Additional tools........................................................................................................................................60 amber2lmp tool .....................................................................................................................................60 . binary2txt tool.......................................................................................................................................61 ch2lmp tool............................................................................................................................................61 chain tool...............................................................................................................................................61 createatoms tool.....................................................................................................................................61 data2xmovie tool...................................................................................................................................62 eam database tool..................................................................................................................................62 eam generate tool...................................................................................................................................62 eff tool...................................................................................................................................................62 ipp tool...................................................................................................................................................62 lmp2arc tool...........................................................................................................................................62 lmp2cfg tool..........................................................................................................................................63 . lmp2traj tool..........................................................................................................................................63 lmp2vmd tool........................................................................................................................................63 . matlab tool.............................................................................................................................................63 micelle2d tool........................................................................................................................................63 msi2lmp tool..........................................................................................................................................63 pymol_asphere tool...............................................................................................................................64 python tool.............................................................................................................................................64 restart2data tool.....................................................................................................................................64 thermo_extract tool ...............................................................................................................................65 . vim tool .................................................................................................................................................65 . xmovie tool............................................................................................................................................65 8. Modifying &extending LAMMPS...........................................................................................................66 Atom styles............................................................................................................................................67 Bond, angle, dihedral, improper potentials...........................................................................................68 Compute styles......................................................................................................................................69 Dump styles...........................................................................................................................................69 Dump custom output options .................................................................................................................69 Fix styles ................................................................................................................................................70 ii

LAMMPS Users Manual

Table of ContentsInput script commands..........................................................................................................................71 Kspace computations.............................................................................................................................71 Minimization solvers.............................................................................................................................72 Pairwise potentials.................................................................................................................................72 Region styles.........................................................................................................................................72 Thermodynamic output options .............................................................................................................73 Variable options .....................................................................................................................................73 Submitting new features to the developers to include in LAMMPS.....................................................74 9. Errors ........................................................................................................................................................76 9.1 Common problems..........................................................................................................................76 9.2 Reporting bugs .................................................................................................................................77 9.3 Error &warning messages...............................................................................................................77 Errors:....................................................................................................................................................77 Warnings:............................................................................................................................................129 10. Future and history................................................................................................................................134 10.1 Coming attractions .......................................................................................................................134 10.2 Past versions................................................................................................................................134 angle_style charmm command ...................................................................................................................137 angle_style class2 command......................................................................................................................138 angle_style cg/cmm command...................................................................................................................140 angle_coeff command................................................................................................................................141 angle_style cosine command.....................................................................................................................143 angle_style cosine/delta command .............................................................................................................144 angle_style cosine/squared command........................................................................................................145 angle_style harmonic command .................................................................................................................146 angle_style hybrid command.....................................................................................................................147 angle_style none command........................................................................................................................148 angle_style command .................................................................................................................................149 angle_style table command........................................................................................................................151 atom_modify command.............................................................................................................................153 atom_style command.................................................................................................................................155 bond_style class2 command .......................................................................................................................157 bond_coeff command .................................................................................................................................158 bond_style fene command.........................................................................................................................160 bond_style fene/expand command.............................................................................................................161 bond_style harmonic command.................................................................................................................163 bond_style hybrid command......................................................................................................................164 bond_style morse command .......................................................................................................................165 bond_style none command .........................................................................................................................166 bond_style nonlinear command.................................................................................................................167 bond_style quartic command.....................................................................................................................168 bond_style command.................................................................................................................................170 bond_style table command .........................................................................................................................172 boundary command....................................................................................................................................174 change_box command ................................................................................................................................175 clear command...........................................................................................................................................176 communicate command.............................................................................................................................177 compute command.....................................................................................................................................179 iii

LAMMPS Users Manual

Table of Contentscompute ackland/atom command ...............................................................................................................183 compute angle/local command ...................................................................................................................185 compute bond/local command...................................................................................................................187 compute centro/atom command.................................................................................................................189 compute cna/atom command.....................................................................................................................191 compute com command.............................................................................................................................193 compute com/molecule command.............................................................................................................194 compute coord/atom command..................................................................................................................196 compute damage/atom command ...............................................................................................................197 compute dihedral/local command..............................................................................................................198 compute displace/atom command..............................................................................................................199 compute erotate/asphere command............................................................................................................201 compute erotate/sphere command ..............................................................................................................202 compute event/displace command.............................................................................................................203 compute group/group command................................................................................................................204 compute gyration command.......................................................................................................................205 compute gyration/molecule command.......................................................................................................206 compute heat/flux command......................................................................................................................208 Sample LAMMPS input script............................................................................................................210 compute improper/local command .............................................................................................................211 compute ke command................................................................................................................................212 compute ke/atom command.......................................................................................................................213 compute ke/atom/eff command ..................................................................................................................214 compute ke/eff command...........................................................................................................................216 compute_modify command ........................................................................................................................218 compute msd command.............................................................................................................................219 compute msd/molecule command ..............................................................................................................221 compute pair/local command.....................................................................................................................223 compute pe command................................................................................................................................225 compute pe/atom command.......................................................................................................................227 compute pressure command.......................................................................................................................229 compute property/atom command.............................................................................................................231 compute property/local command ..............................................................................................................233 compute property/molecule command.......................................................................................................235 compute rdf command...............................................................................................................................236 compute reduce command.........................................................................................................................238 compute reduce/region command..............................................................................................................238 compute stress/atom command..................................................................................................................241 compute temp command............................................................................................................................243 compute temp/asphere command...............................................................................................................245 compute temp/com command....................................................................................................................247 compute temp/deform command...............................................................................................................249 compute temp/deform/eff command..........................................................................................................251 compute temp/eff command .......................................................................................................................252 compute temp/partial command.................................................................................................................254 compute temp/profile command................................................................................................................256 compute temp/ramp command...................................................................................................................258 compute temp/region command.................................................................................................................260 iv

LAMMPS Users Manual

Table of Contentscompute temp/region/eff command...........................................................................................................262 compute temp/sphere command .................................................................................................................263 create_atoms command..............................................................................................................................265 create_box command.................................................................................................................................268 delete_atoms command..............................................................................................................................269 delete_bonds command..............................................................................................................................271 dielectric command....................................................................................................................................273 dihedral_style charmm command..............................................................................................................274 dihedral_style class2 command.................................................................................................................276 dihedral_coeff command ............................................................................................................................279 dihedral_style harmonic command............................................................................................................281 dihedral_style helix command...................................................................................................................282 dihedral_style hybrid command.................................................................................................................283 dihedral_style multi/harmonic command ...................................................................................................284 dihedral_style none command...................................................................................................................285 dihedral_style opls command .....................................................................................................................286 dihedral_style command............................................................................................................................287 dimension command..................................................................................................................................289 dipole command.........................................................................................................................................290 displace_atoms command..........................................................................................................................291 displace_box command..............................................................................................................................293 dump command..........................................................................................................................................296 dump_modify command............................................................................................................................302 echo command...........................................................................................................................................306 fix command..............................................................................................................................................307 fix adapt command.....................................................................................................................................311 fix addforce command...............................................................................................................................314 fix atc command.........................................................................................................................................316 fix ave/atom command...............................................................................................................................320 fix ave/correlate command.........................................................................................................................322 fix ave/histo command...............................................................................................................................327 fix ave/spatial command............................................................................................................................332 fix ave/time command ................................................................................................................................337 fix aveforce command ................................................................................................................................342 fix bond/break command...........................................................................................................................344 fix bond/create command...........................................................................................................................347 fix bond/swap command............................................................................................................................350 fix box/relax command..............................................................................................................................353 fix deform command..................................................................................................................................357 fix deposit command..................................................................................................................................363 fix drag command......................................................................................................................................366 fix dt/reset command ..................................................................................................................................367 fix efield command....................................................................................................................................369 fix enforce2d command.............................................................................................................................370 fix evaporate command..............................................................................................................................371 fix external command .................................................................................................................................373 fix freeze command ....................................................................................................................................375 fix gravity command..................................................................................................................................376 v

LAMMPS Users Manual

Table of Contentsfix heat command.......................................................................................................................................378 fix imd command.......................................................................................................................................380 fix indent command...................................................................................................................................382 fix langevin command ................................................................................................................................385 fix langevin/eff command..........................................................................................................................388 fix lineforce command...............................................................................................................................390 fix_modify command.................................................................................................................................391 fix momentum command...........................................................................................................................392 fix move command .....................................................................................................................................394 fix msst command.....................................................................................................................................397 fix neb command ........................................................................................................................................400 fix nvt command........................................................................................................................................402 fix npt command........................................................................................................................................402 fix nph command.......................................................................................................................................402 fix nvt/eff command...................................................................................................................................409 fix npt/eff command...................................................................................................................................409 fix nph/eff command..................................................................................................................................409 fix nph/asphere command..........................................................................................................................412 fix nph/sphere command............................................................................................................................414 fix npt/asphere command...........................................................................................................................416 fix npt/sphere command.............................................................................................................................419 fix nve command ........................................................................................................................................421 fix nve/asphere command..........................................................................................................................422 fix nve/eff command..................................................................................................................................423 fix nve/limit command...............................................................................................................................424 fix nve/noforce command..........................................................................................................................426 fix nve/sphere command............................................................................................................................427 fix nvt/asphere command...........................................................................................................................429 fix nvt/sllod command...............................................................................................................................431 fix nvt/sllod/eff command..........................................................................................................................433 fix nvt/sphere command.............................................................................................................................435 fix orient/fcc command..............................................................................................................................437 fix planeforce command .............................................................................................................................441 fix poems....................................................................................................................................................442 fix pour command......................................................................................................................................444 fix press/berendsen command....................................................................................................................446 fix print command......................................................................................................................................449 fix qeq/comb command ..............................................................................................................................451 fix qeq/reax command ................................................................................................................................453 fix reax/bonds command............................................................................................................................455 fix recenter command .................................................................................................................................456 fix rigid command......................................................................................................................................458 fix rigid/nve command...............................................................................................................................458 fix rigid/nvt command ................................................................................................................................458 fix setforce command.................................................................................................................................463 fix shake command....................................................................................................................................465 fix smd command.......................................................................................................................................467 fix spring command...................................................................................................................................470 vi

LAMMPS Users Manual

Table of Contentsfix spring/rg command...............................................................................................................................472 fix spring/self command .............................................................................................................................474 fix srd command .........................................................................................................................................475 fix store/force command............................................................................................................................480 fix store/state command.............................................................................................................................481 fix temp/berendsen command....................................................................................................................483 fix temp/rescale command.........................................................................................................................485 fix temp/rescale/eff command ....................................................................................................................487 fix thermal/conductivity command............................................................................................................489 fix tmd command.......................................................................................................................................492 fix ttm command........................................................................................................................................494 fix viscosity command...............................................................................................................................497 fix viscous command.................................................................................................................................500 fix wall/lj93 command...............................................................................................................................502 fix wall/lj126 command.............................................................................................................................502 fix wall/colloid command..........................................................................................................................502 fix wall/harmonic command......................................................................................................................502 fix wall/gran command..............................................................................................................................506 fix wall/reflect command...........................................................................................................................509 fix wall/region command...........................................................................................................................511 fix wiggle command ...................................................................................................................................514 group command ..........................................................................................................................................515 if command................................................................................................................................................517 improper_style class2 command................................................................................................................519 improper_coeff command..........................................................................................................................521 improper_style cvff command...................................................................................................................523 improper_style harmonic command ...........................................................................................................524 improper_style hybrid command...............................................................................................................525 improper_style none command..................................................................................................................526 improper_style command ...........................................................................................................................527 include command.......................................................................................................................................529 jump command ...........................................................................................................................................530 kspace_modify command..........................................................................................................................532 kspace_style command..............................................................................................................................534 label command...........................................................................................................................................536 lattice command.........................................................................................................................................537 log command..............................................................................................................................................540 mass command...........................................................................................................................................541 min_modify command...............................................................................................................................543 min_style command...................................................................................................................................544 minimize command....................................................................................................................................546 neb command.............................................................................................................................................550 neigh_modify command............................................................................................................................554 neighbor command .....................................................................................................................................557 newton command.......................................................................................................................................559 next command............................................................................................................................................560 orient command ..........................................................................................................................................562 origin command.........................................................................................................................................563 vii

LAMMPS Users Manual

Table of Contentspair_style airebo command........................................................................................................................564 pair_style born/coul/long command ...........................................................................................................567 pair_style buck command..........................................................................................................................569 pair_style buck/coul/cut command............................................................................................................569 pair_style buck/coul/long command..........................................................................................................569 pair_style buck/coul command..................................................................................................................571 pair_style lj/charmm/coul/charmm command...........................................................................................574 pair_style lj/charmm/coul/charmm/implicit command..............................................................................574 pair_style lj/charmm/coul/long command.................................................................................................574 pair_style lj/charmm/coul/long/opt command...........................................................................................574 pair_style lj/class2 command.....................................................................................................................577 pair_style lj/class2/coul/cut command.......................................................................................................577 pair_style lj/class2/coul/long command.....................................................................................................577 pair_style cg/cmm command.....................................................................................................................580 pair_style cg/cmm/coul/cut command.......................................................................................................580 pair_style cg/cmm/coul/long command.....................................................................................................580 pair_coeff command..................................................................................................................................583 pair_style colloid command.......................................................................................................................586 pair_style comb command.........................................................................................................................589 pair_style coul/cut command.....................................................................................................................593 pair_style coul/debye command .................................................................................................................593 pair_style coul/long command...................................................................................................................593 pair_style dipole/cut command..................................................................................................................595 pair_style dpd command............................................................................................................................598 pair_style dpd/tstat command....................................................................................................................598 pair_style dsmc command ..........................................................................................................................601 pair_style eam command...........................................................................................................................603 pair_style eam/opt command.....................................................................................................................603 pair_style eam/alloy command..................................................................................................................603 pair_style eam/alloy/opt command............................................................................................................603 pair_style eam/cd command .......................................................................................................................603 pair_style eam/fs command.......................................................................................................................603 pair_style eam/fs/opt command.................................................................................................................603 pair_style eff/cut command ........................................................................................................................610 pair_style eim command............................................................................................................................614 pair_style gayberne command...................................................................................................................617 pair_style gayberne/gpu command............................................................................................................617 pair_style gran/hooke command................................................................................................................621 pair_style gran/hooke/history command....................................................................................................621 pair_style gran/hertz/history command ......................................................................................................621 pair_style lj/gromacs command.................................................................................................................625 pair_style lj/gromacs/coul/gromacs command ...........................................................................................625 pair_style hybrid command ........................................................................................................................627 pair_style hybrid/overlay command ...........................................................................................................627 pair_style lj/cut command..........................................................................................................................631 pair_style lj/cut/gpu command...................................................................................................................631 pair_style lj/cut/opt command ....................................................................................................................631 pair_style lj/cut/coul/cut command............................................................................................................631 viii

LAMMPS Users Manual

Table of Contentspair_style lj/cut/coul/debye command.......................................................................................................631 pair_style lj/cut/coul/long command ..........................................................................................................631 pair_style lj/cut/coul/long/tip4p command................................................................................................631 pair_style lj96/cut command......................................................................................................................636 pair_style lj/coul command........................................................................................................................638 pair_style lj/expand command...................................................................................................................641 pair_style lj/smooth command...................................................................................................................643 pair_style lubricate command....................................................................................................................645 pair_style meam command........................................................................................................................648 pair_modify command...............................................................................................................................653 pair_style morse command........................................................................................................................656 pair_style morse/opt command..................................................................................................................656 pair_style none command..........................................................................................................................658 pair_style peri/pmb command ....................................................................................................................659 pair_style peri/lps command......................................................................................................................659 pair_style reax command...........................................................................................................................661 pair_style reax/c command........................................................................................................................664 pair_style resquared command ...................................................................................................................668 pair_style soft command............................................................................................................................671 pair_style command...................................................................................................................................673 pair_style sw command ..............................................................................................................................676 pair_style table command..........................................................................................................................679 pair_style tersoff command ........................................................................................................................682 pair_style tersoff/zbl command ..................................................................................................................686 pair_write command..................................................................................................................................691 pair_style yukawa command ......................................................................................................................693 pair_style yukawa/colloid command.........................................................................................................695 prd command ..............................................................................................................................................697 print command...........................................................................................................................................701 processors command..................................................................................................................................702 read_data command...................................................................................................................................703 read_restart command................................................................................................................................713 region command .........................................................................................................................................715 replicate command.....................................................................................................................................719 reset_timestep command............................................................................................................................720 restart command.........................................................................................................................................721 run command ..............................................................................................................................................723 run_style command....................................................................................................................................726 set command..............................................................................................................................................729 shape command..........................................................................................................................................732 shell command...........................................................................................................................................734 special_bonds command............................................................................................................................736 temper command........................................................................................................................................738 thermo command ........................................................................................................................................740 thermo_modify command..........................................................................................................................741 thermo_style command..............................................................................................................................744 timestep command.....................................................................................................................................748 uncompute command.................................................................................................................................749 ix

LAMMPS Users Manual

Table of Contentsundump command......................................................................................................................................750 unfix command..........................................................................................................................................751 units command...........................................................................................................................................752 variable command......................................................................................................................................755 velocity command......................................................................................................................................765 write_restart command ...............................................................................................................................768

x

LAMMPS DocumentationVersion info: HTML pages on WWW site are always current to most recent patch on this page HTML pages in doc directory are for LAMMPS version you have PDF file on WWW site and in doc directory is updated about once per month LAMMPS stands for Largescale Atomic/Molecular Massively Parallel Simulator. LAMMPS is a classical molecular dynamics simulation code designed to run efficiently on parallel computers. It was 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 be contacted at sjplimp,pscrozi,athomps at sandia.gov. The LAMMPS WWW Site at http://lammps.sandia.gov has more information about the code and its uses. The LAMMPS documentation is organized into the following sections. If you find errors or omissions in this manual or have suggestions for useful information to add, please send an email to the developers so we can improve the LAMMPS documentation. Once you are familiar with LAMMPS, you may want to bookmark this page at Section_commands.html#comm since 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 they describe 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 the tarball you downloaded, then they will describe that tarball, whether it was the original version for the date listed above, 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 PDF file described above is not regenerated for every patch, so it always corresponds to the original version with the date listed above. 1. Introduction 1.1 What is LAMMPS 1.2 LAMMPS features 1.3 LAMMPS nonfeatures 1.4 Open source distribution 1.5 Acknowledgments and citations 2. Getting started 2.1 What's in the LAMMPS distribution 2.2 Making LAMMPS 2.3 Making LAMMPS with optional packages 2.4 Building LAMMPS as a library 2.5 Running LAMMPS 2.6 Commandline options 2.7 Screen output 2.8 Running on GPUs 2.9 Tips for users of previous versions 1

3. Commands 3.1 LAMMPS input script 3.2 Parsing rules 3.3 Input script structure 3.4 Commands listed by category 3.5 Commands listed alphabetically 4. Howto discussions 4.1 Restarting a simulation 4.2 2d simulations 4.3 CHARMM and AMBER force fields 4.4 Running multiple simulations from one input script 4.5 Multireplica simulations 4.6 Granular models 4.7 TIP3P water model 4.8 TIP4P water model 4.9 SPC water model 4.10 Coupling LAMMPS to other codes 4.11 Visualizing LAMMPS snapshots 4.12 Nonorthogonal simulation boxes 4.13 NEMD simulations 4.14 Extended spherical and aspherical particles 4.15 Output from LAMMPS (thermo, dumps, computes, fixes, variables) 4.16 Thermostatting, barostatting, and compute temperature 4.17 Walls 4.18 Elastic constants 5. Example problems 6. Performance &scalability 7. Additional tools 8. Modifying &Extending LAMMPS 9. Errors 9.1 Common problems 9.2 Reporting bugs 9.3 Error &warning messages 10. Future and history 10.1 Coming attractions 10.2 Past versions

2

Previous Section LAMMPS WWW Site LAMMPS Documentation LAMMPS Commands Next Section

1. IntroductionThese sections provide an overview of what LAMMPS can and can't do, describe what it means for LAMMPS to be an opensource code, and acknowledge the funding and people who have contributed to LAMMPS over the years. 1.1 What is LAMMPS 1.2 LAMMPS features 1.3 LAMMPS nonfeatures 1.4 Open source distribution 1.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, or gaseous state. It can model atomic, polymeric, biological, metallic, granular, and coarsegrained systems using a variety 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 parallel computers. 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 information on 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, which means you can use or modify the code however you wish. See this section for a brief discussion of the opensource 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 section for 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 and Development Agreement) between two DOE labs and 3 companies. It is distributed by Sandia National Labs. See this 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 boundary conditions. For computational efficiency LAMMPS uses neighbor lists to keep track of nearby particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. On parallel machines, LAMMPS uses spatialdecomposition techniques to partition the simulation domain into small 3d subdomains, one of which is assigned to each processor. Processors communicate and store "ghost" atom information for atoms that border their subdomain. LAMMPS is most efficient (in a parallel sense) for systems whose particles fill a 3d rectangular box with roughly uniform density. 3

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. If LAMMPS 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), embedded ion method (EIM), StillingerWeber, Tersoff, AIREBO, ReaxFF, COMB electron force field (eFF) 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) 4

dihedral potentials: harmonic, CHARMM, multiharmonic, helix, class 2 (COMPASS), OPLS 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 for longrange 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 overlaid potentials: 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, Parinello/Rahman 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 parallel I/O of dump and 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 Multireplica models nudged elastic band parallel replica dynamics parallel tempering 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 doing setup, analysis, plotting, and visualization for LAMMPS simulations. Pizza.py is written in Python and is available 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: stochastic rotation dynamics (SRD) realtime visualization and interactive MD atomtocontinuum coupling with finite elements coupled rigid body integration via the POEMS library 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 the LAMMPS kernel for several reasons: the desire to keep LAMMPS simple they are not parallel operations other codes already do them 6

limited development resources Specifically, LAMMPS itself does not: 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 described in 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 some of the listed bullets. It provides tools for doing setup, analysis, plotting, and visualization for LAMMPS simulations. 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, and forcefield coefficients assigned to all atoms and bonds. LAMMPS will not build molecular systems and assign forcefield 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, bond coeff, angle coeff, etc commands. For molecular systems or more complicated simulation geometries, users typically use another code as a builder and convert its output to LAMMPS input format, or write their own code to 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 of forcefield coefficients must typically be specified. We suggest you use a program like CHARMM or AMBER or other molecular builders to setup such problems and dump its information to a file. You can then reformat the file as 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 own analysis tools or reformat them for input into other programs, including visualization packages. If you are convinced you need to compute something onthefly as LAMMPS runs, see this section for a discussion of how you can use the dump and compute and fix commands to print out data of your choosing. Keep in mind that complicated computations can slow down the molecular dynamics timestepping, particularly if the computations are 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. It creates xyz projection views of atomic coordinates and animates them. We find it very useful for debugging purposes. 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.

7

Finally, these are freelyavailable molecular dynamics codes, most of them parallel, which may be wellsuited to the problems you want to model. They can also be used in conjunction with LAMMPS to perform complementary modeling tasks. 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 and NWCHEM use spatialdecomposition approaches, similar to LAMMPS. Tinker is a serial code. DL_POLY includes potentials for a variety of biological and nonbiological materials; both a replicateddata and spatialdecomposition 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 code that is distributed freeof charge, under the terms of the GNU Public License (GPL). This is often referred to as opensource distribution see www.gnu.org or www.opensource.org for more details. The legal text of the GPL is 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 commercial purposes. (2) If you distribute a modified version of LAMMPS, it must remain opensource, meaning you distribute it under 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 you distribute 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 the copyright 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. You can 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 WWW site. If you find an error or omission in this manual or on the LAMMPS WWW Site, or have a suggestion for something 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 you like) to add to the Publications, Pictures, and Movies pages of the LAMMPS WWW Site, with links and attributions 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 and 8

postprocessing of LAMMPS data. More details are given in this section. If you write a new tool that users 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, boundary conditions, diagnostic computations, etc. This section gives details. If you add a feature of general 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 is sufficiently 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 to the page. No promises. Cash. Small denominations, unmarked bills preferred. Paper sack OK. Leave on desk. VISA also accepted. 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:GTL program (www.doegenomestolife.org) under the project, "Carbon Sequestration in Synechococcus Sp.: From Molecular 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 Dynamics Simulations, 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 pointer to 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 the LAMMPS 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 recent contributions are at the top of the list. ipp Perl script tool eam_database and createatoms tools electron force field (eFF) embedded ion method (EIM) potential COMB potential with charge equilibration fix ave/correlate pair_style peri/lps Reese Jones (Sandia) Xiaowang Zhou (Sandia) Andres JaramilloBotero and Julius Su (Caltech) Xiaowang Zhou (Sandia) TzuRay Shan (U Florida) Benoit Leblanc, Dave Rigby, Paul Saxe (Materials Design) and Reese Jones (Sandia) Mike Parks (Sandia) 9

fix msst thermo_style custom tpcpu &spcpu keywords fix rigid/nve, fix rigid/nvt public SVN &Git repositories for LAMMPS fix nvt, fix nph, fix npt, Parinello/Rahman dynamics, fix box/relax compute heat/flux pair yukawa/colloid fix wall/colloid pair_style dsmc for Direct Simulation Monte Carlo (DSMC) modeling fix imd for realtime viz and interactive MD concentrationdependent EAM potential parallel replica dymamics (PRD) min_style hftn fix atc dump cfg fix nvt with Nose/Hoover chains pair_style lj/cut/gpu, pair_style gayberne/gpu pair_style lj96/cut, bond_style table, angle_style table fix langevin tally compute heat/flux for GreenKubo region cone fix reax/bonds pair born/coul/long fix ttm fix box/relax ReaxFF potential compute cna/atom Tersoff/ZBL potential peridynamics fix smd for steered MD GROMACS pair potentials lmp2vmd tool compute group/group CGCMM user package for coarsegraining cosine/delta angle potential VIM editor addons for LAMMPS input scripts pair lubricate compute ackland/atom

Lawrence Fried (LLNL), Evan Reed (LLNL, Stanford) Axel Kohlmeyer (Temple U) Tony Sheh and Trung Dac Nguyen (U Michigan) Axel Kohlmeyer (Temple U) and Bill Goldman (Sandia) Aidan Thompson (Sandia) German Samolyuk (ORNL) and Mario Pinto (Computational Research Lab, Pune, India) Randy Schunk (Sandia) Jeremy Lechman (Sandia) Paul Crozier (Sandia) Axel Kohlmeyer (Temple Univ) Alexander Stukowski (Technical University of Darmstadt) Mike Brown (Sandia) Todd Plantenga (Sandia) Reese Jones, Jon Zimmerman, Jeremy Templeton (Sandia) Liang Wan (Chinese Academy of Sciences) Andy Ballard (U Maryland) Mike Brown (Sandia) Chuanfu Luo Carolyn Phillips (U Michigan) Reese Jones (Sandia), Philip Howell (Siemens), Vikas Varsney (AFRL) Pim Schravendijk Aidan Thompson (Sandia) Ahmed Ismail (Sandia) Paul Crozier (Sandia) and Carolyn Phillips (U Michigan) Aidan Thompson and David Olmsted (Sandia) Aidan Thompson (Sandia) and Hansohl Cho (MIT) Wan Liang (Chinese Academy of Sciences) Dave Farrell (Northwestern U) Mike Parks (Sandia) Axel Kohlmeyer (U Penn) Mark Stevens (Sandia) Axel Kohlmeyer (U Penn) Naveen MichaudAgrawal (Johns Hopkins U) Axel Kohlmeyer (U Penn) Axel Kohlmeyer (U Penn) Gerolf Ziegenhain Randy Schunk (Sandia) Gerolf Zeigenhain Pieter in 't Veld (Sandia) 10

kspace_style ewald/n, pair_style lj/coul, pair_style buck/coul AIREBO bondorder potential making LAMMPS a true "object" that can be instantiated multiple times, e.g. as a library pymol_asphere viz tool NEMD SLLOD integration tensile and shear deformations GayBerne potential ellipsoidal particles colloid potentials fix heat neighbor multi and communicate multi MATLAB postprocessing scripts triclinic (nonorthogonal) simulation domains thermo_extract tool fix ave/time and fix ave/spatial MEAM potential optimized pair potentials for lj/cut, cha