2015-07-30 22:38:28 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
2013-04-04 01:06:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<HR>
|
2013-04-04 01:06:31 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<H3>write_data command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>write_data file keyword value ...
|
|
|
|
</PRE>
|
|
|
|
<UL><LI>file = name of data file to write out
|
2013-04-24 04:53:50 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
2013-04-24 04:53:50 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<LI>keyword = <I>pair</I> or <I>nocoeff</I>
|
2013-04-24 04:53:50 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<PRE> <I>nocoeff</I> = do not write out force field info
|
|
|
|
<I>pair</I> value = <I>ii</I> or <I>ij</I>
|
|
|
|
<I>ii</I> = write one line of pair coefficient info per atom type
|
|
|
|
<I>ij</I> = write one line of pair coefficient info per IJ atom type pair
|
|
|
|
</PRE>
|
2013-04-24 04:53:50 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>write_data data.polymer
|
|
|
|
write_data data.*
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Write a data file in text format of the current state of the
|
|
|
|
simulation. Data files can be read by the <A HREF = "read_data.html">read data</A>
|
|
|
|
command to begin a simulation. The <A HREF = "read_data.html">read_data</A> command
|
|
|
|
also describes their format.
|
|
|
|
</P>
|
|
|
|
<P>Similar to <A HREF = "dump.html">dump</A> files, the data filename can contain a "*"
|
|
|
|
wild-card character. The "*" is replaced with the current timestep
|
|
|
|
value.
|
|
|
|
</P>
|
|
|
|
<P>IMPORTANT NOTE: The write-data command is not yet fully implemented in
|
2013-04-24 04:53:50 +08:00
|
|
|
two respects. First, most pair styles do not yet write their
|
|
|
|
coefficient information into the data file. This means you will need
|
|
|
|
to specify that information in your input script that reads the data
|
2015-07-30 22:38:28 +08:00
|
|
|
file, via the <A HREF = "pair_coeff.html">pair_coeff</A> command. Second, a few of
|
|
|
|
the <A HREF = "atom_style.html">atom styles</A> (body, ellipsoid, line, tri) that
|
|
|
|
store auxiliary "bonus" information about aspherical particles, do not
|
2013-04-24 04:53:50 +08:00
|
|
|
yet write the bonus info into the data file. Both these
|
2015-07-30 22:38:28 +08:00
|
|
|
functionalities will be added to the write_data command later.
|
|
|
|
</P>
|
|
|
|
<P>Because a data file is in text format, if you use a data file written
|
2013-04-04 01:29:26 +08:00
|
|
|
out by this command to restart a simulation, the initial state of the
|
|
|
|
new run will be slightly different than the final state of the old run
|
|
|
|
(when the file was written) which was represented internally by LAMMPS
|
|
|
|
in binary format. A new simulation which reads the data file will
|
|
|
|
thus typically diverge from a simulation that continued in the
|
2015-07-30 22:38:28 +08:00
|
|
|
original input script.
|
|
|
|
</P>
|
|
|
|
<P>If you want to do more exact restarts, using binary files, see the
|
|
|
|
<A HREF = "restart.html">restart</A>, <A HREF = "write_restart.html">write_restart</A>, and
|
|
|
|
<A HREF = "read_restart.html">read_restart</A> commands. You can also convert
|
2013-04-04 01:29:26 +08:00
|
|
|
binary restart files to text data files, after a simulation has run,
|
2015-07-30 22:38:28 +08:00
|
|
|
using the <A HREF = "Section_start.html#start_7">-r command-line switch</A>.
|
|
|
|
</P>
|
|
|
|
<P>IMPORTANT NOTE: Only limited information about a simulation is stored
|
2013-04-04 01:29:26 +08:00
|
|
|
in a data file. For example, no information about atom
|
2015-07-30 22:38:28 +08:00
|
|
|
<A HREF = "group.html">groups</A> and <A HREF = "fix.html">fixes</A> are stored. <A HREF = "read_restart.html">Binary restart
|
|
|
|
files</A> store more information.
|
|
|
|
</P>
|
|
|
|
<P>Bond interactions (angle, etc) that have been turned off by the <A HREF = "fix_shake.html">fix
|
|
|
|
shake</A> or <A HREF = "delete_bonds.html">delete_bonds</A> command will
|
2013-04-04 01:29:26 +08:00
|
|
|
be written to a data file as if they are turned on. This means they
|
|
|
|
will need to be turned off again in a new run after the data file is
|
2015-07-30 22:38:28 +08:00
|
|
|
read.
|
|
|
|
</P>
|
|
|
|
<P>Bonds that are broken (e.g. by a bond-breaking potential) are not
|
2013-04-04 01:29:26 +08:00
|
|
|
written to the data file. Thus these bonds will not exist when the
|
2015-07-30 22:38:28 +08:00
|
|
|
data file is read.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>The <I>nocoeff</I> keyword requests that no force field parameters should
|
2015-07-17 05:53:47 +08:00
|
|
|
be written to the data file. This can be very helpful, if one wants
|
|
|
|
to make significant changes to the force field or if the parameters
|
2015-07-30 22:38:28 +08:00
|
|
|
are read in separately anyway, e.g. from an include file.
|
|
|
|
</P>
|
|
|
|
<P>The <I>pair</I> keyword lets you specify in what format the pair
|
2013-04-24 04:53:50 +08:00
|
|
|
coefficient information is written into the data file. If the value
|
2015-07-30 22:38:28 +08:00
|
|
|
is specified as <I>ii</I>, then one line per atom type is written, to
|
2013-04-24 04:53:50 +08:00
|
|
|
specify the coefficients for each of the I=J interactions. This means
|
|
|
|
that no cross-interactions for I != J will be specified in the data
|
|
|
|
file and the pair style will apply its mixing rule, as documented on
|
2015-07-30 22:38:28 +08:00
|
|
|
individual <A HREF = "pair_style.html">pair_style</A> doc pages. Of course this
|
2013-04-24 04:53:50 +08:00
|
|
|
behavior can be overridden in the input script after reading the data
|
2015-07-30 22:38:28 +08:00
|
|
|
file, by specifying additional <A HREF = "pair_coeff.html">pair_coeff</A> commands
|
|
|
|
for any desired I,J pairs.
|
|
|
|
</P>
|
|
|
|
<P>If the value is specified as <I>ij</I>, then one line of coefficients is
|
|
|
|
written for all I,J pairs where I <= J. These coefficients will
|
2013-04-24 04:53:50 +08:00
|
|
|
include any specific settings made in the input script up to that
|
|
|
|
point. The presence of these I != J coefficients in the data file
|
|
|
|
will effectively turn off the default mixing rule for the pair style.
|
|
|
|
Again, the coefficient values in the data file can can be overridden
|
|
|
|
in the input script after reading the data file, by specifying
|
2015-07-30 22:38:28 +08:00
|
|
|
additional <A HREF = "pair_coeff.html">pair_coeff</A> commands for any desired I,J
|
|
|
|
pairs.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>This command requires inter-processor communication to migrate atoms
|
2013-04-04 01:06:31 +08:00
|
|
|
before the data file is written. This means that your system must be
|
|
|
|
ready to perform a simulation before using this command (force fields
|
2015-07-30 22:38:28 +08:00
|
|
|
setup, atom masses initialized, etc).
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P><A HREF = "read_data.html">read_data</A>, <A HREF = "write_restart.html">write_restart</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B>
|
|
|
|
</P>
|
|
|
|
<P>The option defaults are pair = ii.
|
|
|
|
</P>
|
|
|
|
</HTML>
|