httk.atomistic.models.structuretype

The structuretype family: dummy-species structuretypes and fundamental domains.

Submodules

Attributes

Classes

StructuretypeAPI

The common interface for dummy-species structures and prototypes.

StructuretypeBackend

Backend root for the dummy-species structuretype family.

ASUTemplate

Assert that a fundamental-domain template is a true asymmetric unit.

FundamentalDomainTemplate

Store a standard-setting fundamental domain with dummy species labels.

Structuretype

Store a unit cell whose site identities are consecutive dummy labels.

StructuretypeViewBase

Base class for views presenting structuretype backends.

Functions

canonical_dummy_assignment(amounts)

Map element-like keys to anonymous symbols by descending amount.

dummy_species(label)

Return the exact dummy species used by structuretypes.

is_dummy_species(species)

Return whether species has precisely the sanctioned dummy-species shape.

Package Contents

httk.atomistic.models.structuretype.canonical_dummy_assignment(amounts)[source]

Map element-like keys to anonymous symbols by descending amount.

Parameters:

amounts (collections.abc.Sequence[tuple[str, fractions.Fraction | int]]) – The keys and represented site counts.

Returns:

The deterministic key-to-anonymous-symbol assignment.

Return type:

dict[str, str]

httk.atomistic.models.structuretype.dummy_species(label)[source]

Return the exact dummy species used by structuretypes.

Parameters:

label (str) – The anonymous symbol to use as the species name.

Returns:

The canonical dummy species.

Return type:

httk.atomistic.models.species.species.Species

httk.atomistic.models.structuretype.is_dummy_species(species)[source]

Return whether species has precisely the sanctioned dummy-species shape.

Parameters:

species (httk.atomistic.models.species.species.Species) – The species to inspect.

Returns:

Whether the species is a canonical dummy species.

Return type:

bool

class httk.atomistic.models.structuretype.StructuretypeAPI[source]

Bases: abc.ABC

The common interface for dummy-species structures and prototypes.

property cell: httk.atomistic.models.cell.cell.Cell
Abstractmethod:

Return the structure cell.

property sites: httk.atomistic.models.sites.sites.Sites
Abstractmethod:

Return the reduced sites.

property species: tuple[httk.atomistic.models.species.species.Species, ...]
Abstractmethod:

Return the distinct dummy species.

property species_at_sites: tuple[str, ...]
Abstractmethod:

Return dummy species names in site order.

property coordinate_precision: fractions.Fraction | None

Return the reduced-coordinate precision, if known.

property basis_precision: fractions.Fraction | None

Return the cell-basis precision, if known.

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

Return the canonical anonymous formula at the represented site scale.

property is_canonical: bool

Return whether site counts assign consecutive canonical anonymous labels.

class httk.atomistic.models.structuretype.StructuretypeBackend(backend, **hints)[source]

Bases: httk.core.Backend[StructuretypeBackend], httk.atomistic.models.structuretype.api.StructuretypeAPI

Backend root for the dummy-species structuretype family.

backend_classes: ClassVar[list[type[httk.core.Backend[Any]]]]
class httk.atomistic.models.structuretype.ASUTemplate(cell, spacegroup, wyckoff_sites, species=None, coordinate_precision=None)[source]

Bases: FundamentalDomainTemplate

Assert that a fundamental-domain template is a true asymmetric unit.

Mirror ASUStructure: mark a FundamentalDomainTemplate whose Wyckoff sites are known to span a real asymmetric unit rather than merely a fundamental domain. The family exposes no site_coordinate_span hook, so this marker adds no state and inherits the fundamental-domain equality and representation.

class httk.atomistic.models.structuretype.FundamentalDomainTemplate(cell, spacegroup, wyckoff_sites, species=None, coordinate_precision=None)[source]

Bases: httk.atomistic.models.structuretype.backend.StructuretypeBackend

Store a standard-setting fundamental domain with dummy species labels.

FundamentalDomainTemplate is the fundamental-domain member of the Structuretype family, the anonymous-species, exact-geometry cell used as a representative for BarePrototype.

Parameters:
kind: ClassVar[str] = 'asu'
property cell: httk.atomistic.models.cell.cell.Cell

Return the standard-setting cell.

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

Return the standard-setting space group.

property wyckoff_sites: tuple[httk.atomistic.models.structure.asu.WyckoffSite, ...]

Return the symmetry-distinct site definitions.

property species: tuple[httk.atomistic.models.species.species.Species, ...]

Return the distinct dummy species.

property coordinate_precision

Return the reduced-coordinate precision.

property basis_precision

Return the cell-basis precision.

property sites: httk.atomistic.models.sites.sites.Sites

Return the expanded standard-setting sites.

property species_at_sites: tuple[str, ...]

Return dummy species names in expanded site order.

property periodicity: tuple[bool, bool, bool]

Return the periodic directions.

property nperiodic_dimensions: int

Return the number of periodic directions.

property nsites: int

Return the number of expanded sites.

cartesian_sites()[source]

Return the exact Cartesian expanded site positions.

multiplicities()[source]

Return the standard-setting multiplicity for each Wyckoff site.

property nsites_conventional: int

Return the number of sites in the conventional cell.

property bare_prototype: httk.atomistic.models.bareprototype.bareprototype.BarePrototype

Return the anonymous prototype this fundamental domain folds to.

The template keeps this domain’s occupied Wyckoff letters and their dummy-species class partition; the exact geometry is discarded. The template’s constructor re-canonicalizes the class labels by the pinned group-ordering rule.

Returns:

The folded BarePrototype.

Return type:

httk.atomistic.models.bareprototype.bareprototype.BarePrototype

type httk.atomistic.models.structuretype.StructuretypeLike = httk.atomistic.models.structuretype.backend.StructuretypeBackend | httk.atomistic.models.structuretype.view_base.StructuretypeViewBase | httk.atomistic.models.structuretype.structuretype.Structuretype | httk.atomistic.models.structuretype.fundamental.FundamentalDomainTemplate
class httk.atomistic.models.structuretype.Structuretype(cell, sites, species=None, species_at_sites=None)[source]

Bases: httk.atomistic.models.structuretype.backend.StructuretypeBackend

Store a unit cell whose site identities are consecutive dummy labels.

Structuretype is the anonymous-species, exact-geometry cell of the material-information matrix:

With no geometry the anonymous/assigned pair is Formulatype/ChemicalFormula; with Wyckoff information and optional disambiguation it is Prototype/Protostructure; and with exact geometry it is Structuretype/Structure.

Parameters:
kind: ClassVar[str] = 'unitcell'
property cell: httk.atomistic.models.cell.cell.Cell

Return the unit cell.

property sites: httk.atomistic.models.sites.sites.Sites

Return the reduced sites.

property species: tuple[httk.atomistic.models.species.species.Species, ...]

Return the distinct dummy species.

property species_at_sites: tuple[str, ...]

Return dummy species names in site order.

property periodicity: tuple[bool, bool, bool]

Return the periodic directions.

property nperiodic_dimensions: int

Return the number of periodic directions.

property nsites: int

Return the number of sites.

cartesian_sites()[source]

Return the exact Cartesian site positions.

Returns:

The Cartesian positions in the cell’s exact vector representation.

Return type:

Any

property coordinate_precision

Return the reduced-coordinate precision.

property basis_precision

Return the cell-basis precision.

class httk.atomistic.models.structuretype.StructuretypeViewBase[source]

Bases: httk.core.View[httk.atomistic.models.structuretype.backend.StructuretypeBackend]

Base class for views presenting structuretype backends.