Power-law with hard core potential

This module implements the (inverse) power-law potential,

U\left(r_{ij}\right) = \epsilon_{ij}
      \left(\frac{\sigma_{ij}}{r_{ij} - r_{\text{core}, ij}}\right)^{n_{ij}} \/,

for the interaction between two particles of species i and j with the power-law index n_{ij} and the core size r_\text{core, ij}.

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

Construct power-law with hard core 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.core (table) – matrix with elements r_{\text{core}, ij}
  • args.index (table) – power-law index n_{ij} (default: 12)
  • args.cutoff (table) – matrix with elements r_{\text{c}, ij}
  • 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 cutoff is only relevant with halmd.mdsim.forces.pair_trunc.


Matrix with elements \epsilon_{ij}.


Matrix with elements \sigma_{ij}.


Matrix with elements r_{\text{c}, ij} in reduced units.


Matrix with elements r_{\text{c}, ij} in units of \sigma_{ij}.


Matrix with elements r_{\text{core}, ij} in units of \sigma_{ij}.


Matrix with power-law indices n_{ij}


Name of potential for profiler.


Device where the particle memory resides.