Morse potential

This module implements the (distorted) Morse potential,

U^{(ij)}_\text{Morse}(r) = \frac{\epsilon_{ij}}{2 B^2 - 1} \left(
    e^{-2 (r - r_{\text{min},ij}) B / \sigma_{ij}}
    - 2 B^2 e^{-(r - r_{\text{min},ij}) / (B \sigma_{ij})}

for the interaction between two particles of species i and j. This form of the potential contains a distortion parameter B, which is also denoted as b=B^2 in the literature. The original Morse potential is obtained for B=1 and is conveniently written as

U^{(ij)}_\text{Morse}(r) = \epsilon_{ij} \left(
    1 - e^{-(r - r_{\text{min},ij}) / \sigma_{ij}}
\right)^2 - \epsilon_{ij}

The potential minimum is at r = r_{\text{min},ij}. The inverse length 1/\sigma_{ij} is also referred to as stiffness parameter.

class halmd.mdsim.potentials.pair.morse(args)

Construct Morse potential.

  • args (table) – keyword arguments
  • args.epsilon (table) – matrix with elements \epsilon_{ij} (default: 1)
  • args.sigma (table) – matrix with elements \sigma_{ij} (default: 1)
  • args.r_min (table) – position of the potential well (equilibrium distance) r_\text{min}
  • args.distortion (table) – distortion parameter B (default: 1)
  • args.species (number) – number of particle species (optional)
  • args.memory (string) – select memory location (optional)
  • args.label (string) – instance label (optional)

If the argument species is omitted, it is inferred from the first dimension of the parameter matrices.

If all elements of a matrix are equal, a scalar value may be passed instead which is promoted to a square matrix of size given by the number of particle species.

The supported values for memory are “host” and “gpu”. If memory is not specified, the memory location is selected according to the compute device.


The keyword minimum has been deprecated since version 1.1.0. Please use r_min instead. For backwards compatibility, values passed via minimum are converted to r_min, i.e., multiplied by sigma.


Matrix with elements \epsilon_{ij}.


Matrix with elements \sigma_{ij}.


Matrix with equilibrium distance r_{\text{min}, ij} in simulation units.


Matrix with elements r_{\text{min}, ij} / \sigma_{ij}.


Matrix with elements B_{ij}.

Matrix with cutoff radius r_{\text{c}, ij} in simulation units.
This attribute is only available after truncation of the potential (see below).
Matrix with elements r_{\text{c}, ij} / \sigma_{ij}.
This attribute is only available after truncation of the potential (see below).

Name of potential for profiler.


Device where the particle memory resides.


Truncate potential. See Potential truncations for available truncations.

  • args (table) – keyword argument
  • args[1] (string) – name of truncation type
  • cutoff (table) – matrix with elements r_{\text{c}, ij}
  • args.* (any) – additional arguments depend on the truncation type

truncated potential


potential = potential:truncate({"smooth_r4", cutoff = 5, h = 0.05})

Apply potential modification. See Potential modifications for available modifications.

  • args (table) – keyword argument
  • args[1] (string) – name of modification type
  • args.* (any) – additional arguments depend on the modification type

modified potential


potential = potential:modify({"hard_core", radius = 0.5})