sponge.function.GetDistance

View Source On Gitee
class sponge.function.GetDistance(use_pbc: bool = None, keepdims: bool = False, axis: int = - 1)[source]

The class to calculate distance with or without PBC box

Parameters
  • use_pbc (bool) – Whether to calculate distance under periodic boundary condition. If this is “None”, it will determine whether to calculate the distance under periodic boundary condition based on whether the pbc_box is given. Default: None.

  • keepdims (bool) – Whether to keep the last dimension of the output Tensor of distance after norm. If this is “True”, the last dimension of the output Tensor will be 1. Default: False.

  • axis (int) – The axis of the space dimension of the coordinate. Default: -1 .