httk.atomistic.models.prototype.api

The anonymous geometrical-class prototype interface.

Classes

PrototypeAPI

Common interface for anonymous standard-setting Wyckoff prototypes.

Module Contents

class httk.atomistic.models.prototype.api.PrototypeAPI[source]

Bases: abc.ABC

Common 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 discriminator: str | None

Return an optional geometrical-class discriminator.

multiplicities()[source]
property nsites_conventional: int
property pearson_symbol: str
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-like other is erased through PrototypeView first, 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 numpy extra 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 delta is not a real number.

  • ValueError – If delta is negative or non-finite.

Return type:

bool