relentless.simulate.PotentialTabulator#
- class relentless.simulate.PotentialTabulator(potentials, start, stop, num)#
Tabulator for an interaction potential.
The energy, force, and derivative are evaluated at different positions
xand stored in arrays. Thestartandendof this range must be specified, along with the number of points (num) to use.If
potentials is None, the tabulator returns zeros for all.- Parameters:
potentials (
Potentialor array_like) – The potential(s) to be tabulated. If array_like, all elements must bePotentials.start (float) – The positional value of
xat which to begin tabulation.stop (float) – The positional value of
xat which to end tabulation.num (int) – The number of points (value of
x) at which to tabulate and evaluate the potential.
Methods
derivative(key, var[, x])Evaluates and accumulates derivative for all potentials.
energy(key[, x])Evaluates and accumulates energy for all potentials.
force(key[, x])Evaluates and accumulates force for all potentials.
Attributes
The number of points at which to tabulate/evaluate the potential, must be at least 2.
The individual potentials that are tabulated.
x values spaced linearly from
start**2` to ``stop**2.The
xvalue at which to start tabulation.The
xvalue at which to stop tabulation.- derivative(key, var, x=None)#
Evaluates and accumulates derivative for all potentials.
- Parameters:
- Returns:
Accumulated force at each
xvalue.- Return type:
array_like
- energy(key, x=None)#
Evaluates and accumulates energy for all potentials.
- force(key, x=None)#
Evaluates and accumulates force for all potentials.
- property num#
The number of points at which to tabulate/evaluate the potential, must be at least 2.
- Type:
- property potentials#
The individual potentials that are tabulated.
- Type:
array_like
- property squared_space#
x values spaced linearly from
start**2` to ``stop**2.- Type:
array_like