httk.atomistic.models.species.api

The minimal canonical species interface for httk-atomistic.

Classes

SpeciesAPI

Abstract base class for the canonical single-species interface.

Module Contents

class httk.atomistic.models.species.api.SpeciesAPI[source]

Bases: abc.ABC

Abstract base class for the canonical single-species interface.

It declares the accessors mirroring the OPTIMADE species fields that every species backend produces from its own native representation and every species view builds its presentation from: name, chemical_symbols, concentration, and the optional mass, attached, nattached, and original_name.

property name: str[source]
Abstractmethod:

property chemical_symbols: tuple[str, Ellipsis][source]
Abstractmethod:

property charges: tuple[fractions.Fraction | None, Ellipsis] | None[source]

Assigned charge numbers for the constituents, or None if unstated.

A None element means the charge of that constituent is unstated; whole- None means no constituent charges are stated. Values use elementary-charge units, for example a formal oxidation state.

Returns:

The constituent charges, or None when unstated.

Return type:

tuple[fractions.Fraction | None, Ellipsis] | None

property spins: tuple[fractions.Fraction | None, Ellipsis] | None[source]

Idealized signed spins assigned to the constituents, or None if unstated.

A None element means the spin of that constituent is unstated; whole-None means no constituent spins are stated. This is distinct from a calculated site magnetic moment.

Returns:

The constituent spins, or None when unstated.

Return type:

tuple[fractions.Fraction | None, Ellipsis] | None

property labels: tuple[str | None, Ellipsis] | None[source]

Free-form per-constituent labels, or None if unstated.

A None element means that constituent has no stated label; whole-None means no constituent labels are stated.

Returns:

The constituent labels, or None when unstated.

Return type:

tuple[str | None, Ellipsis] | None

property concentration: tuple[fractions.Fraction, Ellipsis][source]
Abstractmethod:

property is_ordered: bool[source]

Return whether every constituent has unit concentration.

Returns:

True when all concentrations are exactly Fraction(1).

Return type:

bool

property concentration_precision: tuple[fractions.Fraction | None, Ellipsis] | None[source]
Abstractmethod:

property mass: tuple[float, Ellipsis] | None[source]
Abstractmethod:

property attached: tuple[str, Ellipsis] | None[source]
Abstractmethod:

property nattached: tuple[int, Ellipsis] | None[source]
Abstractmethod:

property original_name: str | None[source]
Abstractmethod: