<div dir="ltr">Just as these papers refer to, a constrained MD simulation is to simulate a rare event. <div><div style="font-family: arial, sans-serif; font-size: 12.8px;"><br></div><div style="font-family: arial, sans-serif; font-size: 12.8px;">Suppose for a reaction, A + B -> C, and it takes hours to happen in reality, and the reason is, A irregularly hit B, and only 1/10000 times, that is, 10000 times, A hit B once. </div><div style="font-family: arial, sans-serif; font-size: 12.8px;"><br></div><div style="font-family: arial, sans-serif; font-size: 12.8px;">Now, the constrained MD does this, it constrained the distance A-B, say, 2.5 Angstrom, and instead of 10000 times hit once, since it is constrained, in 10000 times, it hit 10000 times, <span style="font-size: 12.8px;">and you get 10000 times more opportunity to make the reaction to happen, </span><span style="font-size: 12.8px;">by the way, a reaction doesnot mean a "real reaction", it can mean a inter-molecular complex. </span></div></div><div style="font-family: arial, sans-serif; font-size: 12.8px;"><span style="font-size: 12.8px;"><br></span></div><div style="font-family: arial, sans-serif; font-size: 12.8px;"><span style="font-size: 12.8px;">Fangyong</span></div><div><br><br>On Monday, July 11, 2016 at 12:22:13 PM UTC-4, Fangyong Yan wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Finally with the help from my advisor, I figured out the issue, <div>shake uses zeta** 2 = (ri - rj) **2, thus, zeta = |ri - rj|, which is exactly in Ciccotti's paper, now the force on atom i is,</div><div><br></div><div>F_i_total = f_i - Lagrange multiplier * the first derivative of zeta versus ri,</div><div>let the lagrange multiplier equal to lamda, and </div><div>the first derivative of zeta versus ri is equal to, </div><div>d|ri - rj| / d(r_i), </div><div>since it is the first derivative of the absolute value, it takes more care, let y = |ri - rj| = (u**2)**1/2, and u = (ri - rj)</div><div>then d|ri - rj| / d(ri) = (dy / du) * (du / dri) = [1/2* 2* u * u' / (u**2)**1/2] * du / d(ri) = [u * u' / (u**2)**1/2] * u' = (ri-rj) / |ri - rj|,</div><div>and d|ri - rj| / d(rj) = (rj - ri) / |ri - rj|,</div><div><br></div><div>now the force F_i_total = f_i - lambda * (ri - rj) / |ri - rj|,</div><div>                       F_j_total = f_j - lambda * (rj - ri) / |ri - rj|,</div><div><br></div><div>and the total force on i and j, or on the constrained bond is, </div><div><br></div><div>F_j_total - F_i_total = (f_j - f_i) - lambda * 2 * (rj - ri) / |ri - rj|, </div><div>now projection the force on ij, we get this forces projection on the vector ij, we get </div><div>|f_j - f_i| * cos_theta - lambda * 2, theta is the angle between force vector f_j-f_i and position vector r_j-r_i, and cos_theta' for lambda is 1 since lambda lies at the same line with r_j-r_i. And it becomes total force on the bond ij = |f_j - f_i| * cos_theta - 2 * lambda. </div><div><br></div><div>I am not good with math at all, so please correct me if you find some mistake in these eqs. Thanks!</div><div><br></div><div>Fangyong</div><div><br>On Wednesday, July 6, 2016 at 12:05:25 PM UTC-4, Fangyong Yan wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I have a question about the free energy calculation using the constrained MD. For the simplest case, such as constraining a inter-molecular distance between two atoms, i and j, In the constrain MD in the NVT ensemble, CP2K uses shake algorithm to update the position and velocity, where the constrain follows the holonomic constrain, </div><div><br></div><div>sigma = (ri - rj) ** 2 - dij ** 2, where dij is the constrain distance,</div><div>and the total force is equal to F_i + G_i, G_i is the constrained force and is equal to, lamda * the first derivative of simga versus r_i, thus, </div><div>G_i = -2 * lamda * r_i, (where these eq. borrows from the original shake paper, JEAN-PAUL RYCKAERT, GIOVANNI CICCOTTI, AND
HERMAN J. C. BERENDSEN, JOURNAL OF COMPUTATIONAL. PHYSICS 23, 321-341 (1977)).</div><div><br></div><div>In the free energy calculation, I think CP2K uses the eq. derived by Michiel Sprik and GIOVANNI CICCOTTI, Free energy from constrained molecular dynamics, J. Chem. Phys., Vol. 109, No. 18, 8 November 1998, where in this paper, the free energy uses a different constrain, </div><div>where constrain is equal to |ri - rj| - dij = 0, "| |" represents the absolute value, and in this case, the constrained force G_i = - lamda, (see eq. 13 in the paper). The free energy is equal to </div><div><br></div><div>dW / d Zeta' = < Z^(-1/2) * [ -lamda + kTG] > / < Z^(-1/2)></div><div><br></div><div>W is the free energy, Zeta is the constrained eq., in this case is equal to |ri - rj| - dij = 0, Zeta' represent different Zeta's; < > is the ensemble average, Z is a factor arises from the requirement that when Zeta is equal to zero for all times, the first derivative of Zeta (the velocity of this constrain) is also equal to zero for all times. (from E.A. CARTER, Giovanni CICCOTTI, James T. HYNES, Raymond KAPRAL, Chem. Phys. Lett.
156, 472 ~1989.); G is equal to </div><div>G = (1 / Z^2) * (1/m_i * 1/m_j) * the first derivative of Zeta versus r_i * the second derivative of Zeta versus r_i and r_j * the first derivative of Zeta versus r_j, </div><div>when Zeta = |r_i - r_j| - dij, the first derivative of Zeta versus r_i = the first derivative of Zeta versus r_j = 1, the second derivative of Zeta versus r_i and r_j = 0, thus, the free energy is equal to </div><div><br></div><div>dW / d Zeta' = < Z^(-1/2) * [ -lamda + kTG] > / < Z^(-1/2)> = < Z^(-1/2) * [ -lamda] > / < Z^(-1/2)>, and Z is a constant in this simple case, thus, <br></div><div>dW / d Zeta'  = <-lamda><br></div><div><br></div><div>Now my question is, since shake uses Zeta = (r_i - r_J) ** 2 - dij**2 = 0, in this case, G wont disappear, and the constrained force G_i = - 2 * lamda * r_i. Since CP2K does use SHAKE algorithm, how does CP2K do the free energy calculation, do CP2K uses Zeta = (r_i - r_j) ** 2 - dij**2 =0, or Zeta = |r_i - r_j| - dij = 0, since these two cases the lagrange multiplier is different. </div><div><br></div><div>Thanks for your patience for reading this, and I hope someone who can help me with this issue!</div><div><br></div><div>Fangyong</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><div><br></div><div><br></div></div></blockquote></div></div></blockquote></div></div>