Write_data + read_data, delete atoms-error

Hello lammps users. I am using the write data command in lammps to write out a data file after a simulation,
where I have also used the delete_atoms command in the simulation.

After the simulation, I tried to read the data file using read_data command (to carry out further simulation). I get the following error

" Unexpected end of data file (…/read_data.cpp:1053)"

But the data file seems to be fine. I tried to read the data file using topo tools and it works fine.

I have tried out the same thing with the write_restart command and tried to read it using the read_restart command, it works perfectly.

I have also tried, without using the delete_atoms command i.e., I write out a restart file (without using delete_atoms in the simulation) and read it using read_restart which again works fine.

I do not know why I get an error "Unexpected… " when I try to read the data file using the read_ data command when the data file is outputted from a simulation which uses a delete_atoms command ?

I am using 15 aug 2015 version, atom style full.

Any suggestions would be helpful

Thanks
Arun

I am guessing the data file that gives the read_data error is not in
fact correct. Whether that is LAMMPS fault or your fault is hard
to tell. If you could post the file, and the short script that

wrote it and that reads it (giving the error), we will take a look.

Steve

well, i made some experiments and
a) i cannot reproduce what arun says. there is likely something
important missing in his description.

but:
b) i spotted two issues which are corrected by the attached patch.

axel.

lammps-delete-atoms-bonds-fix.diff.gz (614 Bytes)