mlcolvar.core.transform.tools.SwitchingFunctions¶
- class mlcolvar.core.transform.tools.SwitchingFunctions(in_features: int, name: str, cutoff: float, dmax: float = None, options: dict = None)[source]¶
Bases:
TransformCommon switching functions
- __init__(in_features: int, name: str, cutoff: float, dmax: float = None, options: dict = None)[source]¶
Transform class options.
- Parameters:
in_features (int) – Number of inputs of the transform
out_features (int) – Number of outputs of the transform
Methods
Fermi_switch(x, cutoff[, q, prefactor_cutoff])Rational_switch(x, cutoff[, n, m, eps, ...])__init__(in_features, name, cutoff[, dmax, ...])Transform class options.
forward(x)Define the computation performed at every call.
- forward(x: Tensor)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- setup_from_datamodule(datamodule)¶
Initialize parameters based on pytorch lighting datamodule.
Attributes
SWITCH_FUNCS
T_destination
call_super_init
dump_patches
training