deeperwin.model.PairwiseFeatures
- class deeperwin.model.PairwiseFeatures(*args, **kwargs)[source]
Bases:
haiku._src.module.Module
- __init__(config: deeperwin.configuration.InputFeatureConfig, physical_config: deeperwin.configuration.PhysicalConfig, pair_type: Literal['el_el', 'el_ion'], name=None)[source]
Initializes the current module with the given name.
Subclasses should call this constructor before creating other modules or variables such that those modules are named correctly.
- Parameters
name – An optional string name for the class. Must be a valid Python identifier. If
name
is not provided then the class name for the current instance is converted tolower_snake_case
and used instead.
Methods
__init__
(config, physical_config, pair_type)Initializes the current module with the given name.
- __call__(differences, dist)[source]
Computes pairwise features based on particle distances.
- Parameters
differences (array) – Pairwise particle differences (i.e. 3 coordinates per pair)
dist (array) – Pairwise particle distances
- Returns
Pairwise distance features
- Return type
array
- _get_rbf_features(dist)[source]
Computes radial basis features based on Gaussians with different means from pairwise distances. This can be interpreted as a special type of “one-hot-encoding” for the distance between two particles.
- Parameters
dist (array) – Pairwise particle distances
- Returns
Pairwise radial basis features
- Return type
array