diff --git a/doc/Section_commands.html b/doc/Section_commands.html index ff9a0aa91f..79e39d543b 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -306,7 +306,7 @@ in the command's documentation. dump_modify, restart, thermo, thermo_modify, thermo_style, undump, -write_restart +write_data, write_restart
Actions:
@@ -350,7 +350,7 @@ in the command's documentation.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. +
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 15a270c515..4dd3883fb7 100644 --- a/doc/Section_tools.txt +++ b/doc/Section_tools.txt @@ -398,6 +398,13 @@ 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. + 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_data.html b/doc/read_data.html index 17f96a2539..fd6d8c7a18 100644 --- a/doc/read_data.html +++ b/doc/read_data.html @@ -911,7 +911,7 @@ LAMMPS section of the documentation.Related commands:
read_dump, read_restart, -create_atoms +create_atoms, write_data
Default: none
diff --git a/doc/read_data.txt b/doc/read_data.txt index 55db36af93..077093a363 100644 --- a/doc/read_data.txt +++ b/doc/read_data.txt @@ -806,6 +806,6 @@ LAMMPS"_Section_start.html#start_2 section of the documentation. [Related commands:] "read_dump"_read_dump.html, "read_restart"_read_restart.html, -"create_atoms"_create_atoms.html +"create_atoms"_create_atoms.html, "write_data"_write_data.html [Default:] none diff --git a/doc/write_data.html b/doc/write_data.html new file mode 100644 index 0000000000..313540fb7c --- /dev/null +++ b/doc/write_data.html @@ -0,0 +1,78 @@ + +Syntax: +
+write_data file ++
Examples: +
+write_data data.polymer ++
Description: +
+Write a text data file of the current state of the simulation. +
+During a long simulation, the restart command is +typically used to dump restart files periodically. The write_restart +command is useful after a minimization or whenever you wish to write +out a single current restart file. +
+Similar to dump files, the restart filename can contain +two wild-card characters. If a "*" appears in the filename, it is +replaced with the current timestep value. If a "%" character appears +in the filename, then one file is written by each processor and the +"%" character is replaced with the processor ID from 0 to P-1. An +additional file with the "%" replaced by "base" is also written, which +contains global information. For example, the files written for +filename restart.% would be restart.base, restart.0, restart.1, ... +restart.P-1. This creates smaller files and can be a fast mode of +output and subsequent input on parallel machines that support parallel +I/O. +
+Restart files can be read by a read_restart +command to restart a simulation from a particular state. Because the +file is binary (to enable exact restarts), it may not be readable on +another machine. In this case, the restart2data program in the tools +directory can be used to convert a restart file to an ASCII data file. +Both the read_restart command and restart2data tool can read in a +restart file that was written with the "%" character so that multiple +files were created. +
+IMPORTANT NOTE: Although the purpose of restart files is to enable +restarting a simulation from where it left off, not all information +about a simulation is stored in the file. For example, the list of +fixes that were specified during the initial run is not stored, which +means the new input script must specify any fixes you want to use. +Even when restart information is stored in the file, as it is for some +fixes, commands may need to be re-specified in the new input script, +in order to re-use that information. See the +read_restart command for information about what is +stored in a restart file. +
+Restrictions: +
+This command requires inter-processor communication to migrate atoms +before the data file is written. This means that your system must be +ready to perform a simulation before using this command (force fields +setup, atom masses initialized, etc). +
+Related commands: +
+ +Default: none +
+ diff --git a/doc/write_data.txt b/doc/write_data.txt new file mode 100644 index 0000000000..77a84bbcfa --- /dev/null +++ b/doc/write_data.txt @@ -0,0 +1,73 @@ +"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 + +write_data command :h3 + +[Syntax:] + +write_data file :pre + +file = name of data file to write out :ul + +[Examples:] + +write_data data.polymer :pre + +[Description:] + +Write a text data file of the current state of the simulation. + +During a long simulation, the "restart"_restart.html command is +typically used to dump restart files periodically. The write_restart +command is useful after a minimization or whenever you wish to write +out a single current restart file. + +Similar to "dump"_dump.html files, the restart filename can contain +two wild-card characters. If a "*" appears in the filename, it is +replaced with the current timestep value. If a "%" character appears +in the filename, then one file is written by each processor and the +"%" character is replaced with the processor ID from 0 to P-1. An +additional file with the "%" replaced by "base" is also written, which +contains global information. For example, the files written for +filename restart.% would be restart.base, restart.0, restart.1, ... +restart.P-1. This creates smaller files and can be a fast mode of +output and subsequent input on parallel machines that support parallel +I/O. + +Restart files can be read by a "read_restart"_read_restart.html +command to restart a simulation from a particular state. Because the +file is binary (to enable exact restarts), it may not be readable on +another machine. In this case, the restart2data program in the tools +directory can be used to convert a restart file to an ASCII data file. +Both the read_restart command and restart2data tool can read in a +restart file that was written with the "%" character so that multiple +files were created. + +IMPORTANT NOTE: Although the purpose of restart files is to enable +restarting a simulation from where it left off, not all information +about a simulation is stored in the file. For example, the list of +fixes that were specified during the initial run is not stored, which +means the new input script must specify any fixes you want to use. +Even when restart information is stored in the file, as it is for some +fixes, commands may need to be re-specified in the new input script, +in order to re-use that information. See the +"read_restart"_read_restart.html command for information about what is +stored in a restart file. + +[Restrictions:] + +This command requires inter-processor communication to migrate atoms +before the data file is written. This means that your system must be +ready to perform a simulation before using this command (force fields +setup, atom masses initialized, etc). + +[Related commands:] + +"read_data"_read_data.html, "write_restart"_write_restart.html + +[Default:] none diff --git a/doc/write_restart.html b/doc/write_restart.html index 5e834ca69a..b3cfabddd6 100644 --- a/doc/write_restart.html +++ b/doc/write_restart.html @@ -72,7 +72,8 @@ fields setup, atom masses initialized, etc).Related commands:
-restart, read_restart, +write_data
Default: none
diff --git a/doc/write_restart.txt b/doc/write_restart.txt index f75ef07ecb..fcb99e4f39 100644 --- a/doc/write_restart.txt +++ b/doc/write_restart.txt @@ -69,6 +69,7 @@ fields setup, atom masses initialized, etc). [Related commands:] -"restart"_restart.html, "read_restart"_read_restart.html +"restart"_restart.html, "read_restart"_read_restart.html, +"write_data"_write_data.html [Default:] none