# Re: Rescale Temperature when velocity of COM is not zero

From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Mon Jun 01 2009 - 21:03:37 CDT

Hi Fred,

it is necessary to first discuss a couple of general points, and then
get to the specifics of your problem. In general simulations in namd
will conserve momentum, and thus you should end up with no center of
mass drift. The two settings that I'm aware of which remove momentum
conservation (besides obvious things such as applied forces) are PME
(which can lead to a slight drift which is removable through the
zeroMomentum setting) and Langevin dynamics (if you use Langevin
dynamics, though, you should find that at any given time the overall COM
drift is tiny due to the Langevin random forces).

If you're using velocity rescaling, you must not be using Langevin
dynamics, so you should be able to run simulations in which momentum is
conserved (unless you're applying external forces). However, you should
note that velocity scaling is really not a good way to control your
temperature, because it doesn't sample the canonical ensemble (and is
worse than, say, a Berendsen thermostat in its deviation). Velocity
rescaling really should only be used during equilibration (if you feel
the need to use it at all).

But, to answer your specific question, no, there's not a way that I'm
aware of to rescale only the 'real' temperature (but you should be able
to avoid any significant COM drift if you use sane parameters, and
people don't generally use collective thermostats with NAMD, which is
where you can really get into trouble). You should be able to verify the
lack of COM drift by postprocessing your trajectory.

Best,
Peter

Fred (Rui FENG) wrote:
> Hi All,
>
> I have a problem when I try to control the temperature.
>
> Suppose we have a periodic box with atoms and Lennard-Jones force field
> inside. When velocity of the center of the mass (COM) is zero, the
> output temperature is the "real" temperature of the system. It's from
> the equation: Ek = 3/2*R/n*T. When I rescale it by the "rescaleTemp and
> rescaleFreq" parameters, the system temperature could be changed.
>
> But if the velocity of COM is not zero, the output temperature consists
> of two parts: the "real" temperature and the kinetic energy part (if we
> can say it drift temperature). When I rescale it, both "real"
> temperature and velocity of COM are changed.
>
> So I was wondering if NAMD provides any parameters that only rescale
> "real" temperature but don't change the velocity of COM? Thank you!
>
> Have a nice day!
>
> Fred

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:52:53 CST