httk.atomistic.models.prototype

The anonymous geometrical-class prototype family.

Submodules

Attributes

Classes

PrototypeAPI

Common interface for anonymous standard-setting Wyckoff prototypes.

PrototypeBackend

Backend root for anonymous geometrical-class prototypes.

PrototypeOccupation

Store one Wyckoff orbit assigned to one anonymous species class.

Prototype

Store occupied Wyckoff positions with explicit geometrical-class information.

PrototypeViewBase

Base class for views presenting prototype backends.

Package Contents

class httk.atomistic.models.prototype.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

class httk.atomistic.models.prototype.PrototypeBackend(backend, **hints)[source]

Bases: httk.core.Backend[PrototypeBackend], httk.atomistic.models.prototype.api.PrototypeAPI

Backend root for anonymous geometrical-class prototypes.

backend_classes: ClassVar[list[type[httk.core.Backend[Any]]]]
type httk.atomistic.models.prototype.PrototypeLike = httk.atomistic.models.prototype.backend.PrototypeBackend | httk.atomistic.models.prototype.view_base.PrototypeViewBase | httk.atomistic.models.prototype.prototype.Prototype | httk.atomistic.models.prototype.label.PrototypeLabel | httk.atomistic.models.protostructure.backend.ProtostructureBackend | httk.atomistic.models.protostructure.view_base.ProtostructureViewBase | httk.atomistic.models.bareprototype.view_base.BarePrototypeViewBase | httk.atomistic.models.bareprotostructure.view_base.BareProtostructureViewBase
class httk.atomistic.models.prototype.PrototypeOccupation[source]

Store one Wyckoff orbit assigned to one anonymous species class.

Unlike WyckoffOccupation, the class carries an anonymous class label ("A", "B", …) rather than a real Species, so it can represent an element-agnostic prototype.

Parameters:
  • wyckoff – The Wyckoff letter in the standard setting.

  • label – The anonymous species-class label.

wyckoff: str
label: str
class httk.atomistic.models.prototype.Prototype(spacegroup=None, occupations=None, *, representative=None, discriminator=None, prototype=None)[source]

Bases: httk.atomistic.models.prototype.backend.PrototypeBackend

Store occupied Wyckoff positions with explicit geometrical-class information.

At least one of an exact representative or a nonempty discriminator is required. Both participate in equality and content identity. Use BarePrototype for the broader Wyckoff-only classification; recognizing a structure yields that level.

Parameters:
kind: ClassVar[str] = 'prototype'
property spacegroup: httk.atomistic.symmetry.spacegroup.Spacegroup
property occupations: tuple[httk.atomistic.models.prototype.occupation.PrototypeOccupation, ...]
property representative: httk.atomistic.models.structuretype.fundamental.FundamentalDomainTemplate | None

Return an optional retained exact representative.

property discriminator: str | None

Return an optional geometrical-class discriminator.

class httk.atomistic.models.prototype.PrototypeViewBase[source]

Bases: httk.core.View[httk.atomistic.models.prototype.backend.PrototypeBackend]

Base class for views presenting prototype backends.