Symmetrizer

All Symmetrizer classes are derived from BaseSymmetrizer

class neuralxc.symmetrizer.symmetrizer.BaseSymmetrizer(symmetrize_instructions)
__init__(symmetrize_instructions)

Symmetrizer :param symmetrize_instructions: Attributes needed to symmetrize input (such as angular momentum etc.) :type symmetrize_instructions: dict

get_symmetrized(C)

Returns a symmetrized version of the descriptors c (from DensityProjector)

Parameters:C (dict of numpy.ndarrays or list of dict of numpy.ndarrays) – Electronic descriptors
Returns:D – Symmetrized descriptors
Return type:dict of numpy.ndarrays

Customized Symmetrizers can be created by inheriting from this base class and implementing the method _symmetrize_function. As of now two symmetrizers are implemented by default:

class neuralxc.symmetrizer.symmetrizer.TraceSymmetrizer(*args, **kwargs)

Symmetrizes density projections with respect to global rotations.

_registry_name:‘trace’
static _symmetrize_function(c, n_l, n, *args)

Returns the symmetrized version of c

Parameters:
  • c (np.ndarray of floats) – Stores the tensor elements in the order (n,l,m)
  • n_l (int) – number of angular momenta (not equal to maximum ang. momentum! example: if only s-orbitals n_l would be 1)
  • n (int) – number of radial functions
Returns:

Casimir invariants

Return type:

np.ndarray

class neuralxc.symmetrizer.symmetrizer.MixedTraceSymmetrizer(*args, **kwargs)
_registry_name:‘mixed_trace’
static _symmetrize_function(c, n_l, n, *args)

Return trace of c_m c_m’ with mixed radial channels of the tensors stored in c

Parameters:
  • c (np.ndarray of floats/complex) – Stores the tensor elements in the order (n,l,m)
  • n_l (int) – number of angular momenta (not equal to maximum ang. momentum! example: if only s-orbitals n_l would be 1)
  • n (int) – number of radial functions
Returns:

Casimir invariants

Return type:

np.ndarray

If

\[C_{nlm}\]

is the density projection with principal quantum number n, angular momentum l, and angular momentum projection m then trace symmetrizers create a rotationally invariant feature by taking the trace of the outer product over m of C with itself:

\[D_{nl} = \text{Tr}_{mm'}[C \otimes_{m} C]\]

MixedTraceSymmetrizer generalizes this approach by mixing radial channels obtaining

\[D_{nn'l}\]