sponge.colvar.BatchedAtoms
- class sponge.colvar.BatchedAtoms(index: Union[Tensor, ndarray, List[int]], keep_in_box: bool = False, dimension: int = 3, name: str = 'atoms')[source]
A batched version of Atoms Cell. It is a subclass of Atoms.
the shape of index should be (B, a_1, a_2, … , a_n), while the shape of the Atoms Cell would be (a_1, a_2, … , a_n). The batch size B of the atomic indices should be the same as the batch size of the simulation system. The shape of the returned Tensor of the Atoms Cell is (B, a_1, a_2, … , a_n, D). {a_i} means Dimensions of the Atoms Cell. D means Dimension of the simulation system. Usually is 3.
- Parameters
index (Union[Tensor, ndarray, List[int]]) – Array of the indices of specific atoms. The shape of tensor is (B, a_1, a_2, …, a_{n}), and the data type is int
keep_in_box (bool) – Whether to displace the coordinate in PBC box. Default:
False
.dimension (int) – Spatial dimension of the simulation system. Default: 3
name (str) – Name of the Colvar. Default: 'atoms'
- Supported Platforms:
Ascend
GPU