diff --git a/doc/Section_start.html b/doc/Section_start.html index 274223250b..e703458438 100644 --- a/doc/Section_start.html +++ b/doc/Section_start.html @@ -1356,13 +1356,13 @@ sub-directory (-pscreen replica_files/screen). If this option is not used the screen file for partition N is screen.N or whatever is specified by the -screen command-line option.

-
-restart restartfile datafile keyword value ... 
+
-restart restartfile remap datafile keyword value ... 
 

Convert the restart file into a data file and immediately exit. This is the same operation as if the following 2-line input script were run:

-
read_restart restartfile
+
read_restart restartfile remap
 write_data datafile keyword value ... 
 

Note that the specified restartfile and datafile can have wild-card @@ -1371,6 +1371,13 @@ characters ("*",%") as described by the commands. But a filename such as file.* will need to be enclosed in quotes to avoid shell expansion of the "*" character.

+

Note that following restartfile, the optional flag remap can be +used. This has the same effect as adding it to the +read_restart command, as explained on its doc +page. This is only useful if the reading of the restart file triggers +an error that atoms have been lost. In that case, use of the remap +flag should allow the data file to still be produced. +

Also note that following datafile, the same optional keyword/value pairs can be listed as used by the write_data command. diff --git a/doc/Section_start.txt b/doc/Section_start.txt index 52fec57ee2..c1d76082f2 100644 --- a/doc/Section_start.txt +++ b/doc/Section_start.txt @@ -1350,13 +1350,13 @@ sub-directory (-pscreen replica_files/screen). If this option is not used the screen file for partition N is screen.N or whatever is specified by the -screen command-line option. --restart restartfile datafile keyword value ... :pre +-restart restartfile {remap} datafile keyword value ... :pre Convert the restart file into a data file and immediately exit. This is the same operation as if the following 2-line input script were run: -read_restart restartfile +read_restart restartfile {remap} write_data datafile keyword value ... :pre Note that the specified restartfile and datafile can have wild-card @@ -1365,6 +1365,13 @@ characters ("*",%") as described by the commands. But a filename such as file.* will need to be enclosed in quotes to avoid shell expansion of the "*" character. +Note that following restartfile, the optional flag {remap} can be +used. This has the same effect as adding it to the +"read_restart"_read_restart.html command, as explained on its doc +page. This is only useful if the reading of the restart file triggers +an error that atoms have been lost. In that case, use of the remap +flag should allow the data file to still be produced. + Also note that following datafile, the same optional keyword/value pairs can be listed as used by the "write_data"_write_data.html command. diff --git a/doc/read_restart.html b/doc/read_restart.html index 4835373854..704a31bd70 100644 --- a/doc/read_restart.html +++ b/doc/read_restart.html @@ -13,16 +13,19 @@

Syntax:

-
read_restart file 
+
read_restart file flag 
 
  • file = name of binary restart file to read in
+

flag = remap (optional) +

Examples:

read_restart save.10000
+read_restart save.10000 remap
 read_restart restart.*
 read_restart restart.*.mpiio
-read_restart poly.*.% 
+read_restart poly.*.% remap 
 
 
@@ -40,6 +43,17 @@ number of processors in the current simulation and the settings of the changed by the balance or fix balance commands.

+

IMPORTANT NOTE: Normally, restart files are written by the +restart or write_restart commands +so that all atoms in the restart file are inside the simulation box. +If this is not the case, the read_restart command will print an error +that atoms were "lost" when the file is read. This error should be +reported to the LAMMPS developers so the invalid writing of the +restart file can be fixed. If you still wish to use the restart file, +the optional remap flag can be appended to the read_restart command. +This will avoid the error, by explicitly remapping each atom back into +the simulation box, updating image flags for the atom appropriately. +

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. diff --git a/doc/read_restart.txt b/doc/read_restart.txt index d08fce975b..4ed080994d 100644 --- a/doc/read_restart.txt +++ b/doc/read_restart.txt @@ -10,16 +10,18 @@ read_restart command :h3 [Syntax:] -read_restart file :pre +read_restart file flag :pre file = name of binary restart file to read in :ul +flag = remap (optional) [Examples:] read_restart save.10000 +read_restart save.10000 remap read_restart restart.* read_restart restart.*.mpiio -read_restart poly.*.% :pre +read_restart poly.*.% remap :pre :pre @@ -37,6 +39,17 @@ number of processors in the current simulation and the settings of the changed by the "balance"_balance.html or "fix balance"_fix_balance.html commands. +IMPORTANT NOTE: Normally, restart files are written by the +"restart"_restart.html or "write_restart"_write_restart.html commands +so that all atoms in the restart file are inside the simulation box. +If this is not the case, the read_restart command will print an error +that atoms were "lost" when the file is read. This error should be +reported to the LAMMPS developers so the invalid writing of the +restart file can be fixed. If you still wish to use the restart file, +the optional {remap} flag can be appended to the read_restart command. +This will avoid the error, by explicitly remapping each atom back into +the simulation box, updating image flags for the atom appropriately. + 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.