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[Any, ...], dtype[_ScalarT]] | 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[Any, ...], dtype[_ScalarT]] | list | tuple

LatticeOrGeometry

alias of Lattice | Geometry

LatticeOrGeometryLike

alias of str | BaseSile | Path | Lattice | LatticeChild | ndarray[tuple[Any, ...], dtype[_ScalarT]] | 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]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]], ndarray]

DistributionType

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

RotationType

alias of Tuple[float, str | Sequence[float]] | Sequence[float] | Quaternion

SileLike

alias of str | BaseSile | Path

SparseMatrix

alias of spmatrix | sparray | SparseCSR

SparseMatrixExt

alias of spmatrix | sparray

SparseMatrixGeometry

alias of SparseAtom | SparseOrbital

SparseMatrixPhysical

alias of SparseAtom | SparseOrbital | SparseOrbitalBZ | SparseOrbitalBZSpin

SpinType

alias of Spin | Literal['', 'unpolarized', 'colinear', 'collinear', 'polarized', 'p', 'pol', 'noncolinear', 'noncollinear', 'non-colinear', 'non-collinear', 'nc', 'spinorbit', 'spin-orbit', 'so', 'soc', 'nambu', 'bdg']

UnitsVar

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

SeqBool

All the operations on a read-only sequence.

SeqOrScalarBool

alias of bool | Sequence[bool]

SeqInt

All the operations on a read-only sequence.

SeqOrScalarInt

alias of int | Sequence[int]

SeqFloat

All the operations on a read-only sequence.

SeqOrScalarFloat

alias of float | Sequence[float]