httk.atomistic.models.structure.api¶
The minimal canonical structure interface for httk-atomistic.
Classes¶
Define the canonical structure interface. |
Module Contents¶
- class httk.atomistic.models.structure.api.StructureAPI[source]¶
Bases:
abc.ABCDefine the canonical structure interface.
It declares the Unitcell quartet that every structure backend produces from its own native representation and every structure view builds its presentation from:
cell,sites,species, andspecies_at_sites. This is the single interchange format; there is no pairwise conversion between backends.- property cell: httk.atomistic.models.cell.cell.Cell[source]¶
- Abstractmethod:
Expose the structure’s cell.
- property sites: httk.atomistic.models.sites.sites.Sites[source]¶
- Abstractmethod:
Expose the structure’s site coordinates.
- property species: tuple[httk.atomistic.models.species.species.Species, Ellipsis][source]¶
- Abstractmethod:
Expose the structure’s distinct species.
- property species_at_sites: tuple[str, Ellipsis][source]¶
- Abstractmethod:
Expose the species occupying each site.
- property charge: fractions.Fraction | None[source]¶
Expose the explicitly assigned net charge of the cell content.
Nonemeans unstated and is never derived from the species; it is distinct from an explicit zero.- Returns:
The assigned charge, or
Nonewhen it is unstated.- Return type:
fractions.Fraction | None
- property site_moments: httk.atomistic.models.moments.backend.SiteMomentsBackend | None[source]¶
Expose optional per-site magnetic moments in
sitesorder.Nonemeans “nothing stated”, not “zero moments”.- Returns:
The site moments, or
Nonewhen they are unstated.- Return type:
httk.atomistic.models.moments.backend.SiteMomentsBackend | None
- without_charges()[source]¶
Return an EXPLICIT lossy projection that drops declared oxidation states.
The canonical structure components and semantic metadata are preserved. A structure without species charges is returned by identity; charged structures are rebuilt in the canonical unit-cell family.
- Returns:
A charge-free structure, or this structure when already charge-free.
- Return type:
- property composition: httk.atomistic.models.formula.composition.Composition[source]¶
Project the canonical components into an elemental composition.
- property elements: tuple[str, Ellipsis] | None[source]¶
Expose the complete composition’s element symbols, if available.
- property nelements: int | None[source]¶
Expose the complete composition’s element count, if available.
- property elements_ratios: tuple[fractions.Fraction, Ellipsis] | None[source]¶
Expose complete composition ratios, if available.
- property chemical_formula_reduced: str | None[source]¶
Expose the reduced formula derived from a complete composition.
- property chemical_formula_anonymous: str | None[source]¶
Expose the anonymous formula derived from a complete composition.
- property chemical_formula_descriptive: str | None[source]¶
Expose an explicitly supplied descriptive formula, when available.
- property chemical_formula_hill: str | None[source]¶
Expose an explicitly supplied Hill formula, when available.
- property dimension_types: tuple[int, Ellipsis] | None[source]¶
Expose cell periodicity as OPTIMADE dimension flags.