The nice thing about LAMMPS' DATA/DUMP files is that the file format
is relatively simple. (See links below. I wish data files included
metadata to indicate the column format, but that's for another post.)
To get you past your current obstacle, if you have created a data file
for this system earlier, you can copy them from the last frame of a
DUMP file, and paste them into the "Atoms" section of an existing
"DATA" file.
To make this process easier, it helps if before you run the
simulation you carefully formatted your dump file to insure that the
column format matches the format used in the "Atoms" section of your
"DATA" file. For example, for atom_style "full", create your dump
files using "id mol type x y z". For example:
dump 1 all custom 500 traj.lammpstrj id mol type x y z ix iy iz
If the dump file has a different format, you may have to extract the
coordinates from the dump file, and the other atom data from the data
file, and combine the files using a spreadsheet. (If you are familiar
with awk, then save the two text fragments as temporary files,
"crd.txt", "atoms.txt", paste them together into a single file using
the "paste -d' ' crd.txt atoms.txt", and run the result through awk to
select the columns you want from either file. I'm sure there are other
ways.)
Also, if you are desperate, I wrote a funky (and possibly buggy)
script "dump2data.py" for extracting coordinates from dump files. By
default, it extracts the coordinates from the last frame of a dump
file. However it is not a general script. It does not work with dump
files using scaled coordinates (xs ys zs). These are default in
LAMMPS, so you must explicitly tell LAMMPS to generate the dump file
using unscaled coordinates "x y z". (See the example "dump" command
above.)
The "dump2data.py" also can not extract velocity data (although you
can do this with a text editor). It does not understand exotic atom
degrees of freedom (dipole or ellipsoid orientations, etc). This is
not code I am particularly proud of. If you are desperate, you can
try it. I attached it to this message. Instructions how to use it
were posted here:
http://sourceforge.net/mailarchive/message.php?msg_id=29864484
If I remember correctly, pizza.py used to come with another script
named "dump2data". Presumably, that script was much more robust than
this one.
General LAMMPS documentation for the dump and data files are located here:
http://lammps.sandia.gov/doc/dump.html
http://lammps.sandia.gov/doc/read_data.html
http://lammps.sandia.gov/doc/atom_style.html
I hope this helps.
Andrew
dump2data.py (42.9 KB)