httk.atomistic.models.crystalpattern ==================================== .. py:module:: httk.atomistic.models.crystalpattern .. autoapi-nested-parse:: The crystal-pattern family: dummy-species crystal patterns and fundamental domains. Submodules ---------- .. toctree:: :maxdepth: 1 /reference/autoapi/httk/atomistic/models/crystalpattern/anonymize/index /reference/autoapi/httk/atomistic/models/crystalpattern/anonymized/index /reference/autoapi/httk/atomistic/models/crystalpattern/api/index /reference/autoapi/httk/atomistic/models/crystalpattern/backend/index /reference/autoapi/httk/atomistic/models/crystalpattern/crystalpattern/index /reference/autoapi/httk/atomistic/models/crystalpattern/fundamental/index /reference/autoapi/httk/atomistic/models/crystalpattern/fundamental_view/index /reference/autoapi/httk/atomistic/models/crystalpattern/like/index /reference/autoapi/httk/atomistic/models/crystalpattern/view/index /reference/autoapi/httk/atomistic/models/crystalpattern/view_base/index Attributes ---------- .. autoapisummary:: httk.atomistic.models.crystalpattern.CrystalPatternLike Classes ------- .. autoapisummary:: httk.atomistic.models.crystalpattern.CrystalPatternAPI httk.atomistic.models.crystalpattern.CrystalPatternBackend httk.atomistic.models.crystalpattern.CrystalPattern httk.atomistic.models.crystalpattern.ASUPattern httk.atomistic.models.crystalpattern.FundamentalDomainPattern httk.atomistic.models.crystalpattern.CrystalPatternViewBase Functions --------- .. autoapisummary:: httk.atomistic.models.crystalpattern.canonical_dummy_assignment httk.atomistic.models.crystalpattern.dummy_species httk.atomistic.models.crystalpattern.is_dummy_species Package Contents ---------------- .. py:function:: canonical_dummy_assignment(amounts) Map element-like keys to anonymous symbols by descending amount. :param amounts: The keys and represented site counts. :return: The deterministic key-to-anonymous-symbol assignment. .. py:function:: dummy_species(label) Return the exact dummy species used by anonymous structures. :param label: The anonymous symbol to use as the species name. :return: The canonical dummy species. .. py:function:: is_dummy_species(species) Return whether ``species`` has precisely the sanctioned dummy-species shape. :param species: The species to inspect. :return: Whether the species is a canonical dummy species. .. py:class:: CrystalPatternAPI Bases: :py:obj:`abc.ABC` The common interface for dummy-species structures and prototypes. .. py:property:: cell :type: httk.atomistic.models.cell.cell.Cell :abstractmethod: Return the structure cell. .. py:property:: sites :type: httk.atomistic.models.sites.sites.Sites :abstractmethod: Return the reduced sites. .. py:property:: species :type: tuple[httk.atomistic.models.species.species.Species, Ellipsis] :abstractmethod: Return the distinct dummy species. .. py:property:: species_at_sites :type: tuple[str, Ellipsis] :abstractmethod: Return dummy species names in site order. .. py:property:: coordinate_precision :type: fractions.Fraction | None Return the reduced-coordinate precision, if known. .. py:property:: basis_precision :type: fractions.Fraction | None Return the cell-basis precision, if known. .. py:property:: anonymous_formula :type: httk.atomistic.models.formula.formulapattern_view.FormulapatternView Return the canonical anonymous formula at the represented site scale. .. py:property:: is_canonical :type: bool Return whether site counts assign consecutive canonical anonymous labels. .. py:class:: CrystalPatternBackend(backend, **hints) Bases: :py:obj:`httk.core.Backend`\ [\ :py:obj:`CrystalPatternBackend`\ ], :py:obj:`httk.atomistic.models.crystalpattern.api.CrystalPatternAPI` Backend root for the dummy-species crystal-pattern family. .. py:attribute:: backend_classes :type: ClassVar[list[type[httk.core.Backend[Any]]]] .. py:class:: CrystalPattern(cell, sites, species = None, species_at_sites = None) Bases: :py:obj:`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 ====================== ============== ============== :param cell: The unit-cell geometry. :param sites: The reduced coordinates of the sites. :param species: The distinct dummy species definitions. :param species_at_sites: The dummy species name occupying each site. .. py:attribute:: kind :type: ClassVar[str] :value: 'unitcell' .. py:property:: cell :type: httk.atomistic.models.cell.cell.Cell Return the unit cell. .. py:property:: sites :type: httk.atomistic.models.sites.sites.Sites Return the reduced sites. .. py:property:: species :type: tuple[httk.atomistic.models.species.species.Species, Ellipsis] Return the distinct dummy species. .. py:property:: species_at_sites :type: tuple[str, Ellipsis] Return dummy species names in site order. .. py:property:: periodicity :type: tuple[bool, bool, bool] Return the periodic directions. .. py:property:: nperiodic_dimensions :type: int Return the number of periodic directions. .. py:property:: nsites :type: int Return the number of sites. .. py:method:: cartesian_sites() Return the exact Cartesian site positions. :return: The Cartesian positions in the cell's exact vector representation. .. py:property:: coordinate_precision Return the reduced-coordinate precision. .. py:property:: basis_precision Return the cell-basis precision. .. py:class:: ASUPattern(cell, spacegroup, wyckoff_sites, species = None, coordinate_precision = None) Bases: :py:obj:`FundamentalDomainPattern` Assert that a fundamental-domain pattern is a true asymmetric unit. Mirror :class:`~httk.atomistic.models.structure.asu.ASUStructure`: mark a :class:`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. .. py:class:: FundamentalDomainPattern(cell, spacegroup, wyckoff_sites, species = None, coordinate_precision = None) Bases: :py:obj:`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 ====================== ============== ============== :param cell: The standard-setting cell geometry. :param spacegroup: The standard-setting space group. :param wyckoff_sites: The symmetry-distinct site definitions. :param species: The distinct dummy species definitions. :param coordinate_precision: The precision recorded for the reduced coordinates. .. py:attribute:: kind :type: ClassVar[str] :value: 'asu' .. py:property:: cell :type: httk.atomistic.models.cell.cell.Cell Return the standard-setting cell. .. py:property:: spacegroup :type: httk.atomistic.symmetry.spacegroup.Spacegroup Return the standard-setting space group. .. py:property:: wyckoff_sites :type: tuple[httk.atomistic.models.structure.asu.WyckoffSite, Ellipsis] Return the symmetry-distinct site definitions. .. py:property:: species :type: tuple[httk.atomistic.models.species.species.Species, Ellipsis] Return the distinct dummy species. .. py:property:: coordinate_precision Return the reduced-coordinate precision. .. py:property:: basis_precision Return the cell-basis precision. .. py:property:: sites :type: httk.atomistic.models.sites.sites.Sites Return the expanded standard-setting sites. .. py:property:: species_at_sites :type: tuple[str, Ellipsis] Return dummy species names in expanded site order. .. py:property:: periodicity :type: tuple[bool, bool, bool] Return the periodic directions. .. py:property:: nperiodic_dimensions :type: int Return the number of periodic directions. .. py:property:: nsites :type: int Return the number of expanded sites. .. py:method:: cartesian_sites() Return the exact Cartesian expanded site positions. .. py:method:: multiplicities() Return the standard-setting multiplicity for each Wyckoff site. .. py:property:: nsites_conventional :type: int Return the number of sites in the conventional cell. .. py:property:: prototype :type: Self Return this prototype value. .. py:property:: protopattern :type: 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. :return: The folded :class:`~httk.atomistic.models.protopattern.protopattern.Protopattern`. .. py:type:: CrystalPatternLike :canonical: 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 .. py:class:: CrystalPatternViewBase Bases: :py:obj:`httk.core.View`\ [\ :py:obj:`httk.atomistic.models.crystalpattern.backend.CrystalPatternBackend`\ ] Base class for views presenting anonymous-structure backends.