httk.atomistic.models.structuretype.anonymize¶
Validation and canonical labelling helpers for structuretypes.
Functions¶
|
Return the exact dummy species used by structuretypes. |
|
Return whether |
|
Map element-like keys to anonymous symbols by descending amount. |
|
Reject structure features outside this phase's deliberate scope. |
Module Contents¶
- httk.atomistic.models.structuretype.anonymize.dummy_species(label)¶
Return the exact dummy species used by structuretypes.
- Parameters:
label (str) – The anonymous symbol to use as the species name.
- Returns:
The canonical dummy species.
- Return type:
- httk.atomistic.models.structuretype.anonymize.is_dummy_species(species)¶
Return whether
specieshas precisely the sanctioned dummy-species shape.- Parameters:
species (httk.atomistic.models.species.species.Species) – The species to inspect.
- Returns:
Whether the species is a canonical dummy species.
- Return type:
- httk.atomistic.models.structuretype.anonymize.canonical_dummy_assignment(amounts)¶
Map element-like keys to anonymous symbols by descending amount.
- Parameters:
amounts (collections.abc.Sequence[tuple[str, fractions.Fraction | int]]) – The keys and represented site counts.
- Returns:
The deterministic key-to-anonymous-symbol assignment.
- Return type:
- httk.atomistic.models.structuretype.anonymize.require_anonymizable(structure)¶
Reject structure features outside this phase’s deliberate scope.
Only fully occupied, single-real-element site species are anonymized. Unrepresented species, site attachments, and distinct names for the same represented element do not change the anonymous site geometry. Assemblies, stated compositions, and site moments remain unsupported.
- Parameters:
structure (Any) – The structure whose representation is being anonymized.
- Raises:
ValueError – If the structure contains unsupported composition features.