Changing the default behavior of E3x
Functions and modules in E3x often assume specific conventions, which, in some
cases, may be even necessary for the correct interaction with other components.
Examples include the ordering of irreps, whether
higher-level modules such as TensorDense
or MessagePass
use the
Tensor
or the
FusedTensor
module to
couple irreps, or the normalization used when computing
spherical_harmonics
. While the
behavior of all functions and modules can be tuned individually by providing
corresponding keyword arguments, it may be convenient to change the default
behavior globally (e.g. to avoid subtle bugs that may appear when the
ordering of irreps is inconsistent across different
operations). Default behaviors can be changed with the
Config
class (see its documentation for a full
overview of changeable behaviors). For example, to change the default
normalization of
spherical_harmonics
from
'racah'
to 'orthonormal'
you could simply call
import e3x
e3x.Config.set_normalization('orthonormal')
at the start of your script.