## Velocity rescaling
A general scheme to rescale the velocity to the proper, or the set temperature would be
![[Drawing 2023-07-28 00.52.52.excalidraw.svg]]
Here $\lambda$ is the rescaling factor; $K_t$ is the ideal, or say, kinetic energy derived from the desired ensemble; $K$ is current kinetic energy.
This rescales factor multiply to current velocity could create a *temperature change* of $\Delta T = (\lambda^2-1)T(t)$.
>[!note]
>Rescale factor is on velocity, so a $^2$ exist for $T$ and $k$.
Some modifications include **Berendsen thermostat**, it uses $\Delta T = \frac{\partial t }{\tau}\bigl(T_{bath}-T(t)\bigr)$, $T_{bath}$ is the temperature of thermal bath, and $\tau$ is some time constant (controlling the coupling). The system is weakly coupled with the desired temperature, so the velocity change is not that “unsmooth”.
***Benefits of Berendsen thermostat***: smoother than direct velocity rescaling, and good approximation for large system (i.e., properties does not depend on fluctuation).
***Drawbacks of Berendsen thermostat***: it still suppresses fluctuation, no real ensemble acts like this. It is a global thermostat.
An even more updated version is **CSVR**, it uses
$dK = (\bar{K}-K) \frac{\mathrm{d}t}{\tau} + 2\sqrt{\frac{K\bar{K}}{Nf}} \frac{\mathrm{d}w}{\tau}$
to rescale the velocity. $dw$ is a noise term.
>[!info]
>Original paper is https://doi.org/10.1063/1.2408420 titled *Canonical sampling through velocity rescaling*. arXiv version available at https://arxiv.org/pdf/0803.4060.pdf.
>[!note]
>I personally think it also should not given the proper transport coefficients. But it seems I might be wrong--chatgpt says this CSVR thermostat is rescaling based on energy partition theorem, and follows M-B distribution.
>[!info]
>More to read, wiki at https://en.wikipedia.org/wiki/Berendsen_thermostat, https://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/MD/THERMOSTAT/CSVR.html