Velocity profile shift in shear deformation simulations

Dear LAMMPS users,
I’d like to perform NEMD simulation of a simple LJ system, applying a xy shear deformation.

Thus, I am using fix deform (enabling remap v) with a Langevin thermostat modified with the temp/deform option. In particular, I use a vel style with velocity 0.1.

In this way, I get a consistent velocity profile (computed with ave/chunk) that goes from 0 to 0.1 across the extension of the y axes.

However, in testing the script, I also tried to run the simulation with
1. no temp/deform option
2. with temp/compute instead of temp/deform

In both these cases, despite the velocity profile is consistent, it is also shifted by a factor of 0.5*vel (it goes from -0.05 to 0.05 across the y axes). What is precisely the reason for this shift? It appears that not using temp/deform enable a shear deformation both in the upper and lower layer of the box in opposite directions. Is this true? And, why is it the case also for temp/compute?

I see that, at least in case 1, I am not making the stream velocity coherent with the box deformation but I don’t understand the reason for this shift.

These are the most relevant commands I am using:
fix thermofix all langevin 0.722 0.722 1.0 12345 zero yes
fix thermofix1 all nve
compute sheartemp all temp/deform
fix_modify thermofix temp sheartemp
fix shearbox all deform 1 xy vel 0.1 remap v flip yes units box

Thank you for your patience.

Best,
Fabrizio Camerin

"I see that, at least in case 1, I am not making the stream velocity coherent with the box deformation but I don’t understand the reason for this shift. "

If you don’t give the particles an initial velocity profile, what other choice does the system have than to be symmetric about 0. Momentum in the streaming direction is imparted as particles cross, or encounter another particle on the other side of, the boundary in the direction of shear. The particles don’t know anything about the velocity of the center of mass of the system - that you are inferring from fix deform. Hence, if you’re doing everything well enough, the velocity of the center of mass shouldn’t change much. You have no other choice than a 0 +/- same velocity across the shear boundary.

If the particles did know that kind of info you wouldn’t end up with flying ice cubes with to large a time-step.