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 a standard-setting space group and its occupied Wyckoff positions.

ProtostructureViewBase

Base class for views presenting protostructure backends.

Package Contents

class httk.atomistic.models.protostructure.ProtostructureAPI

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, Ellipsis]
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)

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:
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()

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, Ellipsis]

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)

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 | str
class httk.atomistic.models.protostructure.WyckoffOccupation

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)

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

Store a standard-setting space group and its occupied Wyckoff positions.

The base value is provenance-independent: recognition and derivation return a base Protostructure, so a value recognized from a structure compares equal to one built by hand or parsed from a label. Multiplicities, composition, and formula derivations are defined at the standard-setting conventional-cell scale, even when the source used to recognize it was stored in a volume-scaled setting.

A geometrical representative and/or a discriminator are optional refinements, present only when the user constructs the value with them; recognition never attaches them. They participate in equality and content identity: equality covers the space group, the occupations, the discriminator, and the representative when present, so two values sharing space group, occupations, and discriminator but differing in representative are not equal.

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, Ellipsis]

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

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

Base class for views presenting protostructure backends.