e3x.config.Config

class e3x.config.Config[source]

Static class for storing global configuration options for e3x.

cartesian_order

Whether operations assume irreps are stored in Cartesian order or not by default.

use_fused_tensor

Whether modules that internally need tensor products use FusedTensor or Tensor for computing the tensor product by default.

normalization

Which normalization is assumed for the spherical harmonics by default.

spherical_harmonics_cache

Path to disk cache with coefficients for computing spherical harmonics.

clebsch_gordan_cache

Path to disk cache with Clebsch-Gordan coefficients.

wigner_d_cache

Path to disk cache with coefficients for converting rotation matrices to Wigner-D matrices.

tensor_conversion_cache

Path to disk cache with tensor conversion coefficients.

static set_cartesian_order(cartesian_order=True)[source]

Sets the value of Config.cartesian_order.

Parameters:

cartesian_order (bool, default: True) – New value for Config.cartesian_order.

Return type:

None

static set_clebsch_gordan_cache(path=None)[source]

Sets the value of Config.clebsch_gordan_cache.

Parameters:

path (Union[str, PathLike, None], default: None) – Path to disk cache for saving/loading Clebsch-Gordan coefficients.

Return type:

None

static set_normalization(normalization='racah')[source]

Sets the value of Config.normalization.

Parameters:

normalization ({'4pi', 'orthonormal', 'racah', 'schmidt'}, default: 'racah') – New value for Config.normalization.

Raises:

ValueError – If normalization has an invalid value.

Return type:

None

static set_spherical_harmonics_cache(path=None)[source]

Sets the value of Config.spherical_harmonics_cache.

Parameters:

path (Union[str, PathLike, None], default: None) – Path to disk cache for saving/loading spherical harmonics coefficients.

Return type:

None

static set_tensor_conversion_cache(path=None)[source]

Sets the value of Config.tensor_conversion_cache.

Parameters:

path (Union[str, PathLike, None], default: None) – Path to disk cache for saving/loading tensor conversion coefficients.

Return type:

None

static set_use_fused_tensor(use_fused_tensor=False)[source]

Sets the value of Config.use_fused_tensor.

Parameters:

use_fused_tensor (bool, default: False) – New value for Config.use_fused_tensor.

Return type:

None

static set_wigner_d_cache(path=None)[source]

Sets the value of Config.wigner_d_cache.

Parameters:

path (Union[str, PathLike, None], default: None) – Path to disk cache for saving/loading coefficients for converting rotation matrices to Wigner-D matrices.

Return type:

None