Kokkos version of fix recenter

I need to work on cyclic shear simulation using GPU. I am using the KOKKOS package. But the simulation uses “fix recenter” command which is not still implemented in kokkos, which makes the code really slow. Is there any workaround available for this? Or the only way out is trying to implement the fix in kokkos. Any suggestion will be really appreciated.

Some main portion of the code I am attaching here for your reference

fix             1  all nvt/sllod temp $T $T 1.0

fix             def all deform 1 xy wiggle ${amp} ${Tp}  remap v flip no  units box

fix             vcm all momentum ${maxstep} linear 1 1 1

fix             data all print ${thermfreqs} '${gamma} ${stress} ${PE}' file set${j}_cpu/thermodata_${index}.txt

fix             strobdata all print ${maxstep} "${index} ${gamma} ${stress} ${PE}" file set${j}_cpu/strobdata_${index}.txt

fix     comp all recenter 0.0 0.0 0.0
thermo  ${thermfreqs}
thermo_style custom step v_accum pe pxy
run ${maxstep}

The fix recenter command does not change the dynamics of your simulation, it merely reset the “point of view” for the positions. Thus you should be able to remove the command from your input without changing the physics. If needed, you can output the center of mass of the system and subtract it from any (unwrapped) coordinates in a dump file after the fact, e.g. with an atom style variable.

What would worry me, though, is that you are also using fix momentum and for a system, where should be a center of mass momentum due to the use of fix deform.

Thanks for the information, Axel, this would be of great help.

At every maxstep, the system is supposed to complete one shear cycle, and it’s a zero-strain configuration when the fix momentum command is applied. This is why the com momentum is supposed to be zero then. Hope, this answers your question.

Also just a little confusion, some people around me uses the fix recenter before fix nvt/sllod and ignore the LAMMPS warning. Can it change the energy, stress, etc. of the system, or can there be any merit in using it that way for this particular simulation?