Harmonic potential¶
This module implements the harmonic potential,
for the potential energy of a particle of species \(i\).
- class halmd.mdsim.potentials.external.harmonic(args)¶
Construct the harmonic potential.
- Parameters:
args (table) – keyword arguments
args.stiffness (table) – sequence of stiffness coefficients \(K_i\)
args.offset (table) – sequence of offset vectors \(\vec r_{0,i}\)
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 \(K_i\).
- offset¶
Sequence with offset vectors \(\vec r_{0,i}\).
- description¶
Name of potential for profiler.
- memory¶
Device where the particle memory resides.