Top Banner
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.
929
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

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 Version info:............................................................................................................................................1 1. Introduction................................................................................................................................................4 1.1 What is LAMMPS.............................................................................................................................4 1.2 LAMMPS features .............................................................................................................................5 General features.......................................................................................................................................5 Particle and model types ..........................................................................................................................5 Force fields..............................................................................................................................................5 Atom creation..........................................................................................................................................6 Ensembles, constraints, and boundary conditions...................................................................................6 Integrators................................................................................................................................................6 Diagnostics..............................................................................................................................................7 Output......................................................................................................................................................7 Multireplica models ...............................................................................................................................7 Pre and postprocessing........................................................................................................................7 Specialized features.................................................................................................................................7 1.3 LAMMPS nonfeatures....................................................................................................................7 1.4 Open source distribution ....................................................................................................................9 1.5 Acknowledgments and citations......................................................................................................10 2. Getting Started.........................................................................................................................................15 2.1 What's in the LAMMPS distribution...............................................................................................15 2.2 Making LAMMPS...........................................................................................................................15 2.3 Making LAMMPS with optional packages.....................................................................................22 2.4 Building LAMMPS as a library......................................................................................................24 2.5 Running LAMMPS.........................................................................................................................25 2.6 Commandline options...................................................................................................................26 2.7 LAMMPS screen output..................................................................................................................28 2.8 Tips for users of previous LAMMPS versions................................................................................30 3. Commands...............................................................................................................................................31 3.1 LAMMPS input script.....................................................................................................................31 3.2 Parsing rules....................................................................................................................................32 3.3 Input script structure........................................................................................................................32 3.4 Commands listed by category.........................................................................................................34 3.5 Individual commands......................................................................................................................34 Fix styles ................................................................................................................................................35 Compute styles......................................................................................................................................36 Pair_style potentials ...............................................................................................................................36 Bond_style potentials............................................................................................................................37 Angle_style potentials...........................................................................................................................37 Dihedral_style potentials.......................................................................................................................37 Improper_style potentials......................................................................................................................38 Kspace solvers.......................................................................................................................................38 4. Packages...................................................................................................................................................39 4.1 Standard packages...........................................................................................................................39 4.2 User packages..................................................................................................................................40 USERMISC package...........................................................................................................................41 USERATC package .............................................................................................................................41 USERAWPMD package.....................................................................................................................41 i

LAMMPS Users Manual

Table of ContentsUSERCGCMM package...................................................................................................................42 USERCUDA package.........................................................................................................................42 USEREFF package ..............................................................................................................................42 USEREWALDN package...................................................................................................................43 USERREAXC package.......................................................................................................................43 USERSPH package.............................................................................................................................44 5. Using accelerated CPU and GPU styles..................................................................................................45 5.1 OPT package...................................................................................................................................46 5.2 USEROMP package......................................................................................................................46 5.3 GPU package...................................................................................................................................46 5.4 USERCUDA package...................................................................................................................48 5.5 Comparison of GPU and USERCUDA packages.........................................................................50 6. Howto discussions.................................................................................................................................53 6.1 Restarting a simulation....................................................................................................................53 6.2 2d simulations ..................................................................................................................................54 6.3 CHARMM, AMBER, and DREIDING force fields.......................................................................55 6.4 Running multiple simulations from one input script.......................................................................56 6.5 Multireplica simulations ................................................................................................................57 6.6 Granular models..............................................................................................................................58 6.7 TIP3P water model..........................................................................................................................59 6.8 TIP4P water model..........................................................................................................................60 6.9 SPC water model.............................................................................................................................61 6.10 Coupling LAMMPS to other codes...............................................................................................61 6.11 Visualizing LAMMPS snapshots..................................................................................................63 6.12 Triclinic (nonorthogonal) simulation boxes................................................................................63 6.13 NEMD simulations........................................................................................................................65 6.14 Extended spherical and aspherical particles..................................................................................66 6.15 Output from LAMMPS (thermo, dumps, computes, fixes, variables)..........................................69 6.16 Thermostatting, barostatting, and computing temperature............................................................73 6.17 Walls..............................................................................................................................................75 6.18 Elastic constants............................................................................................................................76 6.19 Library interface to LAMMPS......................................................................................................76 6.20 Calculating thermal conductivity..................................................................................................77 6.21 Calculating viscosity.....................................................................................................................78 7. Example problems ....................................................................................................................................81 8. Performance &scalability .........................................................................................................................83 9. Additional tools........................................................................................................................................84 amber2lmp tool .....................................................................................................................................84 . binary2txt tool.......................................................................................................................................85 ch2lmp tool............................................................................................................................................85 chain tool...............................................................................................................................................85 createatoms tool.....................................................................................................................................85 data2xmovie tool...................................................................................................................................86 eam database tool..................................................................................................................................86 eam generate tool...................................................................................................................................86 eff tool...................................................................................................................................................86 emacs tool..............................................................................................................................................86 ipp tool...................................................................................................................................................86 ii

