spglib.utils module#

Various base and utility definitions.

spglib.utils.Cell: TypeAlias = ForwardRef('spglib.spg.SpgCell') | ForwardRef('spglib.msg.MsgCell')#

Either spglib.spg.SpgCell or spglib.msg.MsgCell.

spglib.utils.Lattice#

Basis vectors in (3, 3) shape.

alias of Sequence[Sequence[float]]

spglib.utils.Magmoms: TypeAlias = collections.abc.Sequence[float] | collections.abc.Sequence[collections.abc.Sequence[float]]#

Magnetic moments of atoms in either (N,) or (N, 3) shape.

spglib.utils.Numbers#

Integer numbers for identifying atoms in (N,) shape.

alias of Sequence[int]

spglib.utils.Positions#

Point coordinates of atoms in (N, 3) shape.

alias of Sequence[Sequence[float]]

spglib.utils.get_version()[source]#

Return version number of spglib with tuple of three numbers.

Added in version 1.8.3.

Deprecated since version 2.3.0: Use spg_get_version() and spglib.__version__ instead

Return type:

tuple[int, int, int]

spglib.utils.spg_get_commit()[source]#

Get the commit of the detected spglib C library.

Added in version 2.3.0.

Return type:

str

Returns:

commit string

spglib.utils.spg_get_version()[source]#

Get the X.Y.Z version of the detected spglib C library.

Added in version 2.3.0.

Return type:

str

Returns:

version string

spglib.utils.spg_get_version_full()[source]#

Get the full version of the detected spglib C library.

Added in version 2.3.0.

Return type:

str

Returns:

full version string