Interpolate

class hoomd.variant.box.Interpolate(initial_box, final_box, variant)

Bases: BoxVariant

Interpolate between two boxes linearly.

Parameters:

Interpolate returns arrays corresponding to a linear interpolation between the initial and final boxes where the minimum of the variant gives initial_box and the maximum gives final_box:

\[\begin{split}\begin{align*} L_{x}' &= \lambda L_{2x} + (1 - \lambda) L_{1x} \\ L_{y}' &= \lambda L_{2y} + (1 - \lambda) L_{1y} \\ L_{z}' &= \lambda L_{2z} + (1 - \lambda) L_{1z} \\ xy' &= \lambda xy_{2} + (1 - \lambda) xy_{1} \\ xz' &= \lambda xz_{2} + (1 - \lambda) xz_{1} \\ yz' &= \lambda yz_{2} + (1 - \lambda) yz_{1} \\ \end{align*}\end{split}\]

Where initial_box is \((L_{ix}, L_{iy}, L_{iz}, xy_i, xz_i, yz_i)\), final_box is \((L_{fx}, L_{fy}, L_{fz}, xy_f, xz_f, yz_f)\), \(\lambda = \frac{f(t) - \min f}{\max f - \min f}\), \(t\) is the timestep, and \(f(t)\) is given by variant.


Members inherited from BoxVariant:

__call__()

Evaluate the function. Read more...


Members defined in Interpolate:

variant

A variant used to interpolate between the two boxes.

Type:

hoomd.variant.Variant

__reduce__()

Reduce values to picklable format.

property final_box

The final box.

Type:

hoomd.Box

property initial_box

The initial box.

Type:

hoomd.Box