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>write_restart command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2013-11-23 01:34:49 +08:00
|
|
|
<PRE>write_restart file keyword value ...
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
<UL><LI>file = name of file to write restart information to
|
2013-11-23 01:34:49 +08:00
|
|
|
|
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
|
|
|
|
<LI>keyword = <I>fileper</I> or <I>nfile</I>
|
|
|
|
|
|
|
|
<PRE> <I>fileper</I> arg = Np
|
|
|
|
Np = write one file for every this many processors
|
|
|
|
<I>nfile</I> arg = Nf
|
|
|
|
Nf = write this many files, one from each of Nf processors
|
|
|
|
</PRE>
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>write_restart restart.equil
|
2013-11-23 01:34:49 +08:00
|
|
|
write_restart poly.%.* nfile 10
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Write a binary restart file of the current state of the simulation.
|
|
|
|
</P>
|
|
|
|
<P>During a long simulation, the <A HREF = "restart.html">restart</A> command is
|
2013-11-23 01:34:49 +08:00
|
|
|
typically used to output restart files periodically. The
|
|
|
|
write_restart command is useful after a minimization or whenever you
|
|
|
|
wish to write out a single current restart file.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P>Similar to <A HREF = "dump.html">dump</A> files, the restart filename can contain
|
|
|
|
two wild-card characters. If a "*" appears in the filename, it is
|
|
|
|
replaced with the current timestep value. If a "%" character appears
|
|
|
|
in the filename, then one file is written by each processor and the
|
|
|
|
"%" character is replaced with the processor ID from 0 to P-1. An
|
|
|
|
additional file with the "%" replaced by "base" is also written, which
|
|
|
|
contains global information. For example, the files written for
|
|
|
|
filename restart.% would be restart.base, restart.0, restart.1, ...
|
|
|
|
restart.P-1. This creates smaller files and can be a fast mode of
|
2010-09-11 07:00:40 +08:00
|
|
|
output and subsequent input on parallel machines that support parallel
|
2013-11-23 01:34:49 +08:00
|
|
|
I/O. The optional <I>fileper</I> and <I>nfile</I> keywords discussed below can
|
|
|
|
alter the number of files written.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P>Restart files can be read by a <A HREF = "read_restart.html">read_restart</A>
|
|
|
|
command to restart a simulation from a particular state. Because the
|
|
|
|
file is binary (to enable exact restarts), it may not be readable on
|
2013-11-23 01:34:49 +08:00
|
|
|
another machine. In this case, you can use the <A HREF = "Section_start.html#start_7">-r command-line
|
|
|
|
switch</A> to convert a restart file to a data
|
|
|
|
file.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2012-10-08 23:32:53 +08:00
|
|
|
<P>IMPORTANT NOTE: Although the purpose of restart files is to enable
|
|
|
|
restarting a simulation from where it left off, not all information
|
|
|
|
about a simulation is stored in the file. For example, the list of
|
|
|
|
fixes that were specified during the initial run is not stored, which
|
|
|
|
means the new input script must specify any fixes you want to use.
|
|
|
|
Even when restart information is stored in the file, as it is for some
|
|
|
|
fixes, commands may need to be re-specified in the new input script,
|
|
|
|
in order to re-use that information. See the
|
|
|
|
<A HREF = "read_restart.html">read_restart</A> command for information about what is
|
|
|
|
stored in a restart file.
|
|
|
|
</P>
|
2013-11-23 01:34:49 +08:00
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>The optional <I>nfile</I> or <I>fileper</I> keywords can be used in conjunction
|
|
|
|
with the "%" wildcard character in the specified restart file name.
|
|
|
|
As explained above, the "%" character causes the restart file to be
|
|
|
|
written in pieces, one piece for each of P processors. By default P =
|
|
|
|
the number of processors the simulation is running on. The <I>nfile</I> or
|
|
|
|
<I>fileper</I> keyword can be used to set P to a smaller value, which can
|
|
|
|
be more efficient when running on a large number of processors.
|
|
|
|
</P>
|
|
|
|
<P>The <I>nfile</I> keyword sets P to the specified Nf value. For example, if
|
|
|
|
Nf = 4, and the simulation is running on 100 processors, 4 files will
|
|
|
|
be written, by processors 0,25,50,75. Each will collect information
|
|
|
|
from itself and the next 24 processors and write it to a restart file.
|
|
|
|
</P>
|
|
|
|
<P>For the <I>fileper</I> keyword, the specified value of Np means write one
|
|
|
|
file for every Np processors. For example, if Np = 4, every 4th
|
|
|
|
processor (0,4,8,12,etc) will collect information from itself and the
|
|
|
|
next 3 processors and write it to a restart file.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>This command requires inter-processor communication to migrate atoms
|
|
|
|
before the restart file is written. This means that your system must
|
|
|
|
be ready to perform a simulation before using this command (force
|
2010-09-11 07:00:40 +08:00
|
|
|
fields setup, atom masses initialized, etc).
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
2013-04-04 01:06:31 +08:00
|
|
|
<P><A HREF = "restart.html">restart</A>, <A HREF = "read_restart.html">read_restart</A>,
|
|
|
|
<A HREF = "write_data.html">write_data</A>
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|