soprano.optional#

optional.py

Contains imports for libraries considered optional, and decorators to include checks for them.

Functions

has_moyopy()

Return True if moyopy is importable.

has_spglib()

Return True if spglib is importable.

has_symmetry_backend()

Return True if at least one symmetry backend is available.

requireNetworkX([import_name])

requireScikitLearn([import_name])

requireSpglib([import_name])

Decorator that injects the spglib module into a function.

soprano.optional.has_moyopy()[source]#

Return True if moyopy is importable.

Return type:

bool

soprano.optional.has_spglib()[source]#

Return True if spglib is importable.

Return type:

bool

soprano.optional.has_symmetry_backend()[source]#

Return True if at least one symmetry backend is available.

Return type:

bool

soprano.optional.requireSpglib(import_name='spglib')[source]#

Decorator that injects the spglib module into a function.

Deprecated since version Use: soprano.properties.symmetry.backend.get_symmetry_dataset() with backend="spglib" (or "auto") instead. This decorator will be removed in a future release.