httk.atomistic.models.protostructure ==================================== .. py:module:: httk.atomistic.models.protostructure .. autoapi-nested-parse:: The assigned-species geometrical-classification family. Submodules ---------- .. toctree:: :maxdepth: 1 /reference/autoapi/httk/atomistic/models/protostructure/api/index /reference/autoapi/httk/atomistic/models/protostructure/backend/index /reference/autoapi/httk/atomistic/models/protostructure/label/index /reference/autoapi/httk/atomistic/models/protostructure/label_string/index /reference/autoapi/httk/atomistic/models/protostructure/like/index /reference/autoapi/httk/atomistic/models/protostructure/occupation/index /reference/autoapi/httk/atomistic/models/protostructure/protostructure/index /reference/autoapi/httk/atomistic/models/protostructure/recognized/index /reference/autoapi/httk/atomistic/models/protostructure/view/index /reference/autoapi/httk/atomistic/models/protostructure/view_base/index Attributes ---------- .. autoapisummary:: httk.atomistic.models.protostructure.ProtostructureLike Classes ------- .. autoapisummary:: httk.atomistic.models.protostructure.ProtostructureAPI httk.atomistic.models.protostructure.ProtostructureBackend httk.atomistic.models.protostructure.WyckoffOccupation httk.atomistic.models.protostructure.Protostructure httk.atomistic.models.protostructure.ProtostructureViewBase Package Contents ---------------- .. py:class:: ProtostructureAPI Bases: :py:obj:`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. .. py:property:: spacegroup :type: httk.atomistic.symmetry.spacegroup.Spacegroup :abstractmethod: Return the standard-setting space group. .. py:property:: occupations :type: tuple[httk.atomistic.models.protostructure.occupation.WyckoffOccupation, Ellipsis] :abstractmethod: Return the occupied Wyckoff positions in canonical order. .. py:property:: representative :type: FundamentalDomainStructure | None Return an optional retained exact representative. .. py:property:: discriminator :type: str | None Return an optional geometrical-class discriminator. .. py:method:: 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. :param other: The protostructure-like value to compare against. :param delta: The non-negative finite Cartesian travel budget. :return: Whether the two values are compatible within ``delta``. :raises TypeError: If ``delta`` is not a real number. :raises ValueError: If ``delta`` is negative or non-finite. .. py:method:: 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. :return: The standard-setting multiplicity for each occupation. .. py:property:: nsites_conventional :type: int Return the total number of sites in the standard conventional cell. :return: The conventional-cell site count. .. py:property:: formula :type: httk.atomistic.models.formula.formula_view.ChemicalFormulaView Return a reduced formula at the standard conventional-cell scale. :return: The conventional-cell reduced formula view. .. py:property:: anonymous_formula :type: httk.atomistic.models.formula.formulatype_view.FormulatypeView Return a reduced anonymous formula at the standard conventional-cell scale. :return: The conventional-cell anonymous formula view. .. py:property:: label :type: 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 :attr:`aflow_label`). Any faithful render is *the* protostructure label; the *canonical* protostructure label comes from a normalizer-canonical protostructure. :return: The protostructure label view. .. py:property:: aflow_label :type: str Return the AFLOW-style label of this protostructure. Unlike :attr:`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. :return: The AFLOW-style label text. .. py:property:: protostructure :type: Self Return this protostructure value. .. py:class:: ProtostructureBackend(backend, **hints) Bases: :py:obj:`httk.core.Backend`\ [\ :py:obj:`ProtostructureBackend`\ ], :py:obj:`httk.atomistic.models.protostructure.api.ProtostructureAPI` Backend root for standard-setting assigned-species classification keys. .. py:attribute:: backend_classes :type: ClassVar[list[type[httk.core.Backend[Any]]]] .. py:type:: ProtostructureLike :canonical: httk.atomistic.models.protostructure.backend.ProtostructureBackend | httk.atomistic.models.protostructure.view_base.ProtostructureViewBase | httk.atomistic.models.protostructure.protostructure.Protostructure | str .. py:class:: WyckoffOccupation Store one Wyckoff orbit occupied by one possibly disordered species. :param wyckoff: The Wyckoff letter in the standard setting. :param species: The real species occupying the orbit. .. py:attribute:: wyckoff :type: str .. py:attribute:: species :type: httk.atomistic.models.species.species.Species .. py:class:: Protostructure(spacegroup = None, occupations = None, *, representative = None, discriminator = None) Bases: :py:obj:`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. :param spacegroup: The standard-setting space group or its IT number. :param occupations: The occupied Wyckoff positions and their species. :param representative: An optional exact standard-setting class anchor. :param discriminator: An optional external class discriminator. .. py:attribute:: kind :type: ClassVar[str] :value: 'protostructure' .. py:property:: spacegroup :type: httk.atomistic.symmetry.spacegroup.Spacegroup Return the standard-setting space group. .. py:property:: occupations :type: tuple[httk.atomistic.models.protostructure.occupation.WyckoffOccupation, Ellipsis] Return the canonical occupied Wyckoff positions. .. py:property:: representative :type: httk.atomistic.models.structure.asu.FundamentalDomainStructure | None Return an optional retained exact representative. .. py:property:: discriminator :type: str | None Return an optional geometrical-class discriminator. .. py:class:: ProtostructureViewBase Bases: :py:obj:`httk.core.View`\ [\ :py:obj:`httk.atomistic.models.protostructure.backend.ProtostructureBackend`\ ] Base class for views presenting protostructure backends.