CrystalNNFingerprint
- class emmet.core.featurization.featurizers.CrystalNNFingerprint(op_types=<factory>, crystalnn=<factory>, _ops=None)
Bases:
FeaturizerA local order parameter fingerprint for periodic crystals.
Adapted from matminer.featurizers.site.fingerprint.
The fingerprint represents the value of various order parameters for the site. The “wt” order parameter describes how consistent a site is with a certain coordination number. The remaining order parameters are computed by multiplying the “wt” for that coordination number with the OP value.
- Args:
- op_types (dict): a dict of coordination number (int) to a list of str
representing the order parameter types
- crystalnn (CrystalNN)an instance of CrystalNN to use in identifying
local coordination environments.
- Parameters:
op_types (dict[int, list[str]])
crystalnn (CrystalNN)
_ops (dict[int, list[str | LocalStructOrderParams]] | None)
- classmethod from_preset(preset, **kwargs)
Use preset parameters to get the fingerprint
- Return type:
Self- Parameters:
preset (Literal['cn', 'ops'])
- Args:
- preset (‘cn’ | ‘ops’): Initializes the featurizer to use coordination number (‘cn’) or structural
order parameters like octahedral, tetrahedral (‘ops’).
**kwargs: other settings to be passed into CrystalNN class
- featurize(struct, idx)
Get crystal fingerprint of site with given index in input structure. Args:
struct (Structure): Pymatgen Structure object. idx (int): index of target site in structure.
- Returns:
list of weighted order parameters of target site.
- Return type:
list[float]- Parameters:
struct (Structure)
idx (int)
- property feature_labels
Generate feature labels.
- Returns:
list of str, the labels of the features