1LAMMPS(1)                   General Commands Manual                  LAMMPS(1)
2
3
4

NAME

6       LAMMPS - Molecular Dynamics Simulator.  Version 23 June 2022
7
8

SYNOPSIS

10       lmp -in <input file> [OPTIONS] ...
11
12       or
13
14       mpirun -np 2 lmp -in <input file> [OPTIONS] ...
15
16       or
17
18       lmp -r2data file.restart file.data
19
20       or
21
22       lmp -h
23
24

DESCRIPTION

26       LAMMPS  is  a  classical  molecular  dynamics  code, and an acronym for
27       Large-scale Atomic/Molecular Massively Parallel Simulator.  LAMMPS  has
28       potentials for soft materials (bio-molecules, polymers) and solid-state
29       materials (metals, semiconductors)  and  coarse-grained  or  mesoscopic
30       systems.  It can be used to model atoms or, more generically, as a par‐
31       allel particle simulator at the atomic, meso, or continuum scale.
32
33       See https://www.lammps.org/ for more information and documentation.
34
35

EXECUTABLE NAME

37       The LAMMPS executable can have different names depending on how it  was
38       configured,  compiled  and installed. It will be either lmp or lmp_<ma‐
39       chine name>.  The <machine name> suffix  corresponds  to  the  (machine
40       specific)  makefile  used to compile LAMMPS when using the conventional
41       build process. When building LAMMPS using CMake this <machine name> pa‐
42       rameter  can be chosen arbitrarily at configuration time, but more com‐
43       mon is to just use lmp without a suffix. In this man page we  will  use
44       lmp to represent any of those names.
45
46

OPTIONS

