LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

read_restart command

Syntax:

read_restart file 

Examples:

read_restart save.10000 

Description:

Read in a previously saved problem from a restart file. This allows continuation of a previous run.

Restart files are saved in binary format to enable exact restarts, meaning that the trajectories of a restarted run will precisely match 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 include running on a different number of processors or changing certain settings such as those set by the newton or processors commands. LAMMPS will issue a WARNING in these cases. Certain fixes will also not restart exactly, though they should provide statistically similar results. These include the shake and langevin styles. 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 if you think the behavior is wrong.

Because restart files are binary, they may not be portable to other machines. They can be converted to ASCII data files using the restart2data tool in the tools sub-directory of the LAMMPS distribution.

A restart file stores the units and atom style, simulation box attibutes, individual atoms and their attributes including molecular topology, force field styles and coefficients, special_bonds settings, and atom group definitions. This means that commands for these quantities do not need to be specified in your input script that reads the restart file. The exceptions to this are listed below in the Restrictions section.

Information about the kspace_style settings are not stored in the restart file. Hence if you wish to invoke an Ewald or PPPM solver, this command must be re-issued after the restart file is read.

The restart file also stores values for any fixes that require state information to enable restarting where they left off. These include the nvt and npt styles that have a global state, as well as the msd and wall/gran styles that store information about each atom.

Fix commands are not stored in the restart file which means they must be specified in the input script that reads the restart file. To re-enable a fix whose state was stored in the restart file, the fix command in the new input script must use the same fix-ID and group-ID as the input script that wrote the restart file. LAMMPS will print a message indicating that the fix is being re-enabled.

Note that no other information is stored in the restart file. This means that your new input script should specify settings for quantities like timestep size, thermodynamic and dump output, etc.

Bond interactions (angle, etc) that have been turned off by the fix shake or delete_bonds 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.

Restrictions:

The pair_style eam, table, and hybrid styles do not store coefficient data for individual atom type pairs in the restart file. Nor does the bond_style hybrid style. Thus you must use new pair_coeff and bond_coeff commands to read the appropriate tabulated files or reset the coefficients after the restart file is read.

Related commands:

read_data, write_restart, restart

Default: none