Read_restart changing box parameters

Dear all,
I have noticed that when using read_restart the boundaries of the bounding box change by nearly a factor of 20%! Has anyone else experienced this, and if so, how did you rectify the situation?

Dear all,
I have noticed that when using read_restart the boundaries of the bounding
box change by nearly a factor of 20%! Has anyone else experienced this, and
if so, how did you rectify the situation?

that doesn't make sense. please provide a minimal example input deck
demonstrating this issue (it doesn't have to do any meaningful
simulation, and quickly showcase the issue at hand, i.e. it should use
a simple/fast pair style and few atoms). most likely you are
misinterpreting what is going on.

please also note, that you should always report your LAMMPS version
and platform you are using and double check with the latest patchlevel
(23 October 2017 currently), if the issue persists.

axel.

Dear Axel,
Thank you for the prompt reply. I agree that it seemed rather odd, but I noted the change in boundaries from the output of LAMMPS following the reading of the restart file. I have fixed it with the following simple command:

​run 0

change_box all y final -0.5 0.5 boundary f f p
change_box all x final -5.0 5.0 boundary f f p​

Dear Axel,
Thank you for the prompt reply. I agree that it seemed rather odd, but I
noted the change in boundaries from the output of LAMMPS following the
reading of the restart file. I have fixed it with the following simple

that is no proof.

command:

run 0

change_box all y final -0.5 0.5 boundary f f p
change_box all x final -5.0 5.0 boundary f f p

this is not a fix but an ugly hack and it doesn't help us a single bit
in identifying and tracking down what may be a very serious bug in the
code.

so please provide what i had asked for. you should want to know the
proper resolution of this, too, because if this is not reproducible,
it would mean, that there is something seriously wrong with your
simulation or you don't properly understand what you are doing or you
have a miscompiled executable. all of those are serious issues.

axel.

Well My “Ugly Hack” was recommended on the following page:

http://lammps.sandia.gov/doc/Section_errors.html

*Cannot change_box after reading restart file with per-atom info*
This is because the restart file info cannot be migrated with the atoms. You can get around this by performing a 0-timestep run which will assign the restart file info to actual atoms.

in.BasicExample (465 Bytes)

restart1 (24.9 KB)

Well My "Ugly Hack" was recommended on the following page:
http://lammps.sandia.gov/doc/Section_errors.html
Cannot change_box after reading restart file with per-atom infoThis is
because the restart file info cannot be migrated with the atoms. You can get
around this by performing a 0-timestep run which will assign the restart
file info to actual atoms.

that is a workaround for not being able to use "change_box", this
avoids the error message when trying to user change_box.
that is not what i am referring to. please recall, that your original
email was claiming that read_restart does not read the box dimensions
correctly and changes them unexpectedly.
*that* is what i am concerned about, and it is your applying of
change_box, *that* is the ugly hack i am complaining about.

read_restart _MUST_ restore the correct box dimensions that were
present when the restart was written. any deviation from that is a
serious bug and must be corrected immediately in the source code.

the attached files are useless, since it uses a binary restart which
contains references to a custom pair style that is not part of the
official LAMMPS version. regardless of that, i would need an input to
*generate* a restart from scratch and then read it back, so that i
have conclusive proof of what were the box dimensions while writing
the restart and after reading it back.

axel.

BTW: another explanation for your unexpected behavior could be an
incorrect implementation of the restart functions in your custom pair
style. that could result LAMMPS reading not enough or too many bytes
and then it may just read the wrong data into your box parameters.

axel.