LambdaHarmonic

The LambdaHarmonic potential is a variant of the Harmonic potential that includes a lambda parameter for smooth switching or alchemical transformations. This is particularly useful in free energy calculations or when gradually introducing or removing bonds.

\[U = \lambda^n \cdot \frac{1}{2}K(r-r_0)^2\]

where:

  • \(\lambda\) is the switching parameter (0 ≤ λ ≤ 1)

  • \(n\) is the power to which lambda is raised

  • \(K\) is the spring constant

  • \(r\) is the current distance between the bonded particles

  • \(r_0\) is the equilibrium distance


  • type: Bond2, LambdaHarmonic

  • parameters:

    • n: int: Power of lambda (default: 2)

  • data:

    • id_i: int: Id of one particle

    • id_j: int: Id of the other particle

    • K : real: Spring constant \([energy]/[distance]^2\)

    • r0 : real: Equilibrium distance \([distance]\)

Example:

"lambdaHarmonicBonds":{
  "type":["Bond2","LambdaHarmonic"],
  "parameters":{"n":2},
  "labels":["id_i", "id_j", "K", "r0"],
  "data":[[0, 1, 100.0, 1.0],
          [1, 2, 100.0, 1.1],
          [2, 3, 100.0, 0.9]]
}

Note

The \(\lambda\) parameter is typically controlled globally for the entire simulation and is not specified per bond.