LAMMPS Users Manual

Table of Contentslmp2arc tool...........................................................................................................................................87 lmp2cfg tool..........................................................................................................................................87 . lmp2vmd tool........................................................................................................................................87 . matlab tool.............................................................................................................................................87 micelle2d tool........................................................................................................................................87 msi2lmp tool..........................................................................................................................................87 pymol_asphere tool...............................................................................................................................88 python tool.............................................................................................................................................88 reax tool.................................................................................................................................................88 restart2data tool.....................................................................................................................................88 thermo_extract tool ...............................................................................................................................89 . vim tool .................................................................................................................................................89 . xmovie tool............................................................................................................................................89 10. Modifying &extending LAMMPS.........................................................................................................90 10.1 Atom styles....................................................................................................................................91 10.2 Bond, angle, dihedral, improper potentials...................................................................................92 10.3 Compute styles..............................................................................................................................93 10.4 Dump styles...................................................................................................................................93 10.5 Dump custom output options .........................................................................................................93 10.6 Fix styles ........................................................................................................................................94 10.7 Input script commands..................................................................................................................95 10.8 Kspace computations.....................................................................................................................95 10.9 Minimization styles.......................................................................................................................96 10.10 Pairwise potentials.......................................................................................................................96 10.11 Region styles...............................................................................................................................96 10.12 Thermodynamic output options ...................................................................................................97 10.13 Variable options ...........................................................................................................................97 10.14 Submitting new features for inclusion in LAMMPS ...................................................................98 11. Python interface to LAMMPS.............................................................................................................100 11.1 Extending Python with a serial version of LAMMPS.................................................................101 11.2 Creating a shared MPI library.....................................................................................................102 11.3 Extending Python with a parallel version of LAMMPS.............................................................102 11.4 Extending Python with MPI........................................................................................................103 11.5 Testing the PythonLAMMPS interface.....................................................................................104 11.6 Using LAMMPS from Python .....................................................................................................105 11.7 Example Python scripts that use LAMMPS................................................................................108 12. Errors ....................................................................................................................................................110 12.1 Common problems......................................................................................................................110 12.2 Reporting bugs .............................................................................................................................111 12.3 Error &warning messages...........................................................................................................111 Errors:..................................................................................................................................................111 Warnings:............................................................................................................................................167 13. Future and history................................................................................................................................173 13.1 Coming attractions .......................................................................................................................173 13.2 Past versions................................................................................................................................173 angle_style charmm command ...................................................................................................................176 angle_style class2 command......................................................................................................................177 angle_style cg/cmm command...................................................................................................................179 iii

LAMMPS Users Manual

