Dear Xuan,
your interpretation is essentially correct, with two important qualifications.
CP2K currently prints the raw constraint multipliers, not a complete general
blue-moon estimator.
In the Lagrange-multiplier output, the "Shake" values are the position-
constraint multipliers relevant to configurational thermodynamic integration.
The "Rattle" values enforce the velocity constraint and should not be treated
as a second configurational-force sample.
With the CP2K convention
F_constraint = -lambda grad(xi),
the mass metric for one constrained coordinate is
Z = sum_i [ 1/m_i |grad_i xi|^2 ].
The general free-energy gradient requires Z^(-1/2) reweighting and, depending
on the collective variable, an additional metric-derivative term.
For a simple distance
xi = |r_i - r_j|,
the metric is
Z = 1/m_i + 1/m_j.
It is constant and the metric-derivative term vanishes. Therefore,
dA/dxi = -<lambda>.
The sign follows from CP2K's constraint-force convention.
For the specific three-atom coordinate
xi = |r_i - r_j| - |r_k - r_j|,
define rho_ij and rho_kj as the corresponding unit vectors. The metric is
Z = 1/m_i + 1/m_k
+ 2/m_j [1 - rho_ij dot rho_kj].
This value changes with the instantaneous angle. For this particular
coordinate the metric-derivative term still vanishes, and the corrected
estimator is
dA/dxi =
< Z^(-1/2) (-lambda) > / < Z^(-1/2) >.
This simplification must not be generalized to arbitrary COMBINE_COLVAR
expressions or to multiple simultaneous constraints.
TARGET_GROWTH implements a moving constraint. At every MD step CP2K updates
the target according to
TARGET <- TARGET + TARGET_GROWTH * TIMESTEP
and optionally stops the growth at TARGET_LIMIT.
This can be used for a slow-growth or steered trajectory. CP2K does not,
however, integrate the work or automatically transform this trajectory into
an equilibrium free-energy profile.
For equilibrium blue-moon thermodynamic integration, use independently
equilibrated fixed-TARGET windows, calculate the corrected mean force in each
window, and integrate the mean force over xi.
The printed multipliers are in CP2K internal units. For a distance constraint,
lambda is printed in hartree/bohr even when TARGET was entered in angstrom.
I have opened a documentation pull request covering these points:
It adds a constrained-MD and blue-moon guide, explains SHAKE versus RATTLE
multipliers and their units, gives the distance and three-atom
distance-difference formulas, and documents the exact TARGET_GROWTH behavior
and its limitations.
Best regards,
Thomas