sponge.function.vector_in_pbc
- sponge.function.vector_in_pbc(vector: Tensor, pbc_box: Tensor, offset: float = - 0.5)[source]
Make the value of vector
at a single PBC box .Note
B: Batchsize, i.e. number of walkers in simulation D: Spatial dimension of the simulation system. Usually is 3.
- Parameters
vector (Tensor) – Tensor of shape (B, …, D). Data type is float. Vector
.pbc_box (Tensor) – Tensor of shape (B, D). Data type is float. Size of PBC box
.offset (float) – Offset ratio
of the vector relative to box size . The value of vector will be between and . Default:-0.5
.
- Returns
pbc_vector (Tensor), a tensor of shape (B, …, D). Data type is float.
- Supported Platforms:
Ascend
GPU