Table of Contentsangle_coeff command................................................................................................................................180 angle_style cosine command.....................................................................................................................182 angle_style cosine/delta command .............................................................................................................183 angle_style cosine/periodic command.......................................................................................................184 angle_style cosine/shift command.............................................................................................................185 angle_style cosine/shift/exp command......................................................................................................186 angle_style cosine/squared command........................................................................................................187 angle_style harmonic command .................................................................................................................188 angle_style hybrid command.....................................................................................................................189 angle_style none command........................................................................................................................191 angle_style command .................................................................................................................................192 angle_style table command........................................................................................................................194 atom_modify command.............................................................................................................................196 atom_style command.................................................................................................................................198 bond_style class2 command .......................................................................................................................201 bond_coeff command .................................................................................................................................202 bond_style fene command.........................................................................................................................204 bond_style fene/expand command.............................................................................................................205 bond_style harmonic command.................................................................................................................207 bond_style harmonic/shift command.........................................................................................................208 bond_style harmonic/shift/cut command...................................................................................................209 bond_style hybrid command......................................................................................................................210 bond_style morse command .......................................................................................................................212 bond_style none command .........................................................................................................................213 bond_style nonlinear command.................................................................................................................214 bond_style quartic command.....................................................................................................................215 bond_style command.................................................................................................................................217 bond_style table command .........................................................................................................................219 boundary command....................................................................................................................................221 change_box command ................................................................................................................................222 clear command...........................................................................................................................................223 communicate command.............................................................................................................................224 compute command.....................................................................................................................................226 compute ackland/atom command ...............................................................................................................230 compute angle/local command ...................................................................................................................232 compute atom/molecule command............................................................................................................234 compute bond/local command...................................................................................................................236 compute centro/atom command.................................................................................................................238 compute cluster/atom command................................................................................................................240 compute cna/atom command.....................................................................................................................241 compute com command.............................................................................................................................243 compute com/molecule command.............................................................................................................244 compute coord/atom command..................................................................................................................246 compute damage/atom command ...............................................................................................................247 compute dihedral/local command..............................................................................................................248 compute displace/atom command..............................................................................................................249 compute erotate/asphere command............................................................................................................251 compute erotate/sphere command ..............................................................................................................252 iv

LAMMPS Users Manual

Table of Contentscompute event/displace command.............................................................................................................253 compute group/group command................................................................................................................254 compute gyration command.......................................................................................................................255 compute gyration/molecule command.......................................................................................................256 compute heat/flux command......................................................................................................................258 compute improper/local command .............................................................................................................261 compute ke command................................................................................................................................262 compute ke/atom command.......................................................................................................................263 compute ke/atom/eff command ..................................................................................................................264 compute ke/eff command...........................................................................................................................266 compute meso_e/atom command...............................................................................................................268 compute meso_rho/atom command...........................................................................................................269 compute meso_t/atom command...............................................................................................................270 compute_modify command ........................................................................................................................271 compute msd command.............................................................................................................................272 compute msd/molecule command ..............................................................................................................274 compute pair command..............................................................................................................................276 compute pair/local command.....................................................................................................................278 compute pe command................................................................................................................................280 compute pe/cuda command ........................................................................................................................280 compute pe/atom command.......................................................................................................................282 compute pressure command.......................................................................................................................284 compute pressure/cuda command..............................................................................................................284 compute property/atom command.............................................................................................................286 compute property/local command ..............................................................................................................288 compute property/molecule command.......................................................................................................290 compute rdf command...............................................................................................................................291 compute reduce command.........................................................................................................................293 compute reduce/region command..............................................................................................................293 compute slice command.............................................................................................................................296 compute stress/atom command..................................................................................................................298 compute temp command............................................................................................................................300 compute temp/cuda command...................................................................................................................300 compute temp/asphere command...............................................................................................................302 compute temp/com command....................................................................................................................305 compute temp/deform command...............................................................................................................307 compute temp/deform/eff command..........................................................................................................309 compute temp/eff command .......................................................................................................................310 compute temp/partial command.................................................................................................................312 compute temp/partial/cuda command........................................................................................................312 compute temp/profile command................................................................................................................314 compute temp/ramp command...................................................................................................................316 compute temp/region command.................................................................................................................318 compute temp/region/eff command...........................................................................................................320 compute temp/rotate command..................................................................................................................321 compute temp/sphere command .................................................................................................................323 compute ti command..................................................................................................................................325 create_atoms command..............................................................................................................................327 v

