sponge.colvar.CombineCV
- class sponge.colvar.CombineCV(colvar: Union[List[Colvar], Tuple[Colvar]], weights: Union[float, List[float], Tuple[float], Tensor] = 1, offsets: Union[float, List[float], Tuple[float], Tensor] = 0, exponents: Union[float, List[float], Tuple[float], Tensor] = 1, normal: bool = False, periodic_min: Union[float, ndarray, Tensor] = None, periodic_max: Union[float, ndarray, Tensor] = None, periodic_mask: Union[Tensor, ndarray] = None, use_pbc: bool = None, name: str = 'combine')[source]
Polynomial combination of a set of Colvar
with shape (S_1, S_2, …, S_n). {S_i} means dimensions of collective variables.- Parameters
colvar (Union[List[Colvar], Tuple[Colvar]]) – Array of Colvar to be combined
.weights (Union[List[float], Tuple[Float], float, Tensor]) – Weights
for each Colvar. If a list or tuple is given, the number of the elements should be equal to the number of CVs. If a float or Tensor is given, the value will be used for all Colvar. Default: 1offsets (Union[List[float], Tuple[Float], float, Tensor]) – Offsets
for each Colvar. If a list or tuple is given, the number of the elements should be equal to the number of CVs. If a float or Tensor is given, the value will be used for all Colvar. Default: 0exponents (Union[List[float], Tuple[Float], float, Tensor]) – Exponents
for each Colvar. If a list or tuple is given, the number of the elements should be equal to the number of CVs. If a float or Tensor is given, the value will be used for all Colvar. Default: 1normal (bool) – Whether to normalize all weights to 1. Default:
False
.periodic_min (Union[float, ndarray, Tensor]) – The periodic minimum of the output of the combination of the CVs. If the output is not periodic, it should be None. Default:
None
.periodic_max (Union[float, ndarray, Tensor]) – The periodic maximum of the output of the combination of the CVs. If the output is not periodic, it should be None. Default:
None
.periodic_mask (Union[Tensor, ndarray]) – Mask for the periodicity of the outputs. The shape of the tensor should be as the same as the outputs, i.e. (S_1, S_2, …, S_n). Default:
None
.use_pbc (bool) – Whether to use periodic boundary condition. If None is given, it will determine whether to use periodic boundary conditions based on whether the pbc_box is provided. Default:
None
.name (str) – Name of the collective variables. Default: 'combine'
- Supported Platforms:
Ascend
GPU