-h or -help
Print a brief help summary and a list of settings and options compiled into this executable. It
also explicitly lists all LAMMPS styles (atom_style, fix, compute, pair_style, bond_style, etc)
available in the specific executable. This can tell you if the command you want to use was
included via the appropriate package at compile time. LAMMPS will print the info and immediately
exit if this switch is used.
-e or -echo
Set the style of command echoing. The style can be none or screen or log or both. Depending on
the style, each command read from the input script will be echoed to the screen and/or logfile.
This can be useful to figure out which line of your script is causing an input error. The default
value is log.-i<inputfile> or -in<inputfile>
Specify a file to use as an input script. If it is not specified, LAMMPS reads its script from
standard input. This is a required switch when running LAMMPS in multi-partition mode.
-kon/off[keywordvalue] or -kokkoson/off[keywordvalue]
Enable or disable general KOKKOS support, as provided by the KOKKOS package. Even if LAMMPS is
built with this package, this switch must be set to on to enable running with KOKKOS-enabled
styles. More details on this switch and its optional keyword value pairs are discussed at:
https://docs.lammps.org/Run_options.html
-l<logfile> or -log<logfile>
Specify a log file for LAMMPS to write status information to. The default value is "log.lammps".
If the file name "none" is used, LAMMPS will not write a log file. In multi-partition mode only
some high-level all-partition information is written to the "<log file>" file, the remainder is
written in a per-partition file "<log file>.N" with "N" being the respective partition number,
unless overridden by the -plog flag (see below).
-m<number> or -mpicolor<number>
If used, this must be the first command-line argument after the LAMMPS executable name. It is only
used when LAMMPS is launched by an mpirun command which also launches one or more other
executable(s) at the same time. LAMMPS and the other executable(s) perform an MPI_Comm_split(),
each with their own different colors, to split the MPI_COMM_WORLD communicator for each executable
to the subset of processors they are supposed to be actually running on. Currently, this is only
used in LAMMPS to perform client/server messaging with another application. LAMMPS can act as
either a client or server (or both).
-mdi'<mdi_flags>'
This flag is only recognized and used when LAMMPS has support for the MolSSI Driver Interface
(MDI) included as part of the MDI package. This flag is specific to the MDI library and controls
how LAMMPS interacts with MDI. There are usually multiple flags that have to follow it and those
have to be placed in quotation marks. For more information about how to launch LAMMPS in MDI
client/server mode please refer to the MDI How-to at https://docs.lammps.org/Howto_mdi.html
-c or -cite<styleorfilename>
Select how and where to output a reminder about citing contributions to the LAMMPS code that were
used during the run. Available keywords for styles are "both", "none", "screen", or "log". Any
other keyword will be considered a file name to write the detailed citation info to instead of
logfile or screen. Default is the "log" style where there is a short summary in the screen output
and detailed citations in BibTeX format in the logfile. The option "both" selects the detailed
output for both, "none", the short output for both, and "screen" will write the detailed info to
the screen and the short version to the log file. If a dedicated citation info file is requested,
the screen and log file output will be in the short format (same as with "none").
See https://docs.lammps.org/Intro_citing.html for more details on how to correctly reference and
cite LAMMPS-nc or -nocite
Disable writing the "log.cite" file which is normally written to list references for specific
cite-able features used during a LAMMPS run.
-pk<style>[options] or -package<style>[options]
Invoke the package command with <style> and optional arguments. The syntax is the same as if the
command appeared in an input script. For example "-pk gpu 2" is the same as "package gpu 2" in
the input script. The possible styles and options are discussed in the LAMMPS manual for the
"package" command. This switch can be used multiple times, e.g. to set options for the INTEL and
OPENMP packages when used together. Along with the "-sf" or "-suffix" switch, this is a convenient
mechanism for invoking accelerator packages and their options without having to edit an input
script.
-p or -partition
Invoke LAMMPS in multi-partition mode. Without this, LAMMPS uses all P processors allocated via
MPI to run a single simulation. If this switch is used, the P processors are split into separate
partitions and each partition runs its own simulation. The arguments to the switch specify the
number of processors in each partition. Arguments of the form "MxN" mean M partitions, each with
N processors. Arguments of the form "N" mean a single partition with N processors. The sum of
processors in all partitions must be equal P. Thus the command “-partition 8x2 4 5” has 10
partitions and runs on a total of 25 processors. Running with multiple partitions is required for
multi-replica simulations, where each replica runs on on one or more few processors.
-pl<basename> or -plog<basename>
Specify the base name for the per-partition log files in multi-partition runs, where partition N
writes log information to <basename>.N. If basename is set to "none", then no per-partition log
files are created. This overrides the name specified in the -log command-line option.
-ps<basename> or -pscreen<basename>
Specify the base name for the per-partition screen files in multi-partition runs, where partition
N writes screen output to <basename>.N. If basename is set to "none", then no per-partition
screen files are created. The default value is "screen" or whatever is set by the -screen flag.
-r2data<restartfile>[remap]<datafile> or
-restart2data<restartfile>[remap]<datafile> Convert <restart file> previously written by
LAMMPS into a data file and immediately exit. This option has replaced the external restart2data
executable. Following <restart file> argument, the optional word "remap" may be used. This has the
same effect like adding it to a "read_restart" command. The syntax following the <data file> name
is identical to the arguments of the "write_data" command. See the LAMMPS manual for details on
either of the two commands.
-r2dump<restartfile>[remap]<dumpfile> or
-restart2dump<restartfile>[remap]<dumpfile> Convert <restart file> previously written by
LAMMPS into a dump file and immediately exit. Following <restart file> argument, the optional word
"remap" may be used. This has the same effect like adding it to a "read_restart" command. The
syntax following the <dump file> name is identical to the arguments of the "dump" command. See the
LAMMPS manual for details on either of the two commands.
-sc<filename> or -screen<filename>
Specify a file for LAMMPS to write its screen information to. By default, this will be the
standard output. If <file name> is "none", (most) screen output will be suppressed. In multi-
partition mode only some high-level all-partition information is written to the screen or "<file
name>" file, the remainder is written in a per-partition file "screen.N" or "<file name>.N" with
"N" being the respective partition number, and unless overridden by the -pscreen flag (see above).
-sf<suffix> or -suffix<suffix>
Use variants of various styles in the input, if they exist. This is achieved by transparently
trying to convert a style named <my/style> into <my/style/suffix> if that latter style exists, but
otherwise fall back to the former. The most useful suffixes are "gpu", "intel", "kk", "omp",
"opt", or "hybrid". These refer to styles from optional packages that LAMMPS can be built with.
The hybrid suffix is special, as it enables, having two suffixes tried (e.g. first "intel" and
then "omp") and thus requires two arguments. Along with the "-package" command-line switch, this
is a convenient mechanism for invoking styles from accelerator packages and setting their options
without having to edit an input script.
-sr or -skiprun
Insert the command "timer timeout 0 every 1" at the beginning of an input file or after a "clear"
command. This has the effect that the entire LAMMPS input script is processed without executing
actual "run" or "minimize" or similar commands (their main loops are skipped). This can be
helpful and convenient to test input scripts of long running calculations for correctness to avoid
having them crash after a long time due to a typo or syntax error in the middle or at the end.
See https://docs.lammps.org/Run_options.html for additional details and discussions on command-
line options.