Harmonic potential¶
This module implements the harmonic potential,

for the potential energy of a particle of species
.
-
class
halmd.mdsim.potentials.external.harmonic(args)¶ Construct the harmonic potential.
Parameters: - args (table) – keyword arguments
- args.stiffness (table) – sequence of stiffness coefficients

- args.offset (table) – sequence of offset vectors

- args.species (number) – number of particle species (optional)
- args.memory (string) – select memory location (optional)
- args.label (string) – instance label (optional)
If all elements of a parameter sequence are equal, a single value may be passed instead. In this case,
speciesmust be specified.If the argument
speciesis omitted, it is inferred from the length of the parameter sequences.The supported values for
memoryare “host” and “gpu”. Ifmemoryis not specified, the memory location is selected according to the compute device.-
stiffness¶ Sequence with stiffness coefficients
.
-
offset¶ Sequence with offset vectors
.
-
description¶ Name of potential for profiler.
-
memory¶ Device where the particle memory resides.