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