Langevin Thermostat with Temperature Gradient, possible?

I believe you could do this (for a 1d gradient) by
assigning a compute temp/ramp to fix langevin
via the fix_modify command. The compute should
subtract off the target ramp T from each particle
before Langevin is applied to the remaining velocity,
then add it back in, effectively thermalizing around
the ramp proflie.

More generally, a compute temp/field could be
written that takes a spatially dependent per-atom
variable, and subtracts that variable's value before
calculating the temperature. It would then work
the same as temp/ramp with fix langevin (or
any other thermostat).

Steve

I just added a variable option to fix langevin so
that the target temperature can be an equal
or atom style variable. The latter means
the target T can be spatially dependent.
So this should do what you want.

Steve