Response tensor#

Response tensors of magnetic point groups in terms of active multipoles (up to rank 4).

Ported from MultiPie Ver.2 (Group.response_tensor_all and Group.response_tensor), without Group: the active multipoles are taken from group.pkl and the cartesian-multipole relation and the LaTeX names from info.pkl. The cartesian decomposition of tensor components (P0-P4), mp_string and simplify_tensor are those of multipie.util.util_response_tensor, except for the rank-4 t part (T1234), which is defined here (fully symmetric; that of MultiPie Ver.2 and 3.0-3.2.0 is not), so that the tensors do not depend on the installed MultiPie.

  • response tensor of a group (dict) = {(X, rank, opt): (matrix, expression)}
    • X: tensor type, “Q” (polar), “G” (axial), “T” (magnetic polar), “M” (magnetic axial).

    • rank: 0-4, opt: “” (rank 0, 1), “s/a” (rank 2), “ss/sa/a” (rank 3), “sss/ssa/aas/aaa/sa/as/s/a/t” (rank 4).

    • matrix: ndarray (sympy) of tensor components (symbols such as Q_{xyz}, 0 for vanishing components).

    • expression: {component symbol: expression in terms of active multipoles}.

T1234(i1, i2, i3, i4)[source]#

T part of rank 4 tensor component (fully symmetric in i1, i2, i3).

The same as multipie.util.util_response_tensor.T1234 of MultiPie 3.2.1 or later (CMT-MU/MultiPie#255), so that the tensors do not depend on the installed MultiPie (that of MultiPie Ver.2 and 3.0-3.2.0 is not fully symmetric).

Parameters:
  • i1 (int) – index 1, 1-3.

  • i2 (int) – index 2, 1-3.

  • i3 (int) – index 3, 1-3.

  • i4 (int) – index 4, 1-3.

Returns:

  • (list) – expression list, (coeff, multipole).

active_dict(active, cartesian_mp)[source]#

Active multipoles for each cartesian multipole.

Parameters:
  • active (list) – active multipoles of MPG, e.g. [“Qs”, “Gdu”, …].

  • cartesian_mp (dict) – relation between cartesian component and multipole, {comp: [(coeff, name)]}.

Returns:

[(coeff, (X, name))]}.

Return type:

  • (dict) – {X+comp

multipole_latex(X, name, ss, latex)[source]#

LaTeX symbol of a multipole, e.g. mathbb{Q}_{x}^{alpha(1)}.

Parameters:
  • X (str) – Q/G/T/M.

  • name (str) – orbital name (info[“harmonics”][“latex”][“orbital”]).

  • ss (str) – superscript of the cartesian decomposition, e.g. “(1)”.

  • latex (dict) – LaTeX suffix of orbital names, e.g. “_{x}^{alpha}”.

Returns:

  • (str) – LaTeX.

response_tensor_component(X, rank, comp, opt, act, latex)[source]#

Tensor component in terms of active multipoles.

Parameters:
  • X (str) – tensor type, Q/G/T/M.

  • rank (int) – rank, 0-4.

  • comp (tuple) – component indices (1:x, 2:y, 3:z).

  • opt (str) – tensor type option.

  • act (dict) – active dict (active_dict).

  • latex (dict) – LaTeX suffix of orbital names.

Returns:

  • (sympy) – expression.

response_tensor_all(active, cartesian_mp, latex, X)[source]#

All response tensors of type X up to rank 4.

Parameters:
  • active (list) – active multipoles of MPG.

  • cartesian_mp (dict) – relation between cartesian component and multipole (cubic or hexagonal).

  • latex (dict) – LaTeX suffix of orbital names.

  • X (str) – tensor type, Q/G/T/M.

Returns:

(matrix, expression)}.

Return type:

  • (dict) – {(X, rank, opt)

load_response_tensor()[source]#

Load response tensors (multipiegen/binary/response_tensor.pkl).

Returns:

{(X, rank, opt): (matrix, expression)}}. str() gives the description.

Return type:

  • (BinaryManager) – {MPG_id