1LAMMPS(29 October 2020) LAMMPS(29 October 2020)
2
3
4
6 LAMMPS - Molecular Dynamics Simulator.
7
8
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
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://lammps.sandia.gov/ for more information and documentation.
34
35
37 The LAMMPS executable can have different names depending on how it was
38 configured, compiled and installed. It will be either lmp or
39 lmp_<machine name>. The <machine name> suffix corresponds to the
40 (machine specific) makefile used to compile LAMMPS when using the con‐
41 ventional build process. When building LAMMPS using CMake this <machine
42 name> parameter can be chosen arbitrarily at configuration time, but
43 more common is to just use lmp without a suffix. In this manpage we
44 will use lmp to represent any of those names.
45
46
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
67 required 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://lammps.san‐
75 dia.gov/doc/Run_options.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
94 actually 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 -nc or -nocite
99 Disable writing the "log.cite" file which is normally written to
100 list references for specific cite-able features used during a
101 LAMMPS run.
102
103 -pk <style> [options] or -package <style> [options]
104 Invoke the packagecommand with <style> and optional arguments.
105 The syntax is the same as if the command appeared in an input
106 script. For example "-pk gpu 2" is the same as "package gpu 2"
107 in the input script. The possible styles and options are dis‐
108 cussed in the LAMMPS manual for the "package" command. This
109 switch can be used multiple times, e.g. to set options for the
110 USER-INTEL and USER-OMP packages when used together. Along with
111 the "-sf" or "-suffix" switch, this is a convenient mechanism
112 for invoking accelerator packages and their options without hav‐
113 ing to edit an input script.
114
115 -p or -partition
116 Invoke LAMMPS in multi-partition mode. Without this, LAMMPS uses
117 all P processors allocated via MPI to run a single simulation.
118 If this switch is used, the P processors are split into separate
119 partitions and each partition runs its own simulation. The argu‐
120 ments to the switch specify the number of processors in each
121 partition. Arguments of the form "MxN" mean M partitions, each
122 with N processors. Arguments of the form "N" mean a single par‐
123 tition with N processors. The sum of processors in all parti‐
124 tions must be equal P. Thus the command “-partition 8x2 4 5” has
125 10 partitions and runs on a total of 25 processors. Running
126 with multiple partitions is required for multi-replica simula‐
127 tions, where each replica runs on on one or more few processors.
128
129 -pl <basename> or -plog <basename>
130 Specify the base name for the per-partition log files in multi-
131 partition runs, where partition N writes log information to
132 <basename>.N. If basename is set to "none", then no per-parti‐
133 tion log files are created. This overrides the name specified
134 in the -log command-line option.
135
136 -ps <basename> or -pscreen <basename>
137 Specify the base name for the per-partition screen files in
138 multi-partition runs, where partition N writes screen output to
139 <basename>.N. If basename is set to "none", then no per-parti‐
140 tion screen files are created. The default value is "screen" or
141 whatever is set by the -screen flag.
142
143 -r2data <restart file> [remap] <data file> or
144 -restart2data <restart file> [remap] <data file> Convert
145 <restart file> previously written by LAMMPS into a data file and
146 immediately exit. This option has replaced the external
147 restart2data executable. Following <restart file> argument, the
148 optional word "remap" may be used. This has the same effect like
149 adding it to a "read_restart" command. The syntax following the
150 <data file> name is identical to the arguments of the
151 "write_data" command. See the LAMMPS manual for details on
152 either of the two commands.
153
154 -r2dump <restart file> [remap] <dump file> or
155 -restart2dump <restart file> [remap] <dump file> Convert
156 <restart file> previously written by LAMMPS into a dump file and
157 immediately exit. Following <restart file> argument, the
158 optional word "remap" may be used. This has the same effect like
159 adding it to a "read_restart" command. The syntax following the
160 <dump file> name is identical to the arguments of the "dump"
161 command. See the LAMMPS manual for details on either of the two
162 commands.
163
164 -sc <file name> or -screen <file name>
165 Specify a file for LAMMPS to write its screen information to. By
166 default, this will be the standard output. If <file name> is
167 "none", (most) screen output will be suppressed. In multi-par‐
168 tition mode only some high-level all-partition information is
169 written to the screen or "<file name>" file, the remainder is
170 written in a per-partition file "screen.N" or "<file name>.N"
171 with "N" being the respective partition number, and unless over‐
172 ridden by the -pscreen flag (see above).
173
174 -sf <suffix> or -suffix <suffix>
175 Use variants of various styles in the input, if they exist. This
176 is achieved by transparently trying to convert a style named
177 <my/style> into <my/style/suffix> if that latter style exists,
178 but otherwise fall back to the former. The most useful suffixes
179 are "gpu", "intel", "kk", "omp", "opt", or "hybrid". These
180 refer to styles from optional packages that LAMMPS can be built
181 with. The hybrid suffix is special, as it enables, having two
182 suffixes tried (e.g. first "intel" and then "omp") and thus
183 requires two arguments. Along with the "-package" command-line
184 switch, this is a convenient mechanism for invoking styles from
185 accelerator packages and setting their options without having to
186 edit an input script.
187
188 See https://lammps.sandia.gov/doc/Run_options.html for addi‐
189 tional details and discussions on command-line options.
190
191
193 LAMMPS executes by reading commands from a input script (text file),
194 one line at a time. When the input script ends, LAMMPS exits. Each
195 command causes LAMMPS to take some action. It may set or change an
196 internal, read and parse a file, or run a simulation. Most commands
197 have default settings, which means you only need to use the command if
198 you wish to change the default.
199
200 The ordering of commands in an input script is usually not very impor‐
201 tant unless a command like "run" is encountered, which starts some cal‐
202 culation using the current internal state. Also, if a "pair_style" or
203 "bond_style" other similar style command is issued that has a different
204 name from what was previously active, it will replace the previous
205 style and wipe out all corresponding "pair_coeff" or "bond_coeff" or
206 equivalent settings. Some commands are only valid when they follow
207 other commands. For example you cannot set the temperature of a group
208 of atoms until atoms have been defined and a group command is used to
209 define which atoms belong to the group of a given name. Sometimes com‐
210 mand B will use values that can be set by command A. This means command
211 A must precede command B in the input to have the desired effect. Some
212 commands must be issued before the simulation box is defined and others
213 can only be issued after. Many input script errors are detected by
214 LAMMPS and an ERROR or WARNING message is printed. The documentation
215 for each command lists restrictions on how the command can be used, and
216 the chapter on errors in the LAMMPS manual gives some additional infor‐
217 mation about error messages, if possible.
218
219
221 © 2003--2020 Sandia Corporation
222
223 This package is free software; you can redistribute it and/or modify it
224 under the terms of the GNU General Public License version 2 as pub‐
225 lished by the Free Software Foundation.
226
227 This package is distributed in the hope that it will be useful, but
228 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
229 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
230 Public License for more details.
231
232 On Debian systems, the complete text of the GNU General Public License
233 can be found in `/usr/share/common-licenses/GPL-2'.
234
235
236
237 2020-10-29 LAMMPS(29 October 2020)