<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><div>Dear Xuan,</div><div><br></div><div>your interpretation is essentially correct, with two important qualifications.</div><div><br></div><div>CP2K currently prints the raw constraint multipliers, not a complete general</div><div>blue-moon estimator.</div><div><br></div><div>In the Lagrange-multiplier output, the "Shake" values are the position-</div><div>constraint multipliers relevant to configurational thermodynamic integration.</div><div>The "Rattle" values enforce the velocity constraint and should not be treated</div><div>as a second configurational-force sample.</div><div><br></div><div>With the CP2K convention</div><div><br></div><div> F_constraint = -lambda grad(xi),</div><div><br></div><div>the mass metric for one constrained coordinate is</div><div><br></div><div> Z = sum_i [ 1/m_i |grad_i xi|^2 ].</div><div><br></div><div>The general free-energy gradient requires Z^(-1/2) reweighting and, depending</div><div>on the collective variable, an additional metric-derivative term.</div><div><br></div><div>For a simple distance</div><div><br></div><div> xi = |r_i - r_j|,</div><div><br></div><div>the metric is</div><div><br></div><div> Z = 1/m_i + 1/m_j.</div><div><br></div><div>It is constant and the metric-derivative term vanishes. Therefore,</div><div><br></div><div> dA/dxi = -<lambda>.</div><div><br></div><div>The sign follows from CP2K's constraint-force convention.</div><div><br></div><div>For the specific three-atom coordinate</div><div><br></div><div> xi = |r_i - r_j| - |r_k - r_j|,</div><div><br></div><div>define rho_ij and rho_kj as the corresponding unit vectors. The metric is</div><div><br></div><div> Z = 1/m_i + 1/m_k</div><div> + 2/m_j [1 - rho_ij dot rho_kj].</div><div><br></div><div>This value changes with the instantaneous angle. For this particular</div><div>coordinate the metric-derivative term still vanishes, and the corrected</div><div>estimator is</div><div><br></div><div> dA/dxi =</div><div> < Z^(-1/2) (-lambda) > / < Z^(-1/2) >.</div><div><br></div><div>This simplification must not be generalized to arbitrary COMBINE_COLVAR</div><div>expressions or to multiple simultaneous constraints.</div><div><br></div><div>TARGET_GROWTH implements a moving constraint. At every MD step CP2K updates</div><div>the target according to</div><div><br></div><div> TARGET <- TARGET + TARGET_GROWTH * TIMESTEP</div><div><br></div><div>and optionally stops the growth at TARGET_LIMIT.</div><div><br></div><div>This can be used for a slow-growth or steered trajectory. CP2K does not,</div><div>however, integrate the work or automatically transform this trajectory into</div><div>an equilibrium free-energy profile.</div><div><br></div><div>For equilibrium blue-moon thermodynamic integration, use independently</div><div>equilibrated fixed-TARGET windows, calculate the corrected mean force in each</div><div>window, and integrate the mean force over xi.</div><div><br></div><div>The printed multipliers are in CP2K internal units. For a distance constraint,</div><div>lambda is printed in hartree/bohr even when TARGET was entered in angstrom.</div><div><br></div><div>I have opened a documentation pull request covering these points:</div><div> https://github.com/cp2k/cp2k/pull/5689</div><div><br></div><div>It adds a constrained-MD and blue-moon guide, explains SHAKE versus RATTLE</div><div>multipliers and their units, gives the distance and three-atom</div><div>distance-difference formulas, and documents the exact TARGET_GROWTH behavior</div><div>and its limitations.</div><div><br></div><div>Best regards,</div><div>Thomas</div></div><div><br></div><div><blockquote type="cite"><div>Am 29.06.2026 um 15:52 schrieb xuan Garrett <xw97259@gmail.com>:</div><br class="Apple-interchange-newline"><div>Dear cp2k community,<div><br></div><div>Based on some of the topics in this google group and the official pages in cp2k.org, I notice that the blue moon method and slow growth method are not clearly displayed . So, here, I want to start a topic about this. </div><div><br></div><div>You can see that the page is not available on official page from cp2k.org. And after I check from Prof. Hutter that actually, cp2k only outputs the lamda value (the constraint force) rather the whole blue moon ensemble for thermodynamic integration (TI). </div><div><br></div><div>And the official example that uses the PMF to calculate the free energy itself provides the one example, where one should note that the if the COLVAR (CV) only refers to the single distance, then the mean force can be treated by <lamda>. <br><br>If the CV is defined as the gap between two distances, such as d(A---B) - d(B---C) as in substitution reaction: A + B---C → A---B + C. Then, the mean force does not always follow the simple lamda, but <Z^(-1/2)*lambda> / <Z^(-1/2)>. <br><br>Comparatively, for VASP users, because the LBLUEOUT tag supports the whole blue moon ensemble correction, we just need to follow its official steps with TI. But for cp2k users, the strict blue moon ensemble correction should be done yourself as suggested by Prof. Hutter. <br><br>I don't know if developers will attempt to add the corrections to some simple CV definitions for blue moon ensemble.<br><br>And for the slow growth, in terms of cAIMD (not the slow growth in metadynamics of cp2k), maybe the tag in &CONSTRAINT/&COLLECTIVE as of TARGET_GROWTH states for this function. <br><br>So, here, I attach one article with the correction formula for these two conditions, single distance and gap of two distances.</div><div><br><span id="cid:bb9509e5-509e-4267-9469-aa0c000d3c64"><1.jpg></span></div><div><span id="cid:82089609-e62d-4845-bccd-780551ac2e29"><2.jpg></span></div><div><span id="cid:7c6a431d-b96a-4c65-9aed-62726b291127"><3.jpg></span></div><div><br></div><div>Best regards,</div><div>Xuan<br><br></div><div><br class="webkit-block-placeholder"></div>
-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br>
To view this discussion visit <a href="https://groups.google.com/d/msgid/cp2k/3c3a946a-e5f9-474e-a606-47d75dfbfdabn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/3c3a946a-e5f9-474e-a606-47d75dfbfdabn%40googlegroups.com</a>.<br>
<span id="cid:7c6a431d-b96a-4c65-9aed-62726b291127"><3.jpg></span><span id="cid:82089609-e62d-4845-bccd-780551ac2e29"><2.jpg></span><span id="cid:bb9509e5-509e-4267-9469-aa0c000d3c64"><1.jpg></span></div></blockquote></div><br></body></html>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion visit <a href="https://groups.google.com/d/msgid/cp2k/06538019-2B5B-4BBD-B41F-E31D1D2338FB%40gmail.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/06538019-2B5B-4BBD-B41F-E31D1D2338FB%40gmail.com</a>.<br />