sponge.partition.IndexColvar
- class sponge.partition.IndexColvar(use_pbc: bool = None)[source]
Collective variables based on index
- Parameters
use_pbc (bool, optional) – Whether to calculate the CV at periodic boundary condition (PBC). If
None
is given, it will be determined at runtime based on whether the pbc_box is given or not. Default:None
.
- Supported Platforms:
Ascend
GPU
- set_pbc(use_pbc: bool)[source]
Set periodic boundary condition
- Parameters
use_pbc (bool) – Whether to calculate the CV at periodic boundary condition (PBC). If
None
is given, it will be determined at runtime based on whether the pbc_box is given or not.
- vector_in_pbc(vector: Tensor, pbc_box: Tensor)[source]
Make the difference of vecters at the range from -0.5 box to 0.5 box.
- Parameters
vector (Tensor) – Tensor of shape \((B, A, D)\). Data type is float. Coordinate of system
pbc_box (Tensor) – Tensor of shape \((B, D)\). Data type is float. Periodic boundary condition Box.