I have had serious problems with restart files occasionally. I
usually save my coordinates periodically in some other format as well
in case restart files fail (using the dump or write_data commands, for
example). (See below)
Like most software under active development with many contributors,
LAMMPS has bugs. A non-trivial number of them. You will have to get
comfortable with that. It's entirely possible you found a bug in
LAMMPS. But Feb 2013 is so long ago that I suspect your error has
been fixed already. If you can reproduce the same error (writing and
reading) with the current version of LAMMPS, people will be interested
to help you. Otherwise, have you tried loading the restart file with
a newer version of LAMMPS? Do you have the code for
lammps-2Feb2013.tar.gz? You can compile LAMMPS with the -g flag, step
through the code with a debugger, and try to figure out what's going
on, but I suspect it won't be easy.
Probably it is easier to try and reconstruct a new data file using
coordinates from a dump file (see below):
----- creating a new DATA file from dump files or raw coordinates ----
If you have created a dump file, AND the number of particles and bonds
has not changed, then you can extract coordinates and create a new
data file using your own script. You can also try using
"dump2data.py" (attached)
dump2data.py -atomstyle "full" -last OLD.DATA \
< DUMP.lammpstrj > NEW.DATA
The "-last" argument extracts the data from the last frame. (If you
want to pick a different timestep, use something like "-t 50000"
instead)
If you don't use plain-text dump files, but you can obtain the
coordinates as a simple 3-column numeric text file (eg "COORDS.raw"),
then you can use "raw2data.py" (attached)
raw2data.py -atomstyle "full" OLD.data < COORDS.raw > NEW.data
(Bugs in "dump2data.py" and "raw2data.py" are occasionally found and
patched. Download the newest version at moltemplate.org.)
Of coarse, this won't restore any coeff (parameters) or bond topology
which may have changed during your simulation (for example using "fix
bond/create" or "fix gcmc"). The number of atoms, bonds, angles,
dihedrals, and impropers in the data file must be consistent with your
old data file (or coords file).
You can also do all of this with pizza.py, or topotools, if you don't
mind learning a little python or tcl. (If you use exotic atom_styles,
then you might try "pizza.py". My code has not kept up with all the
newest atom_styles.)
Cheers
Andrew
docs_dump2data.txt (6.25 KB)
dump2data.py (59.3 KB)
raw2data.py (3.07 KB)
docs_raw2data.txt (2.34 KB)