kliff.transforms.configuration_transforms.configuration_transform¶
- class kliff.transforms.configuration_transforms.configuration_transform.ConfigurationTransform(copy_to_config=False)[source]¶
A configuration transform is a function that maps a configuration to a “fingerprint”. The fingerprint can be any object that represents the configuration, and restriction or checks on the fingerprint is not imposed. For example, current configuration transforms include graph representations of the configuration,and descriptors.
- forward(configuration)[source]¶
Map a configuration to a fingerprint. Also handle the implicit copying of the fingerprint to the configuration.
- Parameters:
configuration (
Configuration) – Instance of ~:class:kliff.dataset.Configuration. For which the fingerprint is to be generated.- Return type:
Any- Returns:
Fingerprint of the configuration.
- inverse(*args, **kargs)[source]¶
Inverse mapping of the transform. This is not implemented for any of the transforms, but is there for future use.
- Return type:
- property copy_to_config: bool¶
- collate_fn(config_list)[source]¶
Collate a list of configurations into a list of transforms. This is useful for batch processing.
- Parameters:
config_list (
List[Configuration]) – List of configurations.- Return type:
List[Any]