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=λL2x+(1λ)L1xLy=λL2y+(1λ)L1yLz=λL2z+(1λ)L1zxy=λxy2+(1λ)xy1xz=λxz2+(1λ)xz1yz=λyz2+(1λ)yz1\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*}

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