diff --git a/doc/Section_howto.html b/doc/Section_howto.html index 74f4917096..69c8add025 100644 --- a/doc/Section_howto.html +++ b/doc/Section_howto.html @@ -51,10 +51,9 @@ run will continue from where the previous run left off. Or binary restart files can be saved to disk using the restart command. At a later time, these binary files can be read via a read_restart command in a new script. Or they can -be converted to text data files and read by a -read_data command in a new script. This -section discusses the restart2data tool that is -used to perform the conversion. +be converted to text data files using the -r command-line +switch and read by a +read_data command in a new script.

Here we give examples of 2 scripts that read either a binary restart file or a converted data file and then issue a new run command to @@ -100,9 +99,9 @@ notice that the thermodynamic data match at step 50 (if you also put a uses random numbers in a way that does not allow for perfect restarts.

As an alternate approach, the restart file could be converted to a data -file using this tool: +file as follows:

-
restart2data tmp.restart.50 tmp.restart.data 
+
lmp_g++ -r tmp.restart.50 tmp.restart.data 
 

Then, this script could be used to re-run the last 50 steps:

diff --git a/doc/Section_howto.txt b/doc/Section_howto.txt index 9d1ba9911b..b52d2244d3 100644 --- a/doc/Section_howto.txt +++ b/doc/Section_howto.txt @@ -47,10 +47,9 @@ run will continue from where the previous run left off. Or binary restart files can be saved to disk using the "restart"_restart.html command. At a later time, these binary files can be read via a "read_restart"_read_restart.html command in a new script. Or they can -be converted to text data files and read by a -"read_data"_read_data.html command in a new script. "This -section"_Section_tools.html discusses the {restart2data} tool that is -used to perform the conversion. +be converted to text data files using the "-r command-line +switch"_Section_start.html#start_7 and read by a +"read_data"_read_data.html command in a new script. Here we give examples of 2 scripts that read either a binary restart file or a converted data file and then issue a new run command to @@ -96,9 +95,9 @@ notice that the thermodynamic data match at step 50 (if you also put a uses random numbers in a way that does not allow for perfect restarts. As an alternate approach, the restart file could be converted to a data -file using this tool: +file as follows: -restart2data tmp.restart.50 tmp.restart.data :pre +lmp_g++ -r tmp.restart.50 tmp.restart.data :pre Then, this script could be used to re-run the last 50 steps: diff --git a/doc/Section_start.html b/doc/Section_start.html index 230c8644ed..887b950630 100644 --- a/doc/Section_start.html +++ b/doc/Section_start.html @@ -1018,7 +1018,8 @@ letter abbreviation can be used:
  • -p or -partition
  • -pl or -plog
  • -ps or -pscreen -
  • -r or -reorder +
  • -r or -restart +
  • -ro or -reorder
  • -sc or -screen
  • -sf or -suffix
  • -v or -var @@ -1138,6 +1139,21 @@ 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 
    +
    +

    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
    +write_data datafile 
    +
    +

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

    -reorder nth N
     -reorder custom filename 
     
    diff --git a/doc/Section_start.txt b/doc/Section_start.txt index f785d4d103..f3e1bc778d 100644 --- a/doc/Section_start.txt +++ b/doc/Section_start.txt @@ -1009,7 +1009,8 @@ letter abbreviation can be used: -p or -partition -pl or -plog -ps or -pscreen --r or -reorder +-r or -restart +-ro or -reorder -sc or -screen -sf or -suffix -v or -var :ul @@ -1129,6 +1130,21 @@ 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 :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 +write_data datafile :pre + +Note that the specified restartfile and datafile can have wild-card +characters ("*",%") as described by the +"read_restart"_read_restart.html and "write_data"_write_data.html +commands. But a filename such as file.* will need to be enclosed in +quotes to avoid shell expansion of the "*" character. + -reorder nth N -reorder custom filename :pre diff --git a/doc/Section_tools.html b/doc/Section_tools.html index fbbf46d10a..5c72e09e76 100644 --- a/doc/Section_tools.html +++ b/doc/Section_tools.html @@ -417,12 +417,22 @@ the README.txt file for more info.

    restart2data tool

    -

    IMPORTANT NOTE: LAMMPS now has a write_data command, -which can create a data file from within an input script. This means -a two line input script can read a restart file, and write it as a -data file. When the write_data command is fully functional, the -restart2data tool will be obsolete, and will be retired from the -distribution. +

    IMPORTANT NOTE: This tool is now obsolete and is not included in the +current LAMMPS distribution. This is becaues there is now a +write_data command, which can create a data file +from within an input script. Running LAMMPS with the "-r" +command-line switch as follows: +

    +

    lmp_g++ -r restartfile datafile +

    +

    is the same as running a 2-line input script: +

    +

    read_restart restartfile +write_data datafile +

    +

    which will produce the same data file that the restart2data tool used +to create. The following information is included in case you have an +older version of LAMMPS which still includes the restart2data tool.

    The file restart2data.cpp converts a binary LAMMPS restart file into an ASCII data file. The syntax for running the tool is diff --git a/doc/Section_tools.txt b/doc/Section_tools.txt index 0f794fab38..c2383a29e8 100644 --- a/doc/Section_tools.txt +++ b/doc/Section_tools.txt @@ -413,12 +413,22 @@ These tools were written by Aidan Thompson at Sandia. restart2data tool :h4,link(restart) -IMPORTANT NOTE: LAMMPS now has a "write_data"_write_data.html command, -which can create a data file from within an input script. This means -a two line input script can read a restart file, and write it as a -data file. When the write_data command is fully functional, the -restart2data tool will be obsolete, and will be retired from the -distribution. +IMPORTANT NOTE: This tool is now obsolete and is not included in the +current LAMMPS distribution. This is becaues there is now a +"write_data"_write_data.html command, which can create a data file +from within an input script. Running LAMMPS with the "-r" +"command-line switch"_Section_start.html#start_7 as follows: + +lmp_g++ -r restartfile datafile + +is the same as running a 2-line input script: + +read_restart restartfile +write_data datafile + +which will produce the same data file that the restart2data tool used +to create. The following information is included in case you have an +older version of LAMMPS which still includes the restart2data tool. The file restart2data.cpp converts a binary LAMMPS restart file into an ASCII data file. The syntax for running the tool is diff --git a/doc/read_dump.html b/doc/read_dump.html index 323defc696..be9f384ee6 100644 --- a/doc/read_dump.html +++ b/doc/read_dump.html @@ -71,9 +71,9 @@ coordinates, and optionally the atom velocities and image flags and the simluation box dimensions. This is useful for restarting a run from a particular snapshot in a dump file. See the read_restart and read_data -commands and the restart2data tool for -alternative methods to do this. Also see the rerun -command for a means of reading multiple snapshots from a dump file. +commands for alternative methods to do this. Also see the +rerun command for a means of reading multiple snapshots +from a dump file.

    Note that a simulation box must already be defined before using the read_dump command. This can be done by the diff --git a/doc/read_dump.txt b/doc/read_dump.txt index a7cddc6dfd..4a8a4a16ca 100644 --- a/doc/read_dump.txt +++ b/doc/read_dump.txt @@ -61,9 +61,9 @@ coordinates, and optionally the atom velocities and image flags and the simluation box dimensions. This is useful for restarting a run from a particular snapshot in a dump file. See the "read_restart"_read_restart.html and "read_data"_read_data.html -commands and the "restart2data"_Section_tools.html#restart tool for -alternative methods to do this. Also see the "rerun"_rerun.html -command for a means of reading multiple snapshots from a dump file. +commands for alternative methods to do this. Also see the +"rerun"_rerun.html command for a means of reading multiple snapshots +from a dump file. Note that a simulation box must already be defined before using the read_dump command. This can be done by the diff --git a/doc/read_restart.html b/doc/read_restart.html index 2c76ce6bf9..8b70735df2 100644 --- a/doc/read_restart.html +++ b/doc/read_restart.html @@ -61,9 +61,9 @@ produced the restart file, it could be a LAMMPS bug, so consider 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. +machines. In this case, you can use the -r command-line +switch to convert a restart file to a data +file.

    Similar to how restart files are written (see the write_restart and restart @@ -81,16 +81,16 @@ set of multiple files to exist. The restart and write_restart 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 -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. +created the set and how many files are in it. 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 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.


    diff --git a/doc/read_restart.txt b/doc/read_restart.txt index cc7a95d656..dd0a293dab 100644 --- a/doc/read_restart.txt +++ b/doc/read_restart.txt @@ -58,9 +58,9 @@ produced the restart file, it could be a LAMMPS bug, so consider 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"_Section_tools.html#restart in the tools -sub-directory of the LAMMPS distribution. +machines. In this case, you can use the "-r command-line +switch"_Section_start.html#start_7 to convert a restart file to a data +file. Similar to how restart files are written (see the "write_restart"_write_restart.html and "restart"_restart.html @@ -78,16 +78,16 @@ 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 -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. +created the set and how many files are in it. 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 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. :line diff --git a/doc/restart.html b/doc/restart.html index 2b651482a5..7091c9f3cc 100644 --- a/doc/restart.html +++ b/doc/restart.html @@ -14,13 +14,27 @@

    Syntax:

    restart 0
    -restart N root
    -restart N file1 file2 
    +restart N root keyword value ...
    +restart N file1 file2 keyword value ... 
     
    -