httk.atomistic.models.crystalpattern

The crystal-pattern family: dummy-species crystal patterns and fundamental domains.

Submodules

Attributes

Classes

CrystalPatternAPI

The common interface for dummy-species structures and prototypes.

CrystalPatternBackend

Backend root for the dummy-species crystal-pattern family.

CrystalPattern

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

ASUPattern

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

FundamentalDomainPattern

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

CrystalPatternViewBase

Base class for views presenting anonymous-structure 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 anonymous structures.

is_dummy_species(species)

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

Package Contents

httk.atomistic.models.crystalpattern.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.crystalpattern.dummy_species(label)[source]

Return the exact dummy species used by anonymous structures.

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.crystalpattern.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.crystalpattern.CrystalPatternAPI[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, Ellipsis]
Abstractmethod:

Return the distinct dummy species.

property species_at_sites: tuple[str, Ellipsis]
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.formulapattern_view.FormulapatternView

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.crystalpattern.CrystalPatternBackend(backend, **hints)[source]

Bases: httk.core.Backend[CrystalPatternBackend], httk.atomistic.models.crystalpattern.api.CrystalPatternAPI

Backend root for the dummy-species crystal-pattern family.

backend_classes: ClassVar[list[type[httk.core.Backend[Any]]]]
class httk.atomistic.models.crystalpattern.CrystalPattern(cell, sites, species=None, species_at_sites=None)[source]

Bases: httk.atomistic.models.crystalpattern.backend.CrystalPatternBackend

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

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

Geometrical info

Anonymous

Assigned

Wyckoff positions only

Protopattern

Protostructure

Geometrical class

Prototype

Structuretype

Exact geometry

CrystalPattern

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

Return the distinct dummy species.

property species_at_sites: tuple[str, Ellipsis]

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.crystalpattern.ASUPattern(cell, spacegroup, wyckoff_sites, species=None, coordinate_precision=None)[source]

Bases: FundamentalDomainPattern

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

Mirror ASUStructure: mark a FundamentalDomainPattern 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.crystalpattern.FundamentalDomainPattern(cell, spacegroup, wyckoff_sites, species=None, coordinate_precision=None)[source]

Bases: httk.atomistic.models.crystalpattern.backend.CrystalPatternBackend

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

FundamentalDomainPattern is the fundamental-domain member of the CrystalPattern family, the anonymous-species, exact-geometry cell of the material-information matrix:

Geometrical info

Anonymous

Assigned

Wyckoff positions only

Protopattern

Protostructure

Geometrical class

Prototype

Structuretype

Exact geometry

CrystalPattern

Structure

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

Return the symmetry-distinct site definitions.

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

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

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 prototype: Self

Return this prototype value.

property protopattern: httk.atomistic.models.protopattern.protopattern.Protopattern

Return the anonymous protopattern this fundamental domain folds to.

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

Returns:

The folded Protopattern.

Return type:

httk.atomistic.models.protopattern.protopattern.Protopattern

type httk.atomistic.models.crystalpattern.CrystalPatternLike = httk.atomistic.models.crystalpattern.backend.CrystalPatternBackend | httk.atomistic.models.crystalpattern.view_base.CrystalPatternViewBase | httk.atomistic.models.crystalpattern.crystalpattern.CrystalPattern | httk.atomistic.models.crystalpattern.fundamental.FundamentalDomainPattern[source]
class httk.atomistic.models.crystalpattern.CrystalPatternViewBase[source]

Bases: httk.core.View[httk.atomistic.models.crystalpattern.backend.CrystalPatternBackend]

Base class for views presenting anonymous-structure backends.