sponge.colvar.FunctionCV

View Source On Gitee
class sponge.colvar.FunctionCV(colvar: Union[Colvar, List[Colvar], Tuple[Colvar]], function: Callable, periodic: bool, shape: Tuple[int] = None, unit: str = None, use_pbc: bool = None, name: str = 'function')[source]

A composite Colvar that combines a set of collective variables (CVs) \({s_i(R)}\) using a custom function \(f(s_1(R), s_2(R), ..., s_i(R))\).

\[S = f(s_1(R), s_2(R), ... s_i(R))\]
Parameters
  • colvar (Union[Colvar, List[Colvar], Tuple[Colvar]]) – Collective variables to be combined \({s_i(R)}\).

  • function (callable) – Custom function \(f(s_1(R), s_2(R), ... s_i(R))\).

  • periodic (bool) – Whether the custom collective variables is periodic.

  • shape (tuple) – Shape of custom collective variables. If None is given and all CVs in the colvar have the same shape, then it will be assigned the shape. If the shape of each CV in colvar is not exactly the same, the shape must be set. Default: None.

  • unit (str) – Unit of the collective variables. Default: None. NOTE: This is not the Units Cell that wraps length and energy.

  • name (str) – Name of the collective variables. Default: 'combine'.

Supported Platforms:

Ascend GPU

set_pbc(use_pbc: bool)[source]

set whether to use periodic boundary condition