2006-09-22 00:22:34 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H3>run command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>run N keyword values ...
|
|
|
|
</PRE>
|
|
|
|
<UL><LI>N = # of timesteps
|
|
|
|
|
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
|
|
|
|
<LI>keyword = <I>upto</I> or <I>start</I> or <I>stop</I> or <I>pre</I> or <I>post</I> or <I>every</I>
|
|
|
|
|
|
|
|
<PRE> <I>upto</I> value = none
|
|
|
|
<I>start</I> value = N1
|
|
|
|
N1 = timestep at which 1st run started
|
|
|
|
<I>stop</I> value = N2
|
|
|
|
N2 = timestep at which last run will end
|
|
|
|
<I>pre</I> value = <I>no</I> or <I>yes</I>
|
|
|
|
<I>post</I> value = <I>no</I> or <I>yes</I>
|
2010-01-20 04:18:34 +08:00
|
|
|
<I>every</I> values = M c1 c2 ...
|
2010-01-20 04:04:41 +08:00
|
|
|
M = break the run into M-timestep segments and invoke one or more commands between each segment
|
2010-01-20 04:18:34 +08:00
|
|
|
c1,c2,...,cN = one or more LAMMPS commands, each enclosed in quotes
|
|
|
|
c1 = NULL means no command will be invoked
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>run 10000
|
|
|
|
run 1000000 upto
|
|
|
|
run 100 start 0 stop 1000
|
|
|
|
run 1000 pre no post yes
|
2010-01-20 04:04:41 +08:00
|
|
|
run 100000 start 0 stop 1000000 every 1000 "print Protein Rg = $r"
|
2006-09-22 00:22:34 +08:00
|
|
|
run 100000 every 1000 NULL
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Run or continue dynamics for a specified number of timesteps.
|
|
|
|
</P>
|
2007-10-10 02:24:42 +08:00
|
|
|
<P>When the <A HREF = "run_style.html">run style</A> is <I>respa</I>, N refers to outer
|
2006-09-22 00:22:34 +08:00
|
|
|
loop (largest) timesteps.
|
|
|
|
</P>
|
|
|
|
<P>A value of N = 0 is acceptable; only the thermodynamics of the system
|
|
|
|
are computed and printed without taking a timestep.
|
|
|
|
</P>
|
|
|
|
<P>The <I>upto</I> keyword means to perform a run starting at the current
|
|
|
|
timestep up to the specified timestep. E.g. if the current timestep
|
|
|
|
is 10,000 and "run 100000 upto" is used, then an additional 90,000
|
|
|
|
timesteps will be run. This can be useful for very long runs on a
|
|
|
|
machine that allocates chunks of time and terminate your job when time
|
|
|
|
is exceeded. If you need to restart your script multiple times
|
|
|
|
(reading in the last restart file), you can keep restarting your
|
|
|
|
script with the same run command until the simulation finally
|
|
|
|
completes.
|
|
|
|
</P>
|
|
|
|
<P>The <I>start</I> or <I>stop</I> keywords can be used if multiple runs are being
|
2007-06-26 08:03:39 +08:00
|
|
|
performed and you want a <A HREF = "fix.html">fix</A> command that changes some
|
|
|
|
value over time (e.g. temperature) to make the change across the
|
|
|
|
entire set of runs and not just a single run. See the doc page for
|
|
|
|
individual fixes to see which ones can be used with the <I>start/stop</I>
|
|
|
|
keywords. The <A HREF = "pair_style.html">pair_style soft</A> potential also
|
|
|
|
changes its pair potential coefficients in this manner.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P>For example, consider this fix followed by 10 run commands:
|
|
|
|
</P>
|
|
|
|
<PRE>fix 1 all nvt 200.0 300.0 1.0
|
|
|
|
run 1000 start 0 stop 10000
|
|
|
|
run 1000 start 0 stop 10000
|
|
|
|
...
|
|
|
|
run 1000 start 0 stop 10000
|
|
|
|
</PRE>
|
|
|
|
<P>The NVT fix ramps the target temperature from 200.0 to 300.0 during a
|
|
|
|
run. If the run commands did not have the start/stop keywords (just
|
|
|
|
"run 1000"), then the temperature would ramp from 200.0 to 300.0
|
|
|
|
during the 1000 steps of each run. With the start/stop keywords, the
|
|
|
|
ramping takes place over the 10000 steps of all runs together.
|
|
|
|
</P>
|
|
|
|
<P>The <I>pre</I> and <I>post</I> keywords can be used to streamline the setup,
|
|
|
|
clean-up, and associated output to the screen that happens before and
|
|
|
|
after a run. This can be useful if you wish to do many short runs in
|
|
|
|
succession (e.g. LAMMPS is being called as a library which is doing
|
|
|
|
other computations between successive short LAMMPS runs).
|
|
|
|
</P>
|
|
|
|
<P>By default (pre and post = yes), LAMMPS creates neighbor lists,
|
|
|
|
computes forces, and imposes fix constraints before every run. And
|
|
|
|
after every run it gathers and prints timings statistics. If a run is
|
2007-03-27 23:08:10 +08:00
|
|
|
just a continuation of a previous run (i.e. no settings are changed),
|
|
|
|
the initial computation is not necessary; the old neighbor list is
|
|
|
|
still valid as are the forces. So if <I>pre</I> is specified as "no" then
|
|
|
|
the initial setup is skipped, except for printing thermodynamic info.
|
2008-01-03 03:25:15 +08:00
|
|
|
Note that if <I>pre</I> is set to "no" for the very 1st run LAMMPS
|
|
|
|
performs, then it is overridden, since the initial setup computations
|
|
|
|
must be done.
|
2007-03-27 23:08:10 +08:00
|
|
|
</P>
|
|
|
|
<P>IMPORTANT NOTE: If your input script changes settings between 2 runs
|
|
|
|
(e.g. adds a <A HREF = "fix.html">fix</A> or <A HREF = "dump.html">dump</A> or
|
|
|
|
<A HREF = "compute.html">compute</A> or changes a <A HREF = "neigh_modify.html">neighbor</A> list
|
|
|
|
parameter), then the initial setup must be performed. LAMMPS does not
|
2008-01-03 03:25:15 +08:00
|
|
|
check for this, but it would be an error to use the <I>pre no</I> option in
|
2007-03-27 23:08:10 +08:00
|
|
|
this case.
|
|
|
|
</P>
|
|
|
|
<P>If <I>post</I> is specified as "no", the full timing summary is skipped;
|
2008-01-03 03:25:15 +08:00
|
|
|
only a one-line summary timing is printed.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2010-01-20 04:04:41 +08:00
|
|
|
<P>The <I>every</I> keyword provides a means of breaking a LAMMPS run into a
|
2010-01-20 04:18:34 +08:00
|
|
|
series of shorter runs. Optionally, one or more LAMMPS commands (c1,
|
|
|
|
c2, ..., cN) will be executed in between the short runs. If used, the
|
|
|
|
<I>every</I> keyword must be the last keyword, since it has a variable
|
|
|
|
number of arguments. Each of the trailing arguments is a single
|
|
|
|
LAMMPS command, and each command should be enclosed in quotes, so that
|
|
|
|
the entire command will be treated as a single argument. This will
|
|
|
|
also prevent any variables in the command from being evaluated until
|
|
|
|
it is executed multiple times during the run.
|
2010-01-20 04:04:41 +08:00
|
|
|
</P>
|
|
|
|
<P>The <I>every</I> keyword is a means to avoid listing a long series of runs
|
|
|
|
and interleaving commands in your input script. For example, a
|
|
|
|
<A HREF = "print.html">print</A> command could be invoked or a <A HREF = "fix.html">fix</A> could
|
|
|
|
be redefined, e.g. to reset a thermostat temperature. Or this could
|
|
|
|
be useful for invoking a command you have added to LAMMPS that wraps
|
|
|
|
some other code (e.g. as a library) to perform a computation
|
2008-01-03 03:25:15 +08:00
|
|
|
periodically during a long LAMMPS run. See <A HREF = "Section_modify.html">this
|
|
|
|
section</A> of the documentation for info about how
|
|
|
|
to add new commands to LAMMPS. See <A HREF = "Section_howto.html#4_10">this
|
|
|
|
section</A> of the documentation for ideas about
|
|
|
|
how to couple LAMMPS to other codes.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2007-12-13 23:04:49 +08:00
|
|
|
<P>With the <I>every</I> option, N total steps are simulated, in shorter runs
|
2010-01-20 04:04:41 +08:00
|
|
|
of M steps each. After each M-length run, the specified commands are
|
|
|
|
invoked. If only a single command is specified as NULL, then no
|
|
|
|
command is invoked. Thus these lines:
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2007-05-01 07:37:43 +08:00
|
|
|
<PRE>variable q equal x[100]
|
2010-01-20 04:04:41 +08:00
|
|
|
run 6000 every 2000 "print Coord = $q"
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
<P>are the equivalent of:
|
|
|
|
</P>
|
|
|
|
<PRE>variable q equal x[100]
|
|
|
|
run 2000
|
|
|
|
print Coord = $q
|
|
|
|
run 2000
|
|
|
|
print Coord = $q
|
|
|
|
run 2000
|
|
|
|
print Coord = $q
|
|
|
|
</PRE>
|
|
|
|
<P>which does 3 runs of 2000 steps and prints the x-coordinate of a
|
2010-01-20 04:04:41 +08:00
|
|
|
particular atom between runs. Note that the variable "$q" will
|
|
|
|
be evaluated afresh each time the print command is executed.
|
2009-01-06 06:26:31 +08:00
|
|
|
</P>
|
2008-01-03 03:25:15 +08:00
|
|
|
<P>If the <I>pre</I> and <I>post</I> options are set to "no" when used with the
|
|
|
|
<I>every</I> keyword, then the 1st run will do the full setup and the last
|
|
|
|
run will print the full timing summary, but these operations will be
|
|
|
|
skipped for intermediate runs.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Restrictions:</B> none
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P><A HREF = "minimize.html">minimize</A>, <A HREF = "run_style.html">run_style</A>,
|
|
|
|
<A HREF = "temper.html">temper</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B>
|
|
|
|
</P>
|
|
|
|
<P>The option defaults are start = the current timestep, stop = current
|
|
|
|
timestep + N, pre = yes, and post = yes.
|
|
|
|
</P>
|
|
|
|
</HTML>
|