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:

Lx=λLfx+(1λ)LixLy=λLfy+(1λ)LiyLz=λLfz+(1λ)Lizxy=λxyf+(1λ)xyixz=λxzf+(1λ)xziyz=λyzf+(1λ)yzi\begin{align*} L_{x}' &= \lambda L_{fx} + (1 - \lambda) L_{ix} \\ L_{y}' &= \lambda L_{fy} + (1 - \lambda) L_{iy} \\ L_{z}' &= \lambda L_{fz} + (1 - \lambda) L_{iz} \\ xy' &= \lambda xy_{f} + (1 - \lambda) xy_{i} \\ xz' &= \lambda xz_{f} + (1 - \lambda) xz_{i} \\ yz' &= \lambda yz_{f} + (1 - \lambda) yz_{i} \\ \end{align*}

Where initial_box is (Lix,Liy,Liz,xyi,xzi,yzi)(L_{ix}, L_{iy}, L_{iz}, xy_i, xz_i, yz_i), final_box is (Lfx,Lfy,Lfz,xyf,xzf,yzf)(L_{fx}, L_{fy}, L_{fz}, xy_f, xz_f, yz_f), λ=f(t)minfmaxfminf\lambda = \frac{f(t) - \min f}{\max f - \min f}, tt is the timestep, and f(t)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