Hi all - I’ve been using lammps in a mode that, I suspect, is quite different from what’s usually done, and I’ve run across something that I’d call a bug, although you may disagree.
When you do change_box with multiple arguments, e.g.
change_box all x final 0 4 xy final 1.8
lammps seems to do them by multiple calls to Domain::set_initial_box(), each call changing one parameter at a time. Note that this set of parameters is valid with “box tilt small” since 1.8/4 < 0.5
Unfortunately, if you start out with x 0-5 and xy = 2.2, which is also valid, you can end up with an intermediate state of
x = 0–4 and xy=2.2
which is not valid (2.2/4 > 0.5). LAMMPS then gives an error and terminates.
Would it be possible to delay the test in the case of multiple arguments passed to change_box, and only test after the final one has been processed? I guess you’d have to add an argument to set_initial_box to disable the test, and only enable it for the last argument of the change_box command.
If you don’t want to do that, is there any other way to robustly go from
(which is all my code knows - the initial and final box shapes) without having to iterate through various orders of changing the parameters to find one that doesn’t conflict with the shape restriction?
For now I’m going to switch to “box tilt large”, but it’d be nice to be able to make arbitrary changes between box shapes that are valid.