LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

### reset_timestep command

Syntax:

    reset_timestep N

- N = timestep number

Examples:

    reset_timestep 0
    reset_timestep 4000000

Description:

Set the timestep counter to the specified value. This command normally comes after the timestep has been set by reading it in from a file or a previous simulation advanced the timestep.

The read_data and create_box commands set the timestep to 0; the read_restart command sets the timestep to the value it had when the restart file was written.

Restrictions: none

This command cannot be used when a dump file is defined via the dump command and has already been written to. It also cannot be used when a restart frequency has been set, and a restart file has already been written. This is because the changed timestep can mess up the planned timestep for the next file write. See the undump command or restart 0 command for info on how to turn off these definitions if necessary. New specifications for dump and restart files can be given after the reset_timestep command is used.

This command cannot be used when any fixes are defined that keep track of elapsed time to perform time-dependent operations. Examples include the "ave" fixes such as fix ave/spatial. Also fix dt/reset and fix deposit.

This command cannot be used when any dynamic regions are defined via the region command, which have time-dependent position and orientation.

There are other fixes which use the current timestep which may produce unexpected behavior, but LAMMPS allows them to be in place when resetting the timestep. For example, commands which thermostat the system, e.g. fix nvt, allow you to specify a target temperature which ramps from Tstart to Tstop which may persist over several runs. If you change the timestep, you may change the target temperature.

Resetting the timestep will clear the flags for computes that may have calculated some quantity from a previous run. This means that quantity cannot be accessed by a variable in between runs until a new run is performed. See the variable command for more details.

Related commands: none

Default: none