Metadynamics
Link to PDF containing derivation for both single and multiple CVs
According to well-tempered metadynamics [1], bias potential $(V_{\text{bias}})$ deposited at any time $(t)$ along a single collective variable (CV) with respect to CV visited at an iteration $(niter)$,
$$V_{\text{bias}}(\text{CV},t_{\text{niter}}) = V_{\text{bias}}(\text{CV},t_{niter - 1})+w\times\exp\Big(-\frac{(\text{CV}-\text{CV}_{\text{niter}})^{2}}{2\sigma^{2}}\Big)$$
- In standard metadynamics [2], $w = w_{0}$
- In well-tempered metadynamics [1], $w = w_{0} \times \exp\left( - \frac{V_{\text{bias}}\left( \text{CV},\ t_{\text{niter}}\ \right)}{k_{B}\Delta T} \right)$
Force at every timestep (t) due to deposited bias potential:
$$F_{\text{bias}}(\text{r},t)$$
$$=-\Big(\frac{dV_{\text{bias}}(\text{CV},t_{\text{niter}})}{\text{dCV}}\Big)\times\frac{\text{dCV}}{\text{dr}}$$
Substituting $V_{\text{bias}}(\text{CV},t_{\text{niter}})$ in the first term of the RHS in the above equation results in
$$\frac{dV_{\text{bias}}(\text{CV},t_{\text{niter}})}{\text{dCV}}=\frac{d\lbrack V_{\text{bias}(\text{CV},t_{niter-1})}+w\times\exp\Big(-\frac{(\text{CV}-\text{CV}_{\text{niter}})^{2}}{2\sigma^{2}}\Big)\rbrack}{\text{dCV}}$$
- Helper function: Derivative of Gaussian at any iteration
$$ \frac{d\lbrack w\times \exp\Big(-\frac{(\text{CV}-\text{CV}_{\text{niter}})^{2}}{2\sigma^{2}}\Big)\rbrack}{\text{dCV}}= $$
$$ -w\times\frac{(\text{CV}-\text{CV}_{\text{niter}})}{\sigma^{2}} $$
$$ \times \exp\Big(-\frac{(\text{CV}-\text{CV}_{\text{niter}})^{2}}{2\sigma^{2}}\Big) $$
Substituting helper function in $\frac{dV_{\text{bias}}(\text{CV},t_{\text{niter}})}{\text{dCV}}$,
$$\frac{dV_{\text{bias}}(\text{CV},t_{\text{niter}})}{\text{dCV}}=\sum_{iter\leq niter-1}\Big\lbrack -w\times\frac{(\text{CV}-\text{CV}_{\text{niter}})}{\sigma^{2}}$$
$$ \times \exp\Big(-\frac{(\text{CV}-\text{CV}_{\text{niter}})^{2}}{2\sigma^{2}}\Big)\Big\rbrack $$
$$ -w\times\frac{(\text{CV}-\text{CV}_{\text{niter}})}{\sigma^{2}} $$
$$ \times \exp\Big(-\frac{(\text{CV}-\text{CV}_{\text{niter}})^{2}}{2\sigma^{2}}\Big) $$
[1] A. Barducci, G. Bussi, and M. Parrinello, Well-Tempered Metadynamics: A Smoothly Converging and Tunable Free-Energy Method, Physical Review Letters 100, 020603 (2008).
[2] A. Laio and M. Parrinello, Escaping Free-Energy Minima, Proceedings of the National Academy of Sciences 99, 12562 (2002).