Typing (sisl.typing)

sisl will use typing to enable static analyzers and to aid users when reading documentation.

The typing types are shown below:

AxisIntLiteral

alias of Literal[0, 1, 2]

CellAxisStrLiteral

alias of Literal['a', 'b', 'c']

CellAxisLiteral

alias of Literal[0, 1, 2] | Literal['a', 'b', 'c']

CartesianAxisStrLiteral

alias of Literal['x', 'y', 'z']

CartesianAxisLiteral

alias of Literal[0, 1, 2] | Literal['x', 'y', 'z']

CellAxis

alias of Literal[0, 1, 2] | Literal['a', 'b', 'c']

CellAxes

alias of Literal[0, 1, 2] | Literal['a', 'b', 'c'] | Sequence[Literal[0, 1, 2] | Literal['a', 'b', 'c']]

CartesianAxis

alias of Literal[0, 1, 2] | Literal['x', 'y', 'z']

CartesianAxes

alias of Literal[0, 1, 2] | Literal['x', 'y', 'z'] | Sequence[Literal[0, 1, 2] | Literal['x', 'y', 'z']]

AnyAxis

alias of Literal[0, 1, 2] | Literal['a', 'b', 'c'] | Literal['x', 'y', 'z']

AnyAxes

alias of Literal[0, 1, 2] | Literal['a', 'b', 'c'] | Sequence[Literal[0, 1, 2] | Literal['a', 'b', 'c']] | Literal['x', 'y', 'z'] | Sequence[Literal[0, 1, 2] | Literal['x', 'y', 'z']]

SimpleIndex

alias of int | Sequence[int] | Sequence[bool]

AtomsIndex

alias of int | Sequence[int] | Sequence[bool] | str | dict | Atom | AtomCategory | GenericCategory | Shape | bool | None | ellipsis

OrbitalsIndex

alias of int | Sequence[int] | Sequence[bool] | str | dict | Atom | AtomCategory | Shape | bool | None | ellipsis

AtomLike

alias of int | str | Atom

AtomsLike

alias of int | str | Atom | Sequence[int | str | Atom] | Atoms

CellLike

alias of ndarray[tuple[int, ...], dtype[_ScalarType_co]] | list | tuple

Coord

All the operations on a read-only sequence.

CoordOrScalar

alias of float | Sequence[float]

FuncType

alias of Callable[[...], Any]

GaugeType

alias of Literal['lattice', 'atomic']

GeometryLike

alias of str | BaseSile | Path | Geometry

GridLike

alias of str | BaseSile | Path | Grid

KPoint

All the operations on a read-only sequence.

LatticeLike

alias of str | BaseSile | Path | Lattice | LatticeChild | ndarray[tuple[int, ...], dtype[_ScalarType_co]] | list | tuple

LatticeOrGeometry

alias of Lattice | Geometry

LatticeOrGeometryLike

alias of str | BaseSile | Path | Lattice | LatticeChild | ndarray[tuple[int, ...], dtype[_ScalarType_co]] | list | tuple | Geometry

ProjectionTypeMatrix

alias of Literal['matrix', 'ij']

ProjectionTypeTrace

alias of Literal['trace', 'sum']

ProjectionTypeDiag

alias of Literal['diagonal', 'diag', 'ii']

ProjectionTypeHadamard

alias of Literal['hadamard', 'basis']

ProjectionTypeHadamardAtoms

alias of Literal['hadamard:atoms', 'atoms']

ProjectionType

alias of Literal['matrix', 'ij'] | Literal['diagonal', 'diag', 'ii'] | Literal['trace', 'sum']

DistributionStr

alias of Literal['gaussian', 'lorentzian', 'fermi', 'bose-einstein', 'cold', 'step-function', 'heaviside']

DistributionFunc

alias of Callable[[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], ndarray]

DistributionType

alias of Literal['gaussian', 'lorentzian', 'fermi', 'bose-einstein', 'cold', 'step-function', 'heaviside'] | Callable[[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], ndarray]

SileLike

alias of str | BaseSile | Path

SparseMatrix

alias of spmatrix | sparray | SparseCSR

SparseMatrixExt

alias of spmatrix | sparray

UnitsVar

alias of str | Mapping[str, str] | Sequence[str]