Bias removal from temperature in a RNEMD simulation

Dear all,

I’m performing non-equilibrium MD simulation for ionic liquids using LAMMPs and I have some questions about the correct way to remove the bias due to the flow from the temperature calculation and the correct way to use thermostats in these simulations.

After initial NVT equilibration, I turned off the fix NVT and start the RNEMD to create a flow in the x direction with the velocity gradient at z direction and measure the bias T using:

fix NVE all
fix 4 all viscosity 100 x z 20
compute layers all chunk/atom bin/1d z center 0.05 units reduced

fix 5 all ave/chunk 20 500 10000 layers vx file vx_prev.profile
compute myTemp all temp/profile 1 0 0 xyz 1 1 20

thermo_style custom step etotal ke pe temp c_myTemp press

If i understand that correctly, by subtracting the average velocity associated with the center of mass motion of the fluid at each slab, the temperature given by c_myTemp must be smaller than the output from the standard temp that do not subtract the bias due to the flow. However, I found the opposite: The output from c_myTemp is about 2 K higher than the one of temp at each timestep and I didn’t figure out what is going wrong.

Another problem is that, doing the simulation this way, the temperature of the system (both given by temp and c_myTemp) increases along the RNEMD simulation, so I need to use some thermostat. Defining the compute of the bias temperature as above, to remove the bias due to the flow I need just to use

fix TBerendsen all temp/berendsen $T $T 100.0

fix_modify TBerendsen temp myTemp

or there is something else I’m missing?

With best regards,
Kalil