[lammps-users] Subtracting COM

Hello Lammps users,
I’m trying to simulate two materials in sliding contact and I need to apply a thermostat away from the sliding interface so as to minimize the influence of the thermostat on the dynamics in the interface region. I plan to accomplish this by creating separate groups for the interface region and thermostat region. Based on past experience, I know I need to subtract the center of mass velocity bias off the moving material to properly control the temperature and I’ve been reading the commands for compute com, fix berendsen (or langevin) and fix modify so I know it’s possible but I can’t seem to put the pieces together. The friction example supplied source code is where I am trying to start , but I don’t know what to do next. Does anybody have an example script to remove the COM from the thermostat?

Thanks in advance!

Assuming you have a group "slide" defined which is the
sliding atoms you wish to thermostat, then these commands:

compute c1 slide temp/com
fix f1 slide langevin
fix_modify f1 temp c1
fix f2 all nve

will define the temperature with COM bias removed (c1)
and use it in the thermostatting (Langevin in this case)
of those atoms, which still need to be time integrated (f2)
along with all the other atoms.