dump positions in triclinic and orthogonal boxes

Dear LAMMPS developers,
I’m encountering a problem in dumping the particles’ positions when performing NEMD.

In particular, I’m shearing a system with the fix deform command (fix_deform fix-id all deform 1 xy erate 0.1 remap v flip yes units box) starting from a system whose simulation box is orthogonal (using a common restart file) and periodic in the three directions.
Before applying shear deformation, I’m changing the simulation box to a triclinic one via the change_box all triclinic command.
The positions of the particles are printed by:
dump dump-id all custom filename id type x y z vx vy vz
dump_modify dump-id format line …
dump_modify dump-id pbc yes
dump_modify dump-id sort id
By comparing the positions of the particle at step 0 of the NEMD simulation (i.e. when no deformation of box is applied; all the xy xz yz values are 0.0 in the header of the dump) with the last configuration of the previous simulation (printed at the same timestep of the restart file), which should be exactly the same, we find that most of the particles are shifted by a factor of 1.0.

We then tested an equilibrium MD simulation, with no deformation applied, using first an orthogonal and then a triclinic box (all the other parameters being the same).
Despite no difference in the positions was expected, the g(r) of the two systems computed by the dump files yields two different results. The dump was performed as in the case above.

Do you know the reason for such behavior? Why should the particles be shifted to non-correct values when changing the box and no deformation applied?

Additional trials:
-Use of remap in change_box all triclinic command does not change the problem.
-Dump with xs, ys, zs and successive rescaling to actual coordinates does not change the problem.
-Despite it is not what we aim to do, the problem appears to be solved for one direction only when that specific direction is set to non-periodic (for instance via change_box boundary s p p).

Thank you.

Best regards,
Fabrizio Camerin

Have you compared the image flags of the atoms you think are shifted by a
box length
in the previous simulation and the first frame of the new simulation? My
guess is
that some atoms were outside the box by epsilon in the previous
simulation and are now inside the box in a periodic sense in the new one.
With image flags that differ by +/- 1. Which means the 2 systems are
equivalent.

When restart files are written PBC are often applied before the file write.
which means
the restart file and your old dump file may already be different, before
you even
start your new simulation. E.g. read the restart and do a dump or
write_data command
using the -r2dump or -r2data command-line switches (you don't need an input
script),
and see if you see the same thing.

Steve