LAMMPS Users Manual

Table of Contentscreate_box command.................................................................................................................................330 delete_atoms command..............................................................................................................................332 delete_bonds command..............................................................................................................................334 dielectric command....................................................................................................................................336 dihedral_style charmm command..............................................................................................................337 dihedral_style class2 command.................................................................................................................339 dihedral_coeff command ............................................................................................................................342 dihedral_style cosine/shift/exp command..................................................................................................344 dihedral_style harmonic command............................................................................................................345 dihedral_style helix command...................................................................................................................346 dihedral_style hybrid command.................................................................................................................347 dihedral_style multi/harmonic command ...................................................................................................349 dihedral_style none command...................................................................................................................350 dihedral_style opls command .....................................................................................................................351 dihedral_style command............................................................................................................................352 dimension command..................................................................................................................................354 displace_atoms command..........................................................................................................................355 displace_box command..............................................................................................................................357 dump command..........................................................................................................................................360 dump image command...............................................................................................................................360 dump image command...............................................................................................................................367 dump_modify command............................................................................................................................374 echo command...........................................................................................................................................383 fix command..............................................................................................................................................384 fix adapt command.....................................................................................................................................388 fix addforce command...............................................................................................................................392 fix addforce/cuda command.......................................................................................................................392 fix addtorque command.............................................................................................................................395 fix atc command.........................................................................................................................................397 fix ave/atom command...............................................................................................................................401 fix ave/correlate command.........................................................................................................................403 fix ave/histo command...............................................................................................................................408 fix ave/spatial command............................................................................................................................413 fix ave/time command ................................................................................................................................418 fix aveforce command ................................................................................................................................423 fix aveforce/cuda command.......................................................................................................................423 fix bond/break command...........................................................................................................................425 fix bond/create command...........................................................................................................................428 fix bond/swap command............................................................................................................................431 fix box/relax command..............................................................................................................................434 fix deform command..................................................................................................................................439 fix deposit command..................................................................................................................................445 fix drag command......................................................................................................................................448 fix dt/reset command ..................................................................................................................................449 fix efield command....................................................................................................................................451 fix enforce2d command.............................................................................................................................452 fix enforce2d/cuda command.....................................................................................................................452 fix evaporate command..............................................................................................................................453 vi

LAMMPS Users Manual

Table of Contentsfix external command .................................................................................................................................455 fix freeze command ....................................................................................................................................457 fix freeze/cuda command...........................................................................................................................457 fix gcmc command.....................................................................................................................................459 fix gravity command..................................................................................................................................462 fix gravity/cuda command.........................................................................................................................462 fix heat command.......................................................................................................................................464 fix imd command.......................................................................................................................................466 fix indent command...................................................................................................................................469 fix langevin command ................................................................................................................................472 fix langevin/eff command..........................................................................................................................476 fix lineforce command...............................................................................................................................478 fix meso command.....................................................................................................................................479 fix meso/stationary command....................................................................................................................480 fix_modify command.................................................................................................................................481 fix momentum command...........................................................................................................................482 fix move command .....................................................................................................................................484 fix msst command.....................................................................................................................................487 fix neb command ........................................................................................................................................490 fix nvt command........................................................................................................................................492 fix nvt/cuda command ................................................................................................................................492 fix npt command........................................................................................................................................492 fix npt/cuda command ................................................................................................................................492 fix nph command.......................................................................................................................................492 fix nvt/eff command...................................................................................................................................500 fix npt/eff command...................................................................................................................................500 fix nph/eff command..................................................................................................................................500 fix nph/asphere command..........................................................................................................................503 fix nph/sphere command............................................................................................................................505 fix npt/asphere command...........................................................................................................................507 fix npt/sphere command.............................................................................................................................510 fix nve command ........................................................................................................................................512 fix nve/cuda command...............................................................................................................................512 fix nve/asphere command..........................................................................................................................513 fix nve/eff command..................................................................................................................................514 fix nve/limit command...............................................................................................................................515 fix nve/noforce command..........................................................................................................................517 fix nve/sphere command............................................................................................................................518 fix nvt/asphere command...........................................................................................................................520 fix nvt/sllod command...............................................................................................................................522 fix nvt/sllod/eff command..........................................................................................................................524 fix nvt/sphere command.............................................................................................................................526 fix orient/fcc command..............................................................................................................................528 fix planeforce command .............................................................................................................................532 fix poems....................................................................................................................................................533 fix pour command......................................................................................................................................535 fix press/berendsen command....................................................................................................................537 fix print command......................................................................................................................................540 vii

