1LAMMPS(5 June 2019) LAMMPS(5 June 2019)
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 <input file> [OPTIONS] ...
15
16 or
17
18 lmp -r2data file.restart file.data
19
20
22 LAMMPS is a classical molecular dynamics code, and an acronym for
23 Large-scale Atomic/Molecular Massively Parallel Simulator. LAMMPS has
24 potentials for soft materials (bio-molecules, polymers) and solid-state
25 materials (metals, semiconductors) and coarse-grained or mesoscopic
26 systems. It can be used to model atoms or, more generically, as a par‐
27 allel particle simulator at the atomic, meso, or continuum scale.
28
29 See https://lammps.sandia.gov/ for more information and documentation.
30
31
33 The LAMMPS executable can have different names depending on how it was
34 configured, compiled and installed. It will be either lmp or
35 lmp_<machine name>. The <machine name> suffix corresponds to the
36 (machine specific) makefile used to compile LAMMPS when using the con‐
37 ventional build process. When building LAMMPS using CMake this <machine
38 name> parameter can be chosen arbitrarily at configuration time, but
39 more common is to just use lmp without a suffix. In this manpage we
40 will use lmp to represent any of those names.
41
42
44 -h or -help
45 Print a brief help summary and a list of settings and options
46 compiled into this executable. It also explicitly lists all
47 LAMMPS styles (atom_style, fix, compute, pair_style, bond_style,
48 etc) available in the specific executable. This can tell you if
49 the command you want to use was included via the appropriate
50 package at compile time. LAMMPS will print the info and immedi‐
51 ately exit if this switch is used.
52
53 -e or -echo
54 Set the style of command echoing. The style can be none or
55 screen or log or both. Depending on the style, each command
56 read from the input script will be echoed to the screen and/or
57 logfile. This can be useful to figure out which line of your
58 script is causing an input error. The default value is log.
59
60 -i <input file> or -in <input file>
61 Specify a file to use as an input script. If it is not speci‐
62 fied, LAMMPS reads its script from standard input. This is a
63 required switch when running LAMMPS in multi-partition mode.
64
65 -k on/off [keyword value] or -kokkos on/off [keyword value]
66 Enable or disable general KOKKOS support, as provided by the
67 KOKKOS package. Even if LAMMPS is built with this package, this
68 switch must be set to on to enable running with KOKKOS-enabled
69 styles. More details on this switch and its optional keyword
70 value pairs are discussed at: https://lammps.san‐
71 dia.gov/doc/Run_options.html
72
73 -l <log file> or -log <log file>
74 Specify a log file for LAMMPS to write status information to.
75 The default value is "log.lammps". If the file name "none" is
76 used, LAMMPS will not write a log file. In multi-partition mode
77 only some high-level all-partition information is written to the
78 "<log file>" file, the remainder is written in a per-partition
79 file "<log file>.N" with "N" being the respective partition num‐
80 ber, unless overridden by the -plog flag (see below).
81
82 -m <number> or -mpicolor <number>
83 If used, this must be the first command-line argument after the
84 LAMMPS executable name. It is only used when LAMMPS is launched
85 by an mpirun command which also launches one or more other exe‐
86 cutable(s) at the same time. LAMMPS and the other executable(s)
87 perform an MPI_Comm_split(), each with their own different col‐
88 ors, to split the MPI_COMM_WORLD communicator for each exe‐
89 cutable to the subset of processors they are supposed to be
90 actually running on. Currently, this is only used in LAMMPS to
91 perform client/server messaging with another application.
92 LAMMPS can act as either a client or server (or both).
93
94 -nc or -nocite
95 Disable writing the "log.cite" file which is normally written to
96 list references for specific cite-able features used during a
97 LAMMPS run.
98
99 -pk <style> [options] or -package <style> [options]
100 Invoke the packagecommand with <style> and optional arguments.
101 The syntax is the same as if the command appeared in an input
102 script. For example "-pk gpu 2" is the same as "package gpu 2"
103 in the input script. The possible styles and options are dis‐
104 cussed in the LAMMPS manual for the "package" command. This
105 switch can be used multiple times, e.g. to set options for the
106 USER-INTEL and USER-OMP packages when used together. Along with
107 the "-sf" or "-suffix" switch, this is a convenient mechanism
108 for invoking accelerator packages and their options without hav‐
109 ing to edit an input script.
110
111 -p or -partition
112 Invoke LAMMPS in multi-partition mode. Without this, LAMMPS uses
113 all P processors allocated via MPI to run a single simulation.
114 If this switch is used, the P processors are split into separate
115 partitions and each partition runs its own simulation. The argu‐
116 ments to the switch specify the number of processors in each
117 partition. Arguments of the form "MxN" mean M partitions, each
118 with N processors. Arguments of the form "N" mean a single par‐
119 tition with N processors. The sum of processors in all parti‐
120 tions must be equal P. Thus the command “-partition 8x2 4 5” has
121 10 partitions and runs on a total of 25 processors. Running
122 with multiple partitions is required for multi-replica simula‐
123 tions, where each replica runs on on one or more few processors.
124
125 -pl <basename> or -plog <basename>
126 Specify the base name for the per-partition log files in multi-
127 partition runs, where partition N writes log information to
128 <basename>.N. If basename is set to "none", then no per-parti‐
129 tion log files are created. This overrides the name specified
130 in the -log command-line option.
131
132 -ps <basename> or -pscreen <basename>
133 Specify the base name for the per-partition screen files in
134 multi-partition runs, where partition N writes screen output to
135 <basename>.N. If basename is set to "none", then no per-parti‐
136 tion screen files are created. The default value is "screen" or
137 whatever is set by the -screen flag.
138
139 -r2data <restart file> [remap] <data file> or
140 -restart2data <restart file> [remap] <data file> Convert
141 <restart file> previously written by LAMMPS into a data file and
142 immediately exit. This option has replaced the external
143 restart2data executable. Following <restart file> argument, the
144 optional word "remap" may be used. This has the same effect like
145 adding it to a "read_restart" command. The syntax following the
146 <data file> name is identical to the arguments of the
147 "write_data" command. See the LAMMPS manual for details on
148 either of the two commands.
149
150 -r2dump <restart file> [remap] <dump file> or
151 -restart2dump <restart file> [remap] <dump file> Convert
152 <restart file> previously written by LAMMPS into a dump file and
153 immediately exit. Following <restart file> argument, the
154 optional word "remap" may be used. This has the same effect like
155 adding it to a "read_restart" command. The syntax following the
156 <dump file> name is identical to the arguments of the "dump"
157 command. See the LAMMPS manual for details on either of the two
158 commands.
159
160 -sc <file name> or -screen <file name>
161 Specify a file for LAMMPS to write its screen information to. By
162 default, this will be the standard output. If <file name> is
163 "none", (most) screen output will be suppressed. In multi-par‐
164 tition mode only some high-level all-partition information is
165 written to the screen or "<file name>" file, the remainder is
166 written in a per-partition file "screen.N" or "<file name>.N"
167 with "N" being the respective partition number, and unless over‐
168 ridden by the -pscreen flag (see above).
169
170 -sf <suffix> or -suffix <suffix>
171 Use variants of various styles in the input, if they exist. This
172 is achieved by transparently trying to convert a style named
173 <my/style> into <my/style/suffix> if that latter style exists,
174 but otherwise fall back to the former. The most useful suffixes
175 are "gpu", "intel", "kk", "omp", "opt", or "hybrid". These
176 refer to styles from optional packages that LAMMPS can be built
177 with. The hybrid suffix is special, as it enables, having two
178 suffixes tried (e.g. first "intel" and then "omp") and thus
179 requires two arguments. Along with the "-package" command-line
180 switch, this is a convenient mechanism for invoking styles from
181 accelerator packages and setting their options without having to
182 edit an input script.
183
184 See https://lammps.sandia.gov/doc/Run_options.html for addi‐
185 tional details and discussions on command-line options.
186
187
189 LAMMPS executes by reading commands from a input script (text file),
190 one line at a time. When the input script ends, LAMMPS exits. Each
191 command causes LAMMPS to take some action. It may set or change an
192 internal, read and parse a file, or run a simulation. Most commands
193 have default settings, which means you only need to use the command if
194 you wish to change the default.
195
196 The ordering of commands in an input script is usually not very impor‐
197 tant unless a command like "run" is encountered, which starts some cal‐
198 culation using the current internal state. Also, if a "pair_style" or
199 "bond_style" other similar style command is issued that has a different
200 name from what was previously active, it will replace the previous
201 style and wipe out all corresponding "pair_coeff" or "bond_coeff" or
202 equivalent settings. Some commands are only valid when they follow
203 other commands. For example you cannot set the temperature of a group
204 of atoms until atoms have been defined and a group command is used to
205 define which atoms belong to the group of a given name. Sometimes com‐
206 mand B will use values that can be set by command A. This means command
207 A must precede command B in the input to have the desired effect. Some
208 commands must be issued before the simulation box is defined and others
209 can only be issued after. Many input script errors are detected by
210 LAMMPS and an ERROR or WARNING message is printed. The documentation
211 for each command lists restrictions on how the command can be used, and
212 the chapter on errors in the LAMMPS manual gives some additional infor‐
213 mation about error messages, if possible.
214
215
217 © 2003--2019 Sandia Corporation
218
219 This package is free software; you can redistribute it and/or modify it
220 under the terms of the GNU General Public License version 2 as pub‐
221 lished by the Free Software Foundation.
222
223 This package is distributed in the hope that it will be useful, but
224 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
225 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
226 Public License for more details.
227
228 On Debian systems, the complete text of the GNU General Public License
229 can be found in `/usr/share/common-licenses/GPL-2'.
230
231
232
233 2019-06-05 LAMMPS(5 June 2019)