Mie potential¶
This module implements the Mie potential,
with prefactor \(C(m, n) = \dfrac{m}{m - n} \left(\dfrac{m}{n}\right)^{n/(m-n)}\) for the interaction between two particles of species \(i\) and \(j\).
The Mie potential is a generalised Lennard-Jones potential
. The difference is that the
exponents of repulsion, \(m_{ij}\), and of attraction, \(n_{ij}\),
can be specified explicitly. The prefactor reduces to \(C(12, 6) = 4\)
in the case of the Lennard-Jones potential.
- class halmd.mdsim.potentials.pair.mie(args)¶
Construct Mie potential.
- Parameters:
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.index_repulsion (table) – exponent of repulsive part, \(m_{ij}\)
args.index_attraction (table) – exponent of attractive part, \(n_{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”. Ifmemory
is not specified, the memory location is selected according to the compute device.- epsilon¶
Matrix with elements \(\epsilon_{ij}\).
- sigma¶
Matrix with elements \(\sigma_{ij}\).
- r_cut¶
Matrix with elements \(r_{\text{c}, ij}\) in reduced units.
- r_cut_sigma¶
Matrix with elements \(r_{\text{c}, ij}\) in units of \(\sigma_{ij}\).
- index_m¶
Matrix with exponents \(m_{ij}\) of repulsive part of the potential
- index_n¶
Matrix with exponents \(n_{ij}\) of attractive part of the potential
- description¶
Name of potential for profiler.
- memory¶
Device where the particle memory resides.
- truncate(args)¶
Truncate potential. See Potential truncations for available truncations.
- Parameters:
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
- Returns:
truncated potential
Example:
potential = potential:truncate({"smooth_r4", cutoff = 5, h = 0.05})
- modify(args)¶
Apply potential modification. See Potential modifications for available modifications.
- Parameters:
args (table) – keyword argument
args[1] (string) – name of modification type
args.* (any) – additional arguments depend on the modification type
- Returns:
modified potential
Example:
potential = potential:modify({"hard_core", radius = 0.5})