LAMMPS Users Manual

Table of Contentsfix qeq/comb command ..............................................................................................................................542 fix qeq/reax command ................................................................................................................................544 fix reax/bonds command............................................................................................................................546 fix recenter command .................................................................................................................................547 fix restrain command.................................................................................................................................549 fix rigid command......................................................................................................................................551 fix rigid/nve command...............................................................................................................................551 fix rigid/nvt command ................................................................................................................................551 fix setforce command.................................................................................................................................557 fix setforce/cuda command........................................................................................................................557 fix shake command....................................................................................................................................559 fix shake/cuda command ............................................................................................................................559 fix smd command.......................................................................................................................................561 fix spring command...................................................................................................................................564 fix spring/rg command...............................................................................................................................566 fix spring/self command .............................................................................................................................568 fix srd command .........................................................................................................................................569 fix store/force command............................................................................................................................574 fix store/state command.............................................................................................................................575 fix temp/berendsen command....................................................................................................................577 fix temp/berendsen/cuda command...........................................................................................................577 fix temp/rescale command.........................................................................................................................580 fix temp/rescale/cuda command .................................................................................................................580 fix temp/rescale/limit/cuda command........................................................................................................580 fix temp/rescale/eff command ....................................................................................................................583 fix thermal/conductivity command............................................................................................................585 fix tmd command.......................................................................................................................................588 fix ttm command........................................................................................................................................590 fix viscosity command...............................................................................................................................593 fix viscous command.................................................................................................................................596 fix viscous/cuda command.........................................................................................................................596 fix wall/lj93 command...............................................................................................................................598 fix wall/lj126 command.............................................................................................................................598 fix wall/colloid command..........................................................................................................................598 fix wall/harmonic command......................................................................................................................598 fix wall/gran command..............................................................................................................................602 fix wall/reflect command...........................................................................................................................605 fix wall/region command...........................................................................................................................608 fix wall/srd command .................................................................................................................................611 group command ..........................................................................................................................................614 if command................................................................................................................................................616 improper_style class2 command................................................................................................................619 improper_coeff command..........................................................................................................................621 improper_style cvff command...................................................................................................................623 improper_style harmonic command ...........................................................................................................624 improper_style hybrid command...............................................................................................................625 improper_style none command..................................................................................................................626 improper_style command ...........................................................................................................................627 viii

LAMMPS Users Manual