48       -h or -help
49              Print  a  brief  help summary and a list of settings and options
50              compiled into this executable.  It  also  explicitly  lists  all
51              LAMMPS styles (atom_style, fix, compute, pair_style, bond_style,
52              etc) available in the specific executable. This can tell you  if
53              the  command  you  want  to use was included via the appropriate
54              package at compile time.  LAMMPS will print the info and immedi‐
55              ately exit if this switch is used.
56
57       -e or -echo
58              Set  the  style  of  command  echoing.  The style can be none or
59              screen or log or both.  Depending on  the  style,  each  command
60              read  from  the input script will be echoed to the screen and/or
61              logfile. This can be useful to figure out  which  line  of  your
62              script is causing an input error.  The default value is log.
63
64       -i <input file> or -in <input file>
65              Specify  a  file  to use as an input script. If it is not speci‐
66              fied, LAMMPS reads its script from standard input. This is a re‐
67              quired switch when running LAMMPS in multi-partition mode.
68
69       -k on/off [keyword value] or -kokkos on/off [keyword value]
70              Enable  or  disable  general  KOKKOS support, as provided by the
71              KOKKOS package.  Even if LAMMPS is built with this package, this
72              switch  must  be set to on to enable running with KOKKOS-enabled
73              styles. More details on this switch  and  its  optional  keyword
74              value  pairs  are  discussed at: https://docs.lammps.org/Run_op
75              tions.html
76
77       -l <log file> or -log <log file>
78              Specify a log file for LAMMPS to write  status  information  to.
79              The  default  value  is "log.lammps". If the file name "none" is
80              used, LAMMPS will not write a log file. In multi-partition  mode
81              only some high-level all-partition information is written to the
82              "<log file>" file, the remainder is written in  a  per-partition
83              file "<log file>.N" with "N" being the respective partition num‐
84              ber, unless overridden by the -plog flag (see below).
85
86       -m <number> or -mpicolor <number>
87              If used, this must be the first command-line argument after  the
88              LAMMPS  executable name. It is only used when LAMMPS is launched
89              by an mpirun command which also launches one or more other  exe‐
90              cutable(s) at the same time.  LAMMPS and the other executable(s)
91              perform an MPI_Comm_split(), each with their own different  col‐
92              ors,  to  split  the  MPI_COMM_WORLD  communicator for each exe‐
93              cutable to the subset of processors they are supposed to be  ac‐
94              tually  running  on.  Currently,  this is only used in LAMMPS to
95              perform  client/server  messaging  with   another   application.
96              LAMMPS can act as either a client or server (or both).
97
98       -mdi '<mdi_flags>'
99              This  flag  is  only recognized and used when LAMMPS has support
100              for the MolSSI Driver Interface (MDI) included as  part  of  the
101              MDI  package.  This flag is specific to the MDI library and con‐
102              trols how LAMMPS interacts with MDI.  There are usually multiple
103              flags that have to follow it and those have to be placed in quo‐
104              tation marks.  For more information about how to  launch  LAMMPS
105              in  MDI  client/server  mode  please  refer to the MDI How-to at
106              https://docs.lammps.org/Howto_mdi.html
107
108       -c or -cite <style or filename>
109              Select how and where to output a reminder about citing contribu‐
110              tions  to  the LAMMPS code that were used during the run. Avail‐
111              able keywords for styles are "both", "none", "screen", or "log".
112              Any  other  keyword  will be considered a file name to write the
113              detailed citation info to instead of logfile or screen.  Default
114              is  the "log" style where there is a short summary in the screen
115              output and detailed citations in BibTeX format in  the  logfile.
116              The  option "both" selects the detailed output for both, "none",
117              the short output for both, and "screen" will write the  detailed
118              info  to the screen and the short version to the log file.  If a
119              dedicated citation info file is requested, the  screen  and  log
120              file output will be in the short format (same as with "none").
121
122              See  https://docs.lammps.org/Intro_citing.html  for more details
123              on how to correctly reference and cite LAMMPS
124
125       -nc or -nocite
126              Disable writing the "log.cite" file which is normally written to
127              list  references  for  specific cite-able features used during a
128              LAMMPS run.
129
130       -pk <style> [options] or -package <style> [options]
131              Invoke the packagecommand with <style> and  optional  arguments.
132              The  syntax  is  the same as if the command appeared in an input
133              script.  For example "-pk gpu 2" is the same as "package gpu  2"
134              in  the  input  script. The possible styles and options are dis‐
135              cussed in the LAMMPS manual  for  the  "package"  command.  This
136              switch  can  be used multiple times, e.g. to set options for the
137              INTEL and OPENMP packages when used  together.  Along  with  the
138              "-sf"  or  "-suffix"  switch, this is a convenient mechanism for
139              invoking accelerator packages and their options  without  having
140              to edit an input script.
141
142       -p or -partition
143              Invoke LAMMPS in multi-partition mode. Without this, LAMMPS uses
144              all P processors allocated via MPI to run a  single  simulation.
145              If this switch is used, the P processors are split into separate
146              partitions and each partition runs its own simulation. The argu‐
147              ments  to  the  switch  specify the number of processors in each
148              partition.  Arguments of the form "MxN" mean M partitions,  each
149              with N processors.  Arguments of the form "N" mean a single par‐
150              tition with N processors.  The sum of processors in  all  parti‐
151              tions must be equal P. Thus the command “-partition 8x2 4 5” has
152              10 partitions and runs on a total  of  25  processors.   Running
153              with  multiple  partitions is required for multi-replica simula‐
154              tions, where each replica runs on on one or more few processors.
155
156       -pl <basename> or -plog <basename>
157              Specify the base name for the per-partition log files in  multi-
158              partition  runs,  where  partition  N  writes log information to
159              <basename>.N.  If basename is set to "none", then no  per-parti‐
160              tion  log  files are created.  This overrides the name specified
161              in the -log command-line option.
162
163       -ps <basename> or -pscreen <basename>
164              Specify the base name for  the  per-partition  screen  files  in
165              multi-partition  runs, where partition N writes screen output to
166              <basename>.N.  If basename is set to "none", then no  per-parti‐
167              tion screen files are created.  The default value is "screen" or
168              whatever is set by the -screen flag.
169
170       -r2data <restart file> [remap] <data file> or
171              -restart2data  <restart  file>  [remap]  <data   file>   Convert
172              <restart file> previously written by LAMMPS into a data file and
173              immediately  exit.  This  option  has  replaced   the   external
174              restart2data  executable. Following <restart file> argument, the
175              optional word "remap" may be used. This has the same effect like
176              adding it to a "read_restart" command.  The syntax following the
177              <data  file>  name  is  identical  to  the  arguments   of   the
178              "write_data"  command.  See the LAMMPS manual for details on ei‐
179              ther of the two commands.
180
181       -r2dump <restart file> [remap] <dump file> or
182              -restart2dump  <restart  file>  [remap]  <dump   file>   Convert
183              <restart file> previously written by LAMMPS into a dump file and
184              immediately exit. Following <restart  file>  argument,  the  op‐
185              tional  word  "remap" may be used. This has the same effect like
186              adding it to a "read_restart" command.  The syntax following the
187              <dump  file>  name  is  identical to the arguments of the "dump"
188              command. See the LAMMPS manual for details on either of the  two
189              commands.
190
191       -sc <file name> or -screen <file name>
192              Specify a file for LAMMPS to write its screen information to. By
193              default, this will be the standard output.  If  <file  name>  is
194              "none",  (most) screen output will be suppressed.  In multi-par‐
195              tition mode only some high-level  all-partition  information  is
196              written  to  the  screen or "<file name>" file, the remainder is
197              written in a per-partition file "screen.N"  or  "<file  name>.N"
198              with "N" being the respective partition number, and unless over‐
199              ridden by the -pscreen flag (see above).
200
201       -sf <suffix> or -suffix <suffix>
202              Use variants of various styles in the input, if they exist. This
203              is  achieved  by  transparently  trying to convert a style named
204              <my/style> into <my/style/suffix> if that latter  style  exists,
205              but  otherwise fall back to the former. The most useful suffixes
206              are  "gpu", "intel", "kk", "omp", "opt", or "hybrid". These  re‐
207              fer  to  styles  from optional packages that LAMMPS can be built
208              with. The hybrid suffix is special, as it  enables,  having  two
209              suffixes  tried (e.g. first "intel" and then "omp") and thus re‐
210              quires two arguments. Along  with  the  "-package"  command-line
211              switch,  this is a convenient mechanism for invoking styles from
212              accelerator packages and setting their options without having to
213              edit an input script.
214
215       -sr or -skiprun
216              Insert the command "timer timeout 0 every 1" at the beginning of
217              an input file or after a "clear" command.  This has  the  effect
218              that the entire LAMMPS input script is processed without execut‐
219              ing actual "run" or "minimize" or similar commands  (their  main
220              loops  are skipped).  This can be helpful and convenient to test
221              input scripts of long running calculations  for  correctness  to
222              avoid  having them crash after a long time due to a typo or syn‐
223              tax error in the middle or at the end.
224
225              See https://docs.lammps.org/Run_options.html for additional  de‐
226              tails and discussions on command-line options.
227
228

