httk.atomistic.models.prototype.api¶
The anonymous geometrical-class prototype interface.
Classes¶
Common interface for anonymous standard-setting Wyckoff prototypes. |
Module Contents¶
- class httk.atomistic.models.prototype.api.PrototypeAPI[source]¶
Bases:
abc.ABCCommon interface for anonymous standard-setting Wyckoff prototypes.
- property spacegroup: httk.atomistic.symmetry.spacegroup.Spacegroup¶
- Abstractmethod:
- property occupations: tuple[httk.atomistic.models.prototype.occupation.PrototypeOccupation, ...]¶
- Abstractmethod:
- property representative: FundamentalDomainTemplate | None¶
Return an optional retained exact representative.
- property anonymous_formula: httk.atomistic.models.formula.formulatype_view.FormulatypeView¶
- property label: httk.atomistic.models.prototype.label.PrototypeLabel¶
- property prototype: Self¶
- similar(other, delta, *, use_numpy=False, cache=None)[source]¶
Return whether two prototypes have compatible geometry within
delta.The base identity (space group, anonymous occupations, and any discriminators present on both) must agree; when both sides retain a geometrical representative, their total Cartesian atom travel must not exceed
delta. A prototype-like or protostructure-likeotheris erased throughPrototypeViewfirst, so a bare protostructure compares against its anonymous prototype.- Parameters:
other (httk.atomistic.models.prototype.like.PrototypeLike) – The prototype-like or protostructure-like value to compare against.
delta (float) – The non-negative finite Cartesian travel budget.
use_numpy (bool) – Use temporary NumPy float64 geometry for approximate comparison; requires the
numpyextra and may change ties or near-threshold decisions. Retained representatives and their identities remain exact.cache (StructureComparisonCache | None) – Optional caller-scoped cache for reusable comparison preparation.
- Returns:
Whether the two values are compatible within
delta.- Raises:
TypeError – If
deltais not a real number.ValueError – If
deltais negative or non-finite.
- Return type: