httk.atomistic.models.protostructure

The assigned-species geometrical-classification family.

Submodules

Attributes

Classes

ProtostructureAPI

The common interface for standard-setting occupied Wyckoff positions.

ProtostructureBackend

Backend root for standard-setting assigned-species classification keys.

WyckoffOccupation

Store one Wyckoff orbit occupied by one possibly disordered species.

Protostructure

Store occupied Wyckoff positions with explicit geometrical-class information.

ProtostructureViewBase

Base class for views presenting protostructure backends.

Package Contents

class httk.atomistic.models.protostructure.ProtostructureAPI[source]

Bases: abc.ABC

The common interface for standard-setting occupied Wyckoff positions.

Composition and formula derivations from this interface use the standard-setting conventional-cell scale, independently of the setting or transform of a source structure from which a protostructure was recognized.

property spacegroup: httk.atomistic.symmetry.spacegroup.Spacegroup
Abstractmethod:

Return the standard-setting space group.

property occupations: tuple[httk.atomistic.models.protostructure.occupation.WyckoffOccupation, ...]
Abstractmethod:

Return the occupied Wyckoff positions in canonical order.

property representative: FundamentalDomainStructure | None

Return an optional retained exact representative.

property discriminator: str | None

Return an optional geometrical-class discriminator.

similar(other, delta, *, use_numpy=False, cache=None)[source]

Return whether two protostructures have compatible geometry within delta.

The base identity (space group, 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 protostructure-like other (a view, a backend, or a label string) is erased to a value first.

Parameters:
  • other (httk.atomistic.models.protostructure.like.ProtostructureLike) – The 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

multiplicities()[source]

Return tabulated standard-setting multiplicities for each occupation.

These are deliberately not multiplicities from a source structure’s transform; they define the provenance-independent conventional-cell scale of this value.

Returns:

The standard-setting multiplicity for each occupation.

Return type:

tuple[int, …]

property nsites_conventional: int

Return the total number of sites in the standard conventional cell.

Returns:

The conventional-cell site count.

Return type:

int

property formula: httk.atomistic.models.formula.formula_view.ChemicalFormulaView

Return a reduced formula at the standard conventional-cell scale.

Returns:

The conventional-cell reduced formula view.

Return type:

httk.atomistic.models.formula.formula_view.ChemicalFormulaView

property anonymous_formula: httk.atomistic.models.formula.formulatype_view.FormulatypeView

Return a reduced anonymous formula at the standard conventional-cell scale.

Returns:

The conventional-cell anonymous formula view.

Return type:

httk.atomistic.models.formula.formulatype_view.FormulatypeView

property label: httk.atomistic.models.protostructure.label.ProtostructureLabel

Return the httk protostructure label of this protostructure.

The label’s unsuffixed part orders classes by their Wyckoff letters, so it is the prototype label of the erased anonymous prototype; the suffix lists the class species names. This is NOT an AFLOW label: AFLOW orders classes alphabetically by element (see aflow_label). Any faithful render is the protostructure label; the canonical protostructure label comes from a normalizer-canonical protostructure.

Returns:

The protostructure label view.

Return type:

httk.atomistic.models.protostructure.label.ProtostructureLabel

property aflow_label: str

Return the AFLOW-style label of this protostructure.

Unlike label, AFLOW orders classes alphabetically by element symbol and reassigns the anonymous symbols in that order, so the unsuffixed prefix depends on the chemistry. Provided for interoperability only.

Returns:

The AFLOW-style label text.

Return type:

str

property protostructure: Self

Return this protostructure value.

class httk.atomistic.models.protostructure.ProtostructureBackend(backend, **hints)[source]

Bases: httk.core.Backend[ProtostructureBackend], httk.atomistic.models.protostructure.api.ProtostructureAPI

Backend root for standard-setting assigned-species classification keys.

backend_classes: ClassVar[list[type[httk.core.Backend[Any]]]]
type httk.atomistic.models.protostructure.ProtostructureLike = httk.atomistic.models.protostructure.backend.ProtostructureBackend | httk.atomistic.models.protostructure.view_base.ProtostructureViewBase | httk.atomistic.models.protostructure.protostructure.Protostructure | httk.atomistic.models.bareprototype.view_base.BarePrototypeViewBase | httk.atomistic.models.bareprotostructure.view_base.BareProtostructureViewBase | httk.atomistic.models.prototype.view_base.PrototypeViewBase
class httk.atomistic.models.protostructure.WyckoffOccupation[source]

Store one Wyckoff orbit occupied by one possibly disordered species.

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

  • species – The real species occupying the orbit.

wyckoff: str
species: httk.atomistic.models.species.species.Species
class httk.atomistic.models.protostructure.Protostructure(spacegroup=None, occupations=None, *, representative=None, discriminator=None)[source]

Bases: httk.atomistic.models.protostructure.backend.ProtostructureBackend

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 BareProtostructure for the broader Wyckoff-only classification; recognizing a structure yields that level.

Parameters:
kind: ClassVar[str] = 'protostructure'
property spacegroup: httk.atomistic.symmetry.spacegroup.Spacegroup

Return the standard-setting space group.

property occupations: tuple[httk.atomistic.models.protostructure.occupation.WyckoffOccupation, ...]

Return the canonical occupied Wyckoff positions.

property representative: httk.atomistic.models.structure.asu.FundamentalDomainStructure | None

Return an optional retained exact representative.

property discriminator: str | None

Return an optional geometrical-class discriminator.

class httk.atomistic.models.protostructure.ProtostructureViewBase[source]

Bases: httk.core.View[httk.atomistic.models.protostructure.backend.ProtostructureBackend]

Base class for views presenting protostructure backends.