LAMMPS BASICS

230       LAMMPS  executes  by  reading commands from a input script (text file),
231       one line at a time.  When the input script ends,  LAMMPS  exits.   Each
232       command causes LAMMPS to take some action.  It may set or change an in‐
233       ternal, read and parse a file, or run a simulation.  Most commands have
234       default  settings,  which means you only need to use the command if you
235       wish to change the default.
236
237       The ordering of commands in an input script is usually not very  impor‐
238       tant unless a command like "run" is encountered, which starts some cal‐
239       culation using the current internal state. Also, if a  "pair_style"  or
240       "bond_style" other similar style command is issued that has a different
241       name from what was previously active,  it  will  replace  the  previous
242       style  and  wipe  out all corresponding "pair_coeff" or "bond_coeff" or
243       equivalent settings.  Some commands are only  valid  when  they  follow
244       other  commands.  For example you cannot set the temperature of a group
245       of atoms until atoms have been defined and a group command is  used  to
246       define  which atoms belong to the group of a given name. Sometimes com‐
247       mand B will use values that can be set by command A. This means command
248       A  must precede command B in the input to have the desired effect. Some
249       commands must be issued before the simulation box is defined and others
250       can  only  be  issued  after.  Many input script errors are detected by
251       LAMMPS and an ERROR or WARNING message is printed.   The  documentation
252       for each command lists restrictions on how the command can be used, and
253       the chapter on errors in the LAMMPS manual gives some additional infor‐
254       mation about error messages, if possible.
255
256
258       © 2003--2022 Sandia Corporation
259
260       This package is free software; you can redistribute it and/or modify it
261       under the terms of the GNU General Public License  version  2  as  pub‐
262       lished by the Free Software Foundation.
263
264       This  package  is  distributed  in the hope that it will be useful, but
265       WITHOUT ANY  WARRANTY;  without  even  the  implied  warranty  of  MER‐
266       CHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
267       Public License for more details.
268
269       On Debian systems, the complete text of the GNU General Public  License
270       can be found in `/usr/share/common-licenses/GPL-2'.
271
272
273
2742022-6-23                        23 June 2022                        LAMMPS(1)
Impressum