File Name: Manual.pdf
File Size: 2.42 MB
File Type: Application/pdf
Last Modified: 8 years
Status: Available
Last checked: 7 days ago!
This Document Has Been Certified by a Professional
100% customizable
Language: English
We recommend downloading this file onto your computer
LAMMPS Users Manual Large−scale 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
LAMMPS Users Manual Table of ContentsLAMMPS Documentation.............................................................................................................................11. 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 Multi−replica models...............................................................................................................................6 Pre− and post−processing........................................................................................................................6 Specialized features.................................................................................................................................6 1.3 LAMMPS non−features....................................................................................................................6 1.4 Open source distribution....................................................................................................................8 1.5 Acknowledgments and citations........................................................................................................92. Getting Started.........................................................................................................................................13 2.1 What's in the LAMMPS distribution...............................................................................................13 2.2 Making LAMMPS...........................................................................................................................13 2.3 Making LAMMPS with optional packages.....................................................................................18 2.4 Building LAMMPS as a library......................................................................................................21 2.5 Running LAMMPS.........................................................................................................................21 2.6 Command−line options...................................................................................................................23 2.7 LAMMPS screen output..................................................................................................................24 2.8 Running on GPUs............................................................................................................................26 GPU configuration.................................................................................................................................26 GPU input script....................................................................................................................................27 GPU asynchronous pair computation....................................................................................................27 GPU timing............................................................................................................................................27 GPU single vs double precision............................................................................................................27 2.9 Tips for users of previous LAMMPS versions................................................................................273. Commands...............................................................................................................................................29 3.1 LAMMPS input script.....................................................................................................................29 3.2 Parsing rules....................................................................................................................................30 3.3 Input script structure........................................................................................................................30 3.4 Commands listed by category.........................................................................................................32 3.5 Individual commands......................................................................................................................32 Fix styles................................................................................................................................................33 Compute styles......................................................................................................................................33 Pair_style potentials...............................................................................................................................34 Bond_style potentials............................................................................................................................34 Angle_style potentials...........................................................................................................................35 Dihedral_style potentials.......................................................................................................................35 Improper_style potentials......................................................................................................................35 Kspace solvers.......................................................................................................................................354. How−to discussions.................................................................................................................................36 i LAMMPS Users Manual Table of Contents 4.1 Restarting a simulation....................................................................................................................36 4.2 2d simulations..................................................................................................................................37 4.3 CHARMM, AMBER, and DREIDING force fields.......................................................................38 4.4 Running multiple simulations from one input script.......................................................................39 4.5 Multi−replica simulations................................................................................................................40 4.6 Granular models..............................................................................................................................41 4.7 TIP3P water model..........................................................................................................................42 4.8 TIP4P water model..........................................................................................................................43 4.9 SPC water model.............................................................................................................................44 4.10 Coupling LAMMPS to other codes...............................................................................................44 4.11 Visualizing LAMMPS snapshots..................................................................................................46 4.12 Triclinic (non−orthogonal) simulation boxes................................................................................46 4.13 NEMD simulations........................................................................................................................48 4.14 Extended spherical and aspherical particles..................................................................................49 4.15 Output from LAMMPS (thermo, dumps, computes, fixes, variables)..........................................51 4.16 Thermostatting, barostatting, and computing temperature............................................................55 4.17 Walls..............................................................................................................................................57 4.18 Elastic constants............................................................................................................................58 4.19 Library interface to LAMMPS......................................................................................................58 4.20 Calculating thermal conductivity..................................................................................................60 4.21 Calculating viscosity.....................................................................................................................605. Example problems....................................................................................................................................636. Performance &scalability.........................................................................................................................657. Additional tools........................................................................................................................................66 amber2lmp tool......................................................................................................................................66 binary2txt tool.......................................................................................................................................67 ch2lmp tool............................................................................................................................................67 chain tool...............................................................................................................................................67 createatoms tool.....................................................................................................................................67 data2xmovie tool...................................................................................................................................68 eam database tool..................................................................................................................................68 eam generate tool...................................................................................................................................68 eff tool...................................................................................................................................................68 emacs tool..............................................................................................................................................68 ipp tool...................................................................................................................................................68 lmp2arc tool...........................................................................................................................................69 lmp2cfg tool...........................................................................................................................................69 lmp2traj tool..........................................................................................................................................69 lmp2vmd tool.........................................................................................................................................69 matlab tool.............................................................................................................................................69 micelle2d tool........................................................................................................................................69 msi2lmp tool..........................................................................................................................................70 pymol_asphere tool...............................................................................................................................70 python tool.............................................................................................................................................70 reax tool.................................................................................................................................................70 restart2data tool.....................................................................................................................................70 thermo_extract tool................................................................................................................................71 vim tool..................................................................................................................................................71 ii LAMMPS Users Manual Table of Contents xmovie tool............................................................................................................................................718. Modifying &extending LAMMPS...........................................................................................................72 Atom styles............................................................................................................................................73 Bond, angle, dihedral, improper potentials...........................................................................................74 Compute styles......................................................................................................................................75 Dump styles...........................................................................................................................................75 Dump custom output options.................................................................................................................75 Fix styles................................................................................................................................................76 Input script commands..........................................................................................................................77 Kspace computations.............................................................................................................................77 Minimization solvers.............................................................................................................................78 Pairwise potentials.................................................................................................................................78 Region styles.........................................................................................................................................78 Thermodynamic output options.............................................................................................................79 Variable options.....................................................................................................................................79 Submitting new features to the developers to include in LAMMPS.....................................................8010. Errors......................................................................................................................................................82 10.1 Common problems........................................................................................................................82 10.2 Reporting bugs...............................................................................................................................83 10.3 Error &warning messages.............................................................................................................83 Errors:....................................................................................................................................................83 Warnings:............................................................................................................................................13511. Future and history................................................................................................................................140 11.1 Coming attractions.......................................................................................................................140 11.2 Past versions................................................................................................................................140angle_style charmm command...................................................................................................................143angle_style class2 command......................................................................................................................144angle_style cg/cmm command...................................................................................................................146angle_coeff command................................................................................................................................147angle_style cosine command.....................................................................................................................149angle_style cosine/delta command.............................................................................................................150angle_style cosine/periodic command.......................................................................................................151angle_style cosine/squared command........................................................................................................152angle_style harmonic command.................................................................................................................153angle_style hybrid command.....................................................................................................................154angle_style none command........................................................................................................................155angle_style command.................................................................................................................................156angle_style table command........................................................................................................................158atom_modify command.............................................................................................................................160atom_style command.................................................................................................................................162bond_style class2 command.......................................................................................................................164bond_coeff command.................................................................................................................................165bond_style fene command.........................................................................................................................167bond_style fene/expand command.............................................................................................................168bond_style harmonic command.................................................................................................................170bond_style hybrid command......................................................................................................................171bond_style morse command.......................................................................................................................172bond_style none command.........................................................................................................................173 iii LAMMPS Users Manual Table of Contentsbond_style nonlinear command.................................................................................................................174bond_style quartic command.....................................................................................................................175bond_style command.................................................................................................................................177bond_style table command.........................................................................................................................179boundary command....................................................................................................................................181change_box command................................................................................................................................182clear command...........................................................................................................................................183communicate command.............................................................................................................................184compute command.....................................................................................................................................186compute ackland/atom command...............................................................................................................190compute angle/local command...................................................................................................................192compute atom/molecule command............................................................................................................194compute bond/local command...................................................................................................................196compute centro/atom command.................................................................................................................198compute cna/atom command.....................................................................................................................200compute com command.............................................................................................................................202compute com/molecule command.............................................................................................................203compute coord/atom command..................................................................................................................205compute damage/atom command...............................................................................................................206compute dihedral/local command..............................................................................................................207compute displace/atom command..............................................................................................................208compute erotate/asphere command............................................................................................................210compute erotate/sphere command..............................................................................................................211compute event/displace command.............................................................................................................212compute group/group command................................................................................................................213compute gyration command.......................................................................................................................214compute gyration/molecule command.......................................................................................................215compute heat/flux command......................................................................................................................217compute improper/local command.............................................................................................................220compute ke command................................................................................................................................221compute ke/atom command.......................................................................................................................222compute ke/atom/eff command..................................................................................................................223compute ke/eff command...........................................................................................................................225compute_modify command........................................................................................................................227compute msd command.............................................................................................................................228compute msd/molecule command..............................................................................................................230compute pair command..............................................................................................................................232compute pair/local command.....................................................................................................................234compute pe command................................................................................................................................236compute pe/atom command.......................................................................................................................238compute pressure command.......................................................................................................................240compute property/atom command.............................................................................................................242compute property/local command..............................................................................................................244compute property/molecule command.......................................................................................................246compute rdf command...............................................................................................................................247compute reduce command.........................................................................................................................249compute reduce/region command..............................................................................................................249compute stress/atom command..................................................................................................................252 iv LAMMPS Users Manual Table of Contentscompute temp command............................................................................................................................254compute temp/asphere command...............................................................................................................256compute temp/com command....................................................................................................................258compute temp/deform command...............................................................................................................260compute temp/deform/eff command..........................................................................................................262compute temp/eff command.......................................................................................................................263compute temp/partial command.................................................................................................................265compute temp/profile command................................................................................................................267compute temp/ramp command...................................................................................................................269compute temp/region command.................................................................................................................271compute temp/region/eff command...........................................................................................................273compute temp/sphere command.................................................................................................................274compute ti command..................................................................................................................................276create_atoms command..............................................................................................................................278create_box command.................................................................................................................................281delete_atoms command..............................................................................................................................283delete_bonds command..............................................................................................................................285dielectric command....................................................................................................................................287dihedral_style charmm command..............................................................................................................288dihedral_style class2 command.................................................................................................................290dihedral_coeff command............................................................................................................................293dihedral_style harmonic command............................................................................................................295dihedral_style helix command...................................................................................................................296dihedral_style hybrid command.................................................................................................................297dihedral_style multi/harmonic command...................................................................................................298dihedral_style none command...................................................................................................................299dihedral_style opls command.....................................................................................................................300dihedral_style command............................................................................................................................301dimension command..................................................................................................................................303dipole command.........................................................................................................................................304displace_atoms command..........................................................................................................................305displace_box command..............................................................................................................................307dump command..........................................................................................................................................310dump_modify command............................................................................................................................317echo command...........................................................................................................................................321fix command..............................................................................................................................................322fix adapt command.....................................................................................................................................326fix addforce command...............................................................................................................................330fix atc command.........................................................................................................................................332fix ave/atom command...............................................................................................................................336fix ave/correlate command.........................................................................................................................338fix ave/histo command...............................................................................................................................343fix ave/spatial command............................................................................................................................348fix ave/time command................................................................................................................................353fix aveforce command................................................................................................................................358fix bond/break command...........................................................................................................................360fix bond/create command...........................................................................................................................363fix bond/swap command............................................................................................................................366 v LAMMPS Users Manual Table of Contentsfix box/relax command..............................................................................................................................369fix deform command..................................................................................................................................373fix deposit command..................................................................................................................................379fix drag command......................................................................................................................................382fix dt/reset command..................................................................................................................................383fix efield command....................................................................................................................................385fix enforce2d command.............................................................................................................................386fix evaporate command..............................................................................................................................387fix external command.................................................................................................................................389fix freeze command....................................................................................................................................391fix gpu command.......................................................................................................................................392fix gravity command..................................................................................................................................394fix heat command.......................................................................................................................................396fix imd command.......................................................................................................................................398fix indent command...................................................................................................................................400fix langevin command................................................................................................................................403fix langevin/eff command..........................................................................................................................406fix lineforce command...............................................................................................................................408fix_modify command.................................................................................................................................409fix momentum command...........................................................................................................................410fix move command.....................................................................................................................................412 fix msst command.....................................................................................................................................415fix neb command........................................................................................................................................418fix nvt command........................................................................................................................................420fix npt command........................................................................................................................................420fix nph command.......................................................................................................................................420fix nvt/eff command...................................................................................................................................427fix npt/eff command...................................................................................................................................427fix nph/eff command..................................................................................................................................427fix nph/asphere command..........................................................................................................................430fix nph/sphere command............................................................................................................................432fix npt/asphere command...........................................................................................................................434fix npt/sphere command.............................................................................................................................437fix nve command........................................................................................................................................439fix nve/asphere command..........................................................................................................................440fix nve/eff command..................................................................................................................................441fix nve/limit command...............................................................................................................................442fix nve/noforce command..........................................................................................................................444fix nve/sphere command............................................................................................................................445fix nvt/asphere command...........................................................................................................................447fix nvt/sllod command...............................................................................................................................449fix nvt/sllod/eff command..........................................................................................................................451fix nvt/sphere command.............................................................................................................................453fix orient/fcc command..............................................................................................................................455fix planeforce command.............................................................................................................................459fix poems....................................................................................................................................................460fix pour command......................................................................................................................................462fix press/berendsen command....................................................................................................................464 vi LAMMPS Users Manual Table of Contentsfix print command......................................................................................................................................467fix qeq/comb command..............................................................................................................................469fix qeq/reax command................................................................................................................................471fix reax/bonds command............................................................................................................................473fix recenter command.................................................................................................................................474fix rigid command......................................................................................................................................476fix rigid/nve command...............................................................................................................................476fix rigid/nvt command................................................................................................................................476fix setforce command.................................................................................................................................481fix shake command....................................................................................................................................483fix smd command.......................................................................................................................................485fix spring command...................................................................................................................................488fix spring/rg command...............................................................................................................................490fix spring/self command.............................................................................................................................492fix srd command.........................................................................................................................................493fix store/force command............................................................................................................................498fix store/state command.............................................................................................................................499fix temp/berendsen command....................................................................................................................501fix temp/rescale command.........................................................................................................................503fix temp/rescale/eff command....................................................................................................................505fix thermal/conductivity command............................................................................................................507fix tmd command.......................................................................................................................................510fix ttm command........................................................................................................................................512fix viscosity command...............................................................................................................................515fix viscous command.................................................................................................................................518fix wall/lj93 command...............................................................................................................................520fix wall/lj126 command.............................................................................................................................520fix wall/colloid command..........................................................................................................................520fix wall/harmonic command......................................................................................................................520fix wall/gran command..............................................................................................................................524fix wall/reflect command...........................................................................................................................527fix wall/region command...........................................................................................................................530fix wall/srd command.................................................................................................................................533group command..........................................................................................................................................536if command................................................................................................................................................538improper_style class2 command................................................................................................................541improper_coeff command..........................................................................................................................543improper_style cvff command...................................................................................................................545improper_style harmonic command...........................................................................................................546improper_style hybrid command...............................................................................................................547improper_style none command..................................................................................................................548improper_style command...........................................................................................................................549improper_style umbrella command...........................................................................................................551include command.......................................................................................................................................553jump command...........................................................................................................................................554kspace_modify command..........................................................................................................................556kspace_style command..............................................................................................................................558label command...........................................................................................................................................560 vii LAMMPS Users Manual Table of Contentslattice command.........................................................................................................................................561log command..............................................................................................................................................564mass command...........................................................................................................................................565min_modify command...............................................................................................................................567min_style command...................................................................................................................................568minimize command....................................................................................................................................570neb command.............................................................................................................................................574neigh_modify command............................................................................................................................579neighbor command.....................................................................................................................................582newton command.......................................................................................................................................584next command............................................................................................................................................585orient command..........................................................................................................................................587origin command.........................................................................................................................................588pair_style airebo command........................................................................................................................589pair_style born command...........................................................................................................................592pair_style born/coul/long command...........................................................................................................592pair_style buck command..........................................................................................................................594pair_style buck/coul/cut command............................................................................................................594pair_style buck/coul/long command..........................................................................................................594pair_style buck/coul command..................................................................................................................597pair_style lj/charmm/coul/charmm command...........................................................................................600pair_style lj/charmm/coul/charmm/implicit command..............................................................................600pair_style lj/charmm/coul/long command.................................................................................................600pair_style lj/charmm/coul/long/gpu command..........................................................................................600pair_style lj/charmm/coul/long/opt command...........................................................................................600pair_style lj/class2 command.....................................................................................................................604pair_style lj/class2/coul/cut command.......................................................................................................604pair_style lj/class2/coul/long command.....................................................................................................604pair_style cg/cmm command.....................................................................................................................607pair_style cg/cmm/gpu command..............................................................................................................607pair_style cg/cmm/coul/cut command.......................................................................................................607pair_style cg/cmm/coul/long command.....................................................................................................607pair_style cg/cmm/coul/long/gpu command..............................................................................................607pair_coeff command..................................................................................................................................611pair_style colloid command.......................................................................................................................614pair_style comb command.........................................................................................................................617pair_style coul/cut command.....................................................................................................................621pair_style coul/debye command.................................................................................................................621pair_style coul/long command...................................................................................................................621pair_style dipole/cut command..................................................................................................................623pair_style dpd command............................................................................................................................626pair_style dpd/tstat command....................................................................................................................626pair_style dsmc command..........................................................................................................................629pair_style eam command...........................................................................................................................631pair_style eam/opt command.....................................................................................................................631pair_style eam/alloy command..................................................................................................................631pair_style eam/alloy/opt command............................................................................................................631pair_style eam/cd command.......................................................................................................................631 viii LAMMPS Users Manual Table of Contentspair_style eam/fs command.......................................................................................................................631pair_style eam/fs/opt command.................................................................................................................631pair_style eff/cut command........................................................................................................................638pair_style eim command............................................................................................................................642pair_style gauss command.........................................................................................................................645pair_style gayberne command...................................................................................................................647pair_style gayberne/gpu command............................................................................................................647pair_style gran/hooke command................................................................................................................651pair_style gran/hooke/history command....................................................................................................651pair_style gran/hertz/history command......................................................................................................651pair_style lj/gromacs command.................................................................................................................655pair_style lj/gromacs/coul/gromacs command...........................................................................................655pair_style hbond/dreiding/lj command......................................................................................................657pair_style hbond/dreiding/morse command...............................................................................................657pair_style hybrid command........................................................................................................................661pair_style hybrid/overlay command...........................................................................................................661pair_style lj/cut command..........................................................................................................................665pair_style lj/cut/gpu command...................................................................................................................665pair_style lj/cut/opt command....................................................................................................................665pair_style lj/cut/coul/cut command............................................................................................................665pair_style lj/cut/coul/cut/gpu command.....................................................................................................665pair_style lj/cut/coul/debye command.......................................................................................................665pair_style lj/cut/coul/long command..........................................................................................................665pair_style lj/cut/coul/long/gpu command...................................................................................................665pair_style lj/cut/coul/long/tip4p command................................................................................................665pair_style lj96/cut command......................................................................................................................670pair_style lj96/cut/gpu command...............................................................................................................670pair_style lj/coul command........................................................................................................................672pair_style lj/expand command...................................................................................................................675pair_style lj/smooth command...................................................................................................................677pair_style lubricate command....................................................................................................................679pair_style meam command........................................................................................................................682pair_modify command...............................................................................................................................687pair_style morse command........................................................................................................................690pair_style morse/opt command..................................................................................................................690pair_style none command..........................................................................................................................692pair_style peri/pmb command....................................................................................................................693pair_style peri/lps command......................................................................................................................693pair_style reax command...........................................................................................................................695pair_style reax/c command........................................................................................................................698pair_style resquared command...................................................................................................................702pair_style soft command............................................................................................................................705pair_style command...................................................................................................................................707pair_style sw command..............................................................................................................................710pair_style table command..........................................................................................................................713pair_style tersoff command........................................................................................................................716pair_style tersoff/zbl command..................................................................................................................720pair_write command..................................................................................................................................725 ix LAMMPS Users Manual Table of Contentspair_style yukawa command......................................................................................................................727pair_style yukawa/colloid command.........................................................................................................729prd command..............................................................................................................................................731print command...........................................................................................................................................735processors command..................................................................................................................................736read_data command...................................................................................................................................737read_restart command................................................................................................................................747region command.........................................................................................................................................749replicate command.....................................................................................................................................753reset_timestep command............................................................................................................................754restart command.........................................................................................................................................755run command..............................................................................................................................................757run_style command....................................................................................................................................760set command..............................................................................................................................................763shape command..........................................................................................................................................766shell command...........................................................................................................................................768special_bonds command............................................................................................................................770tad command..............................................................................................................................................773temper command........................................................................................................................................777thermo command........................................................................................................................................779thermo_modify command..........................................................................................................................780thermo_style command..............................................................................................................................783timestep command.....................................................................................................................................787uncompute command.................................................................................................................................788undump command......................................................................................................................................789unfix command..........................................................................................................................................790units command...........................................................................................................................................791variable command......................................................................................................................................794 Math Operators....................................................................................................................................798 Math Functions....................................................................................................................................798 Group and Region Functions...............................................................................................................800 Special Functions.................................................................................................................................800 Atom Values and Vectors....................................................................................................................801 Compute References............................................................................................................................801 Fix References.....................................................................................................................................801 Variable References.............................................................................................................................802velocity command......................................................................................................................................806write_restart command...............................................................................................................................809 x LAMMPS DocumentationVersion info:The LAMMPS "version" is the date when it was released, such as 1 May 2010. LAMMPS is updatedcontinuously. Whenever we fix a bug or add a feature, we release it immediately, and post a notice on this page ofthe WWW site. Each dated copy of LAMMPS contains all the features and bug−fixes up to and including thatversion date. The version date is printed to the screen and logfile every time you run LAMMPS. It is also in thefile src/version.h and in the LAMMPS directory name created when you unpack a tarball
• If you browse the HTML doc pages on the LAMMPS WWW site, they always describe the most current version of LAMMPS
• If you browse the HTML doc pages included in your tarball, they describe the version you have
• The PDF file on the WWW site or in the tarball is updated about once per month. This is because it is large, and we don't want it to be part of very patch
LAMMPS stands for Large−scale 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 open−source code, distributed freely under the terms of the GNU Public License (GPL)
The primary developers of LAMMPS are Steve Plimpton, Aidan Thompson, and Paul Crozier who can becontacted at sjplimp,athomps,pscrozi 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 1. Introduction 1.1 What is LAMMPS 1.2 LAMMPS features 1.3 LAMMPS non−features 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 Command−line options 2.7 Screen output 2.8 Running on GPUs 2.9 Tips for users of previous versions 3. Commands 1
Table of Contents LAMMPS Documentation..1
The lammps_close() function is used to shut down an instance of LAMMPS and free all its memory. The lammps_file() and lammps_command() functions are used to pass a file or string to LAMMPS as if it were an input script or single command in an input script.
LAMMPS can be coupled to other codes in at least 3 ways. Each has advantages and disadvantages, which you'll have to think about in the context of your application. (1) Define a new fix command that calls the other code. In this scenario, LAMMPS is the driver code.
See this section for an overview of LAMMPS output options. The output for dist will be in distance units. The output for eng will be in energy units. The output for force will be in force units.
In LAMMPS, the values generated by a fix can be used in several ways: Global values can be output via the thermo_style custom or fix ave/time command. Or the values can be referenced in a variable equal or variable atom command. • Per−atom values can be output via the dump custom command or the fix ave/spatial command.