Hi devs,
I’m trying to understand how the biased simulations for techniques like umbrella sampling work in principle. When we add a bias to the potential function for, say a dihedral collective variable, U_b(\mathbf{x}) = 0.5 k (\phi(\mathbf{x}) - \phi_0)^2, I was confused about the nature of the bias function especially since the function is periodic. Say, \phi_0 is 178, and then you have a certain configuration for which \phi is 180, so your bias would be U_b = 0.5 K * 4. If the dihedral goes further in the next step of the simulation, say to 181, it wraps around to -179. Then the bias value gets a huge spike, U_b = 0.5 K (358)^2. This is a discontinuity in the bias function, introduced by a periodic collective variable. How does gromacs deal with this?
I did try to read up a bit on the gromacs documentation here, but the mod of the delta is taken over 2 * pi, which is 360. So even in the above case, since the delta is 358, mod of that w.r.t. 360 is still 358. This left me a bit confused. If anyone could provide clarity on how gromacs handles this bias for periodic CVs, it would be much appreciated. Thanks!