Skip to content

8.1 Distance metadynamics and the missing coordinates

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.1.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: Distance metadynamics and the missing coordinates. No numerical results are claimed.
Original schematic: Distance metadynamics and the missing coordinates. No numerical results are claimed.

8.1.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.1.2.1 Input block 1

! Inside FORCE_EVAL/SUBSYS
&COLVAR
  &DISTANCE
    ATOMS 1 4
  &END DISTANCE
&END COLVAR

! Inside MOTION
&FREE_ENERGY
  &METADYN
    DO_HILLS F
    LAGRANGE F
    NT_HILLS 100
    WW [hartree] 0.0002
    &METAVAR
      COLVAR 1
      SCALE 0.20
    &END METAVAR
    &PRINT
      &COLVAR ON
        &EACH
          MD 1
        &END EACH
      &END COLVAR
    &END PRINT
  &END METADYN
&END FREE_ENERGY

8.1.3 Worked investigation

Intuition and prerequisite. Metadynamics discourages repeated visits to already explored collective-variable values by adding a history-dependent bias. A distance is easy to interpret, but two configurations with the same distance can have different orientations and solvent structures. Biasing that distance does not automatically equilibrate these hidden degrees of freedom. Begin with an equilibrated, nonperiodic water dimer, with atoms ordered O,H,H,O,H,H, a validated NVT MD setup, and stable electronic convergence. This is a short exploration lesson, not a production dissociation free-energy calculation: an unconfined gas-phase pair has no finite, normalizable association ensemble over unlimited separation.

Original input delta, valid syntax. Insert COLVAR inside FORCE_EVAL/SUBSYS. Insert FREE_ENERGY inside the existing MOTION section. The first pass deliberately records the CV without hills. If a COLVAR already exists, adjust its one-based input-order index rather than assuming this is number 1.

See input block 1 above.

For this distance CV, SCALE uses the internal length unit, bohr; 0.20 is not 0.20 Å. WW is hill height in hartree. NT_HILLS is an MD-step interval, so its physical time changes with MD timestep. In a second, separately archived branch, change only DO_HILLS to T. These are illustrative hill parameters requiring tuning, not demonstrated suitable values. See the 2025.2 METADYN reference, METAVAR width definition, and distance CV.

Procedure. 1. Inspect coordinates and atom numbering. Independently calculate the first O–O distance, converting angstrom to bohr, and compare it with the CV log. 2. Run the no-hill pilot first. Measure typical fluctuations and relaxation times; inspect molecular orientations as well as distance. 3. Define a physically justified exploration domain before biasing. A production model needs suitable confinement/walls or another bounded ensemble. This bare teaching delta supplies none; stop the exploratory trajectory before its domain or cell treatment becomes invalid. 4. Enable hills in a fresh branch. Compare CV evolution, bias contribution, temperature, and actual structures. Excessively frequent hills can drive motion faster than orthogonal coordinates relax. 5. Preserve hill history and the matching restart. Restarting positions while discarding accumulated bias starts a different process. 6. Only after a validated bounded model and adequate sampling, reconstruct a time-dependent free-energy estimate with a compatible external analysis. Compare successive time blocks and independent starts, not just the final smooth curve.

Interpretation and limits. For ordinary metadynamics, minus the accumulated bias can approach the free-energy landscape under appropriate long-time assumptions; a single crossing is not convergence. Well-tempered metadynamics changes hill deposition and the asymptotic relation: with bias factor γ, F(s) ≈ −γV(s)/(γ−1), up to a constant. Do not use that formula on the ordinary-metadynamics input above. Biased time is not physical reaction time, and directly histogramming the biased trajectory does not recover the unbiased distribution. An O–O distance also fails to distinguish different hydrogen-bond orientations. The CECAM 2015 metadynamics exercise illustrates the need to investigate CV fluctuations before choosing hill parameters.

Exercise and diagram. Design a second observable describing hydrogen-bond orientation, and explain how a trajectory could appear converged in distance while retaining orientational memory.

8.1.5 Sources and further reading