Skip to content

8.2 Umbrella windows versus exact constraints

These are unexecuted teaching inputs and starting models. Original diagrams are schematics, not calculated results. Validate version-specific syntax, licensed or authorized data, numerical convergence and the scientific model before using this workflow.

8.2.1 Model, units and provenance

Keep basis/potential files and executable versions traceable. Grid controls use Ry; common energy/force outputs use hartree and hartree/bohr. Read the unit in each output heading.

Shared inputs, conventions and evidence

Original schematic: Umbrella windows versus exact constraints. No numerical results are claimed.
Original schematic: Umbrella windows versus exact constraints. No numerical results are claimed.

8.2.2 Unexecuted inputs and explicit deltas

Use the accompanying instructions to identify the parent calculation and placement of every delta; a snippet is not automatically a standalone input. Preserve all blank-line and file-provenance requirements.

8.2.2.1 Input block 1

&CONSTRAINT
  &COLLECTIVE
    COLVAR 1
    INTERMOLECULAR T
    TARGET 5.50
    &RESTRAINT
      K 0.005
    &END RESTRAINT
  &END COLLECTIVE
&END CONSTRAINT

8.2.3 Worked investigation

Intuition and prerequisite. Umbrella sampling adds known bias potentials to make rare regions accessible, then removes their statistical effect during analysis. A harmonic restraint allows fluctuations around a target. An exact constraint instead holds the CV fixed and produces constraint forces. Their estimators are different. Start from Case 29's atom mapping and distance CV, but use equilibrated independent NVT windows and remove the metadynamics bias. This lesson samples a finite distance interval; it does not claim a standard-state binding free energy.

Original delta, valid syntax. Insert this CONSTRAINT section inside MOTION, retaining the SUBSYS/COLVAR definition. It is one umbrella window. INTERMOLECULAR T applies the selected pair across the molecular partition. The numerical values use internal atomic units to avoid ambiguous mixed-unit force constants.

See input block 1 above.

For this distance, TARGET = 5.50 bohr and K = 0.005 hartree/bohr². Critically, CP2K defines the potential as U(s) = K(s−s0)², without a factor of one half. An external package using U = ½k(s−s0)² needs k = 2K after unit conversion. This convention is stated in the 2025.2 RESTRAINT reference; target and indexing rules are in COLLECTIVE. To study an exact constraint instead, remove the entire RESTRAINT subsection in a separate branch. Do not analyze its constrained distribution with a harmonic-umbrella estimator.

Procedure. 1. Select overlapping window centers, initially around 5.0, 5.5, and 6.0 bohr for a local pilot, adding windows only where the actual sampled distributions require them. These centers are design examples, not evidence of adequate coverage. 2. Prepare and equilibrate each window. Avoid assuming that pulling a configuration through all centers equilibrates molecular orientations. 3. Save the CV time series, actual temperature, center, bias coefficient, timestep, and discarded equilibration interval. CVs can be recomputed externally from consistently saved coordinates; document periodic-distance conventions if extending to bulk. 4. Plot each histogram and an overlap graph. Disconnected windows cannot be repaired by a smooth plotting spline. 5. Use a documented external WHAM or MBAR implementation with consistent bias energies and units. Account for time correlation through statistical inefficiency, block resampling, or another justified procedure. 6. Repeat with independent initialization, different window spacing, and longer sampling. Report uncertainty in free-energy differences after choosing a common reference zero.

Interpretation. A one-dimensional free energy A(r) = −kBT ln p(r)+C includes the geometry of the selected coordinate. In an isotropic three-dimensional pair problem, p(r) contains a radial r² measure. The corresponding radial potential of mean force can be written w(r) = A(r)+2kBT ln r+C, with an implicit reference length inside the logarithm. State which quantity is plotted. Extra orientational or positional restraints require their own corrections if converting to association thermodynamics. Exact constrained dynamics requires the appropriate mean-force sign and any coordinate-metric/Blue-Moon corrections; blindly integrating a printed multiplier is unsafe. The UZH 2018 thermodynamic-integration exercise provides a contrasting constrained-sampling workflow.

Pitfalls, exercise, diagram. A stiff spring narrows overlap and may demand a smaller MD timestep; a weak spring may leave gaps or drift. More frames do not mean more independent samples. Exercise: derive the generalized bias force −2K(s−s0), then predict the error caused by importing K as k into a half-prefactor convention.

8.2.5 Sources and further reading