Table of Contentsimproper_style umbrella command...........................................................................................................629 include command.......................................................................................................................................631 jump command ...........................................................................................................................................632 kspace_modify command..........................................................................................................................634 kspace_style command..............................................................................................................................636 label command...........................................................................................................................................639 lattice command.........................................................................................................................................640 log command..............................................................................................................................................643 mass command...........................................................................................................................................644 min_modify command...............................................................................................................................646 min_style command...................................................................................................................................647 minimize command....................................................................................................................................649 neb command.............................................................................................................................................653 neigh_modify command............................................................................................................................658 neighbor command .....................................................................................................................................661 newton command.......................................................................................................................................663 next command............................................................................................................................................664 orient command ..........................................................................................................................................666 origin command.........................................................................................................................................667 package command......................................................................................................................................668 pair_style adp command............................................................................................................................670 pair_style airebo command........................................................................................................................673 pair_style rebo command...........................................................................................................................673 pair_style awpmd/cut command................................................................................................................676 pair_style born command...........................................................................................................................678 pair_style born/coul/long command ...........................................................................................................678 pair_style born/coul/long/cuda command..................................................................................................678 pair_style buck command..........................................................................................................................681 pair_style buck/cuda command ..................................................................................................................681 pair_style buck/coul/cut command............................................................................................................681 pair_style buck/coul/cut/cuda command ....................................................................................................681 pair_style buck/coul/long command..........................................................................................................681 pair_style buck/coul/long/cuda command.................................................................................................681 pair_style buck/coul command..................................................................................................................684 pair_style lj/charmm/coul/charmm command...........................................................................................687 pair_style lj/charmm/coul/charmm/cuda command...................................................................................687 pair_style lj/charmm/coul/charmm/implicit command..............................................................................687 pair_style lj/charmm/coul/charmm/implicit/cuda command.....................................................................687 pair_style lj/charmm/coul/long command.................................................................................................687 pair_style lj/charmm/coul/long/cuda command.........................................................................................687 pair_style lj/charmm/coul/long/gpu command..........................................................................................687 pair_style lj/charmm/coul/long/opt command...........................................................................................687 pair_style lj/class2 command.....................................................................................................................691 pair_style lj/class2/cuda command............................................................................................................691 pair_style lj/class2/gpu command..............................................................................................................691 pair_style lj/class2/coul/cut command.......................................................................................................691 pair_style lj/class2/coul/cut/cuda command..............................................................................................691 pair_style lj/class2/coul/long command.....................................................................................................691 ix

LAMMPS Users Manual

Table of Contentspair_style lj/class2/coul/long/cuda command............................................................................................691 pair_style lj/class2/coul/long/gpu command ..............................................................................................691 pair_style cg/cmm command.....................................................................................................................694 pair_style cg/cmm/cuda command .............................................................................................................694 pair_style cg/cmm/gpu command..............................................................................................................694 pair_style cg/cmm/coul/cut command.......................................................................................................694 pair_style cg/cmm/coul/cut/cuda command ...............................................................................................694 pair_style cg/cmm/coul/debye/cuda command..........................................................................................694 pair_style cg/cmm/coul/long command.....................................................................................................694 pair_style cg/cmm/coul/long/gpu command..............................................................................................694 pair_style cg/cmm/coul/long/cuda command............................................................................................694 pair_coeff command..................................................................................................................................698 pair_style colloid command.......................................................................................................................701 pair_style comb command.........................................................................................................................704 pair_style coul/cut command.....................................................................................................................708 pair_style coul/debye command .................................................................................................................708 pair_style coul/long command...................................................................................................................708 pair_style coul/long/gpu command............................................................................................................708 pair_style dipole/cut command..................................................................................................................711 pair_style dipole/sf command....................................................................................................................711 pair_style dpd command............................................................................................................................716 pair_style dpd/tstat command....................................................................................................................716 pair_style dsmc command ..........................................................................................................................719 pair_style eam command...........................................................................................................................721 pair_style eam/cuda command...................................................................................................................721 pair_style eam/opt command.....................................................................................................................721 pair_style eam/alloy command..................................................................................................................721 pair_style eam/alloy/cuda command ..........................................................................................................721 pair_style eam/alloy/opt command............................................................................................................721 pair_style eam/cd command .......................................................................................................................721 pair_style eam/fs command.......................................................................................................................721 pair_style eam/fs/cuda command...............................................................................................................721 pair_style eam/fs/opt command.................................................................................................................721 pair_style eff/cut command ........................................................................................................................728 pair_style eim command............................................................................................................................732 pair_style gauss command.........................................................................................................................735 pair_style gayberne command...................................................................................................................737 pair_style gayberne/gpu command............................................................................................................737 pair_style gran/hooke command................................................................................................................741 pair_style gran/cuda command..................................................................................................................741 pair_style gran/hooke/history command....................................................................................................741 pair_style gran/hertz/history command ......................................................................................................741 pair_style lj/gromacs command.................................................................................................................745 pair_style lj/gromacs/cuda command .........................................................................................................745 pair_style lj/gromacs/coul/gromacs command ...........................................................................................745 pair_style lj/gromacs/coul/gromacs/cuda command..................................................................................745 pair_style hbond/dreiding/lj command......................................................................................................748 pair_style hbond/dreiding/morse command...............................................................................................748 x

