2006-09-22 00:22:34 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
read_restart command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
|
|
|
read_restart file :pre
|
|
|
|
|
|
|
|
file = name of binary restart file to read in :ul
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
read_restart save.10000
|
|
|
|
read_restart restart.*
|
|
|
|
read_restart poly.*.% :pre
|
|
|
|
|
|
|
|
:pre
|
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2007-06-26 08:03:39 +08:00
|
|
|
Read in a previously saved simulation from a restart file. This
|
|
|
|
allows continuation of a previous run. Information about what is
|
|
|
|
stored in a restart file is given below.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
Restart files are saved in binary format to enable exact restarts,
|
|
|
|
meaning that the trajectories of a restarted run will precisely match
|
2012-06-19 07:15:48 +08:00
|
|
|
those produced by the original run had it continued on.
|
|
|
|
|
|
|
|
Several things can prevent exact restarts due to round-off effects, in
|
|
|
|
which case the trajectories in the 2 runs will slowly diverge. These
|
2006-09-22 00:22:34 +08:00
|
|
|
include running on a different number of processors or changing
|
|
|
|
certain settings such as those set by the "newton"_newton.html or
|
2010-10-28 04:54:22 +08:00
|
|
|
"processors"_processors.html commands. LAMMPS will issue a warning in
|
2012-06-19 07:15:48 +08:00
|
|
|
these cases.
|
|
|
|
|
|
|
|
Certain fixes will not restart exactly, though they should provide
|
|
|
|
statistically similar results. These include "fix
|
|
|
|
shake"_fix_shake.html and "fix langevin"_fix_langevin.html.
|
|
|
|
|
|
|
|
Certain pair styles will not restart exactly, though they should
|
|
|
|
provide statistically similar results. This is because the forces
|
|
|
|
they compute depend on atom velocities, which are used at half-step
|
|
|
|
values every timestep when forces are computed. When a run restarts,
|
2013-02-01 00:39:48 +08:00
|
|
|
forces are initially evaluated with a full-step velocity, which is
|
2012-06-19 07:15:48 +08:00
|
|
|
different than if the run had continued. These pair styles include
|
|
|
|
"granular pair styles"_pair_gran.html, "pair dpd"_pair_dpd.html, and
|
|
|
|
"pair lubricate"_pair_lubricate.html.
|
|
|
|
|
|
|
|
If a restarted run is immediately different than the run which
|
|
|
|
produced the restart file, it could be a LAMMPS bug, so consider
|
|
|
|
"reporting it"_Section_errors.html#err_2 if you think the behavior is
|
|
|
|
wrong.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
Because restart files are binary, they may not be portable to other
|
|
|
|
machines. They can be converted to ASCII data files using the
|
2007-03-08 09:01:08 +08:00
|
|
|
"restart2data tool"_Section_tools.html#restart in the tools
|
|
|
|
sub-directory of the LAMMPS distribution.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
Similar to how restart files are written (see the
|
|
|
|
"write_restart"_write_restart.html and "restart"_restart.html
|
|
|
|
commands), the restart filename can contain two wild-card characters.
|
|
|
|
If a "*" appears in the filename, the directory is searched for all
|
|
|
|
filenames that match the pattern where "*" is replaced with a timestep
|
|
|
|
value. The file with the largest timestep value is read in. Thus,
|
|
|
|
this effectively means, read the latest restart file. It's useful if
|
|
|
|
you want your script to continue a run from where it left off. See
|
|
|
|
the "run"_run.html command and its "upto" option for how to specify
|
|
|
|
the run command so it doesn't need to be changed either.
|
|
|
|
|
|
|
|
If a "%" character appears in the restart filename, LAMMPS expects a
|
|
|
|
set of multiple files to exist. The "restart"_restart.html and
|
|
|
|
"write_restart"_write_restart.html commands explain how such sets are
|
|
|
|
created. Read_restart will first read a filename where "%" is
|
|
|
|
replaced by "base". This file tells LAMMPS how many processors
|
|
|
|
created the set. Read_restart then reads the additional files. For
|
|
|
|
example, if the restart file was specified as save.% when it was
|
|
|
|
written, then read_restart reads the files save.base, save.0, save.1,
|
|
|
|
... save.P-1, where P is the number of processors that created the
|
2010-09-11 07:00:40 +08:00
|
|
|
restart file. The processors in the current LAMMPS simulation share
|
|
|
|
the work of reading these files; each reads a roughly equal subset of
|
|
|
|
the files. The number of processors which created the set can be
|
|
|
|
different the number of processors in the current LAMMPS simulation.
|
|
|
|
This can be a fast mode of input on parallel machines that support
|
|
|
|
parallel I/O.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
2007-06-26 08:03:39 +08:00
|
|
|
A restart file stores the following information about a simulation:
|
|
|
|
units and atom style, simulation box size and shape and boundary
|
2011-04-14 05:39:34 +08:00
|
|
|
settings, group definitions, per-type atom settings such as mass,
|
|
|
|
per-atom attributes including their group assignments and molecular
|
|
|
|
topology attributes, force field styles and coefficients, and
|
|
|
|
"special_bonds"_special_bonds.html settings. This means that commands
|
|
|
|
for these quantities do not need to be re-specified in the input
|
|
|
|
script that reads the restart file, though you can redefine settings
|
|
|
|
after the restart file is read.
|
2007-06-26 08:03:39 +08:00
|
|
|
|
|
|
|
One exception is that some pair styles do not store their info in
|
|
|
|
restart files. The doc pages for individual pair styles note if this
|
|
|
|
is the case. This is also true of bond_style hybrid (and angle_style,
|
|
|
|
dihedral_style, improper_style hybrid).
|
|
|
|
|
2013-03-11 22:51:34 +08:00
|
|
|
All settings made by the "pair_modify"_pair_modify.html command,
|
2012-10-05 23:32:01 +08:00
|
|
|
such as the shift and tail settings, are stored in the restart file
|
|
|
|
with the pair style. The one exception is the "pair_modify
|
|
|
|
compute"_pair_modify.html setting is not stored.
|
|
|
|
|
2007-06-26 08:03:39 +08:00
|
|
|
Information about "kspace_style"_kspace_style.html settings are not
|
|
|
|
stored in the restart file. Hence if you wish to use an Ewald or PPPM
|
|
|
|
solver, these commands must be re-issued after the restart file is
|
|
|
|
read.
|
|
|
|
|
|
|
|
The list of "fixes"_fix.html used for a simulation is not stored in
|
|
|
|
the restart file. This means the new input script should specify all
|
|
|
|
fixes it will use. Note that some fixes store an internal "state"
|
|
|
|
which is written to the restart file. This allows the fix to continue
|
|
|
|
on with its calculations in a restarted simulation. To re-enable such
|
|
|
|
a fix, the fix command in the new input script must use the same
|
|
|
|
fix-ID and group-ID as was used in the input script that wrote the
|
|
|
|
restart file. If a match is found, LAMMPS prints a message indicating
|
|
|
|
that the fix is being re-enabled. If no match is found before the
|
|
|
|
first run or minimization is performed by the new script, the "state"
|
|
|
|
information for the saved fix is discarded. See the doc pages for
|
|
|
|
individual fixes for info on which ones can be restarted in this
|
|
|
|
manner.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
Bond interactions (angle, etc) that have been turned off by the "fix
|
|
|
|
shake"_fix_shake.html or "delete_bonds"_delete_bonds.html command will
|
|
|
|
be written to a restart file as if they are turned on. This means
|
|
|
|
they will need to be turned off again in a new run after the restart
|
|
|
|
file is read.
|
|
|
|
|
|
|
|
Bonds that are broken (e.g. by a bond-breaking potential) are written
|
|
|
|
to the restart file as broken bonds with a type of 0. Thus these
|
|
|
|
bonds will still be broken when the restart file is read.
|
|
|
|
|
2007-06-26 08:03:39 +08:00
|
|
|
IMPORTANT NOTE: No other information is stored in the restart file.
|
|
|
|
This means that an input script that reads a restart file should
|
|
|
|
specify settings for quantities like "timestep size"_timestep.html,
|
2013-03-11 22:51:34 +08:00
|
|
|
"thermodynamic"_thermo_style.html, "neighbor list"_neighbor.html
|
2011-07-15 20:46:02 +08:00
|
|
|
criteria including settings made via the
|
2013-03-11 22:51:34 +08:00
|
|
|
"neigh_modify"_neigh_modify.html comand, "dump"_dump.html file
|
2011-07-15 20:46:02 +08:00
|
|
|
output, "geometric regions"_region.html, etc.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2012-06-19 07:15:48 +08:00
|
|
|
:line
|
|
|
|
|
2007-06-26 08:03:39 +08:00
|
|
|
[Restrictions:] none
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
2012-06-02 00:41:20 +08:00
|
|
|
"read_data"_read_data.html, "read_dump"_read_dump.html,
|
|
|
|
"write_restart"_write_restart.html, "restart"_restart.html
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Default:] none
|