mlcolvar.core.transform.tools.ContinuousHistogram

class mlcolvar.core.transform.tools.ContinuousHistogram(in_features: int, min: float, max: float, bins: int, sigma_to_center: float = 1.0)[source]

Bases: Transform

Compute continuous histogram using Gaussian kernels

__init__(in_features: int, min: float, max: float, bins: int, sigma_to_center: float = 1.0) Tensor[source]

Computes the continuous histogram of a quantity using Gaussian kernels

Parameters:
  • in_features (int) – Number of inputs

  • min (float) – Minimum value of the histogram

  • max (float) – Maximum value of the histogram

  • bins (int) – Number of bins of the histogram

  • sigma_to_center (float, optional) – Sigma value in bin_size units, by default 1.0

Returns:

Values of the histogram for each bin

Return type:

torch.Tensor

Methods

__init__(in_features, min, max, bins[, ...])

Computes the continuous histogram of a quantity using Gaussian kernels

compute_hist(x)

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 Module instance 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

T_destination

call_super_init

dump_patches

training