LAMMPS Users Manual

Table of Contentspair_style hybrid command ........................................................................................................................752 pair_style hybrid/overlay command ...........................................................................................................752 pair_style lj/cut command..........................................................................................................................756 pair_style lj/cut/cuda command.................................................................................................................756 pair_style lj/cut/experimental/cuda command...........................................................................................756 pair_style lj/cut/gpu command...................................................................................................................756 pair_style lj/cut/opt command ....................................................................................................................756 pair_style lj/cut/coul/cut command............................................................................................................756 pair_style lj/cut/coul/cut/cuda command...................................................................................................756 pair_style lj/cut/coul/cut/gpu command.....................................................................................................756 pair_style lj/cut/coul/debye command.......................................................................................................756 pair_style lj/cut/coul/debye/cuda command ...............................................................................................756 pair_style lj/cut/coul/long command ..........................................................................................................756 pair_style lj/cut/coul/long/cuda command.................................................................................................756 pair_style lj/cut/coul/long/gpu command ...................................................................................................756 pair_style lj/cut/coul/long/tip4p command................................................................................................756 pair_style lj96/cut command......................................................................................................................760 pair_style lj96/cut/cuda command.............................................................................................................760 pair_style lj96/cut/gpu command...............................................................................................................760 pair_style lj/coul command........................................................................................................................762 pair_style lj/cubic command......................................................................................................................765 pair_style lj/expand command...................................................................................................................767 pair_style lj/expand/cuda command ...........................................................................................................767 pair_style lj/expand/gpu command............................................................................................................767 pair_style lj/sf command............................................................................................................................769 pair_style lj/smooth command...................................................................................................................771 pair_style lj/smooth/cuda command..........................................................................................................771 pair_style lubricate command....................................................................................................................773 pair_style meam command........................................................................................................................776 pair_modify command...............................................................................................................................782 pair_style morse command........................................................................................................................785 pair_style morse/cuda command ................................................................................................................785 pair_style morse/gpu command.................................................................................................................785 pair_style morse/opt command..................................................................................................................785 pair_style none command..........................................................................................................................787 pair_style peri/pmb command ....................................................................................................................788 pair_style peri/lps command......................................................................................................................788 pair_style reax command...........................................................................................................................790 pair_style reax/c command........................................................................................................................793 pair_style resquared command ...................................................................................................................797 pair_style resquared/gpu command...........................................................................................................797 pair_style soft command............................................................................................................................801 pair_style sph/heatconduction command...................................................................................................803 pair_style sph/idealgas command..............................................................................................................804 pair_style sph/lj command.........................................................................................................................806 pair_style sph/rhosum command...............................................................................................................808 pair_style sph/taitwater command.............................................................................................................809 pair_style sph/taitwater/morris command..................................................................................................811 xi

LAMMPS Users Manual

Table of Contentspair_style command...................................................................................................................................813 pair_style sw command ..............................................................................................................................816 pair_style table command..........................................................................................................................819 pair_style tersoff command ........................................................................................................................822 pair_style tersoff/zbl command ..................................................................................................................826 pair_write command..................................................................................................................................831 pair_style yukawa command ......................................................................................................................833 pair_style yukawa/colloid command.........................................................................................................835 prd command ..............................................................................................................................................837 print command...........................................................................................................................................841 processors command..................................................................................................................................842 read_data command...................................................................................................................................843 read_restart command................................................................................................................................853 region command .........................................................................................................................................855 replicate command.....................................................................................................................................859 reset_timestep command............................................................................................................................860 restart command.........................................................................................................................................861 run command ..............................................................................................................................................863 run_style command....................................................................................................................................866 set command..............................................................................................................................................869 shell command...........................................................................................................................................873 special_bonds command............................................................................................................................875 suffix command ..........................................................................................................................................878 tad command..............................................................................................................................................879 temper command........................................................................................................................................883 thermo command ........................................................................................................................................885 thermo_modify command..........................................................................................................................886 thermo_style command..............................................................................................................................889 timestep command.....................................................................................................................................894 uncompute command.................................................................................................................................895 undump command......................................................................................................................................896 unfix command..........................................................................................................................................897 units command...........................................................................................................................................898 variable command......................................................................................................................................901 Math Operators....................................................................................................................................905 Math Functions....................................................................................................................................905 Group and Region Functions...............................................................................................................907 Special Functions .................................................................................................................................907 Atom Values and Vectors....................................................................................................................908 Compute References............................................................................................................................908 Fix References.....................................................................................................................................908 Variable References .............................................................................................................................909 velocity command......................................................................................................................................913 write_restart command ...............................................................................................................................916

