sponge.function.pbc_image

View Source On Gitee
sponge.function.pbc_image(position: Tensor, pbc_box: Tensor, offset: float = 0)[source]

calculate the periodic image of the PBC box

Parameters
  • position (Tensor) – Tensor of shape \((B, ..., D)\). Data type is float. B is batchsize, i.e. number of walkers in simulation D is spatial dimension of the simulation system. Usually is 3.

  • pbc_box (Tensor) – Tensor of shape \((B, D)\). Data type is float.

  • offset (float) – Offset ratio \(c\) relative to box size \(\vec{L}\). Default: 0

Returns

image (Tensor), a tensor of shape \((B, ..., D)\). Data type is int32.

Supported Platforms:

Ascend GPU