[lammps-users] fix temp/rescale

Steve,

I am trying to fix temperature in my simulation using fix temp/rescale and also want to calculate heat current which is equal to difference of kinetic energies before and after scaling summed over all the velocity scalings. The following is the part of the code used to scale and output the energy values.

I am not using NVT at all in this code. I am using NVE to update positions and velocities.

fix 3 all temp/rescale 1 350 350 0.3 1.0.

Are you running the current version of LAMMPS. The f_3
is supposed to be cummulative energy, but yours doesn't look
like it.

When the temp on a timestep is exactly 350, it is because
rescaling occurred, hence the f_3 value prints as non-zero.

When the temp is close to 350, no rescaling took place,
hence the energy exchanged on that timestep is 0.0, but
the cummulative should still be non-zero.

Steve