xii

LAMMPS DocumentationVersion info: The LAMMPS "version" is the date when it was released, such as 1 May 2010. LAMMPS is updated continuously. Whenever we fix a bug or add a feature, we release it immediately, and post a notice on this page of the WWW site. Each dated copy of LAMMPS contains all the features and bugfixes up to and including that version date. The version date is printed to the screen and logfile every time you run LAMMPS. It is also in the file 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. There is also a Developer.pdf file in the doc directory, which describes the internal structure and algorithms of LAMMPS. LAMMPS stands for Largescale Atomic/Molecular Massively Parallel Simulator. LAMMPS is a classical molecular dynamics simulation code designed to run efficiently on parallel computers. 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, Aidan Thompson, and Paul Crozier who can be contacted at sjplimp,athomps,pscrozi 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 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 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. Packages 4.1 Standard packages 4.2 User packages 5. Using accelerated CPU and GPU styles 5.1 OPT package 5.2 USEROMP package 5.3 GPU package 5.4 USERCUDA package 5.5 Comparison of GPU and USERCUDA packages 6. Howto discussions 6.1 Restarting a simulation 6.2 2d simulations 6.3 CHARMM and AMBER force fields 6.4 Running multiple simulations from one input script 6.5 Multireplica simulations 6.6 Granular models 6.7 TIP3P water model 6.8 TIP4P water model 6.9 SPC water model 6.10 Coupling LAMMPS to other codes 6.11 Visualizing LAMMPS snapshots 6.12 Triclinic (nonorthogonal) simulation boxes 6.13 NEMD simulations 6.14 Extended spherical and aspherical particles 6.15 Output from LAMMPS (thermo, dumps, computes, fixes, variables) 6.16 Thermostatting, barostatting, and compute temperature 6.17 Walls 6.18 Elastic constants 6.19 Library interface to LAMMPS 6.20 Calculating thermal conductivity 6.21 Calculating viscosity 7. Example problems 8. Performance &scalability 9. Additional tools 10. Modifying &extending LAMMPS 10.1 Atom styles 10.2 Bond, angle, dihedral, improper potentials 10.3 Compute styles 10.4 Dump styles 10.5 Dump custom output options 10.6 Fix styles 10.7 Input script commands 10.8 Kspace computations 10.9 Minimization styles 10.10 Pairwise potentials 10.11 Region styles 2

10.12 Thermodynamic output options 10.13 Variable options 10.14 Submitting new features for inclusion in LAMMPS 11. Python interface 11.1 Extending Python with a serial version of LAMMPS 11.2 Creating a shared MPI library 11.3 Extending Python with a parallel version of LAMMPS 11.4 Extending Python with MPI 11.5 Testing the PythonLAMMPS interface 11.6 Using LAMMPS from Python 11.7 Example Python scripts that use LAMMPS 12. Errors 12.1 Common problems 12.2 Reporting bugs 12.3 Error &warning messages 13. Future and history 13.1 Coming attractions 13.2 Past versions

3

Previous Section LAMMPS WWW Site LAMMPS Documentation LAMMPS Commands Next Section

1. IntroductionThese sections provide an overview of wha