sponge.colvar.ColvarCombine

View Source On Gitee
class sponge.colvar.ColvarCombine(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 = 'colvar_combination')[source]

See CombineCV. NOTE: This module will be removed in a future release, please use CombineCV instead.

\[S = \sum_i^n{w_i (s_i - o_i)^{p_i}}\]
Parameters
  • colvar (list or tuple) – Array of Colvar to be combined \({s_i}\).

  • weights (list, tuple, float, Tensor) – Weights \({w_i}\) 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: 1

  • offsets (list, tuple, float, Tensor) – Offsets \({o_i}\) 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: 0

  • exponents (list, tuple, float, Tensor) – Exponents \({p_i}\) 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: 1

  • normal (bool) – Whether to normalize all weights to 1. Default: False.

  • periodic_min (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 (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 (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: 'colvar_combination'

Supported Platforms:

Ascend GPU