Response tensor#
Response tensors up to 4th rank.
- A12(i1, i2)[source]#
Anti-symmetric part of rank 2 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2, 1-3.
- Returns:
(list) – expression list, (coeff, multipole).
- A123(i1, i2, i3)[source]#
Anti-symmetric part of rank 3 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2, 1-3.
i3 (int) – index 3, 1-3.
- Returns:
(list) – expression list, (coeff, multipole).
- A1234(i1, i2, i3, i4)[source]#
AAS part of rank 4 tensor component.
- 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).
- Ab1234(i1, i2, i3, i4)[source]#
AAA part of rank 4 tensor component.
- 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).
- M1234(i1, i2, i3, i4)[source]#
SA part of rank 4 tensor component.
- 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).
- Mb1234(i1, i2, i3, i4)[source]#
AS part of rank 4 tensor component.
- 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).
- P1(i1)[source]#
Rank 1 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
- Returns:
(list) – expression list, (coeff, multipole).
- P2(i1, i2, opt=None)[source]#
Rank 2 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2, 1-3.
opt (str, optional) – part, s/a.
- Returns:
(list) – expression list, (coeff, multipole).
- P3(i1, i2, i3, opt=None)[source]#
Rank 3 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2, 1-3.
i3 (int) – index 3, 1-3.
opt (str, optional) – part, ss/sa/a.
- Returns:
(list) – expression list, (coeff, multipole).
- P4(i1, i2, i3, i4, opt=None)[source]#
Rank 4 tensor component.
- 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.
opt (str, optional) – part, sss/ssa/aas/aaa/sa/as/s/a/t.
- Returns:
(list) – expression list, (coeff, multipole).
- S1(i1)[source]#
Rank 1 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
- Returns:
(list) – expression list, (coeff, multipole).
- S12(i1, i2)[source]#
Symmetric part of rank 2 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2, 1-3.
- Returns:
(list) – expression list, (coeff, multipole).
- S123(i1, i2, i3)[source]#
Full symmetric part of rank 3 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2, 1-3.
i3 (int) – index 3, 1-3.
- Returns:
(list) – expression list, (coeff, multipole).
- S1234(i1, i2, i3, i4)[source]#
SSS part of rank 4 tensor component.
- 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).
- Sb123(i1, i2, i3)[source]#
Symmetric anti-symetric part of rank 3 tensor component.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2, 1-3.
i3 (int) – index 3, 1-3.
- Returns:
(list) – expression list, (coeff, multipole).
- Sb1234(i1, i2, i3, i4)[source]#
SSA part of rank 4 tensor component.
- 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).
- T1234(i1, i2, i3, i4)[source]#
T part of rank 4 tensor component (fully symmetric in i1, i2, i3).
- 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).
Note
(d12 d34 + d13 d24 + d14 d23) Q^{(1)} + d12 Q^{(1)}_{34} + d13 Q^{(1)}_{24} + d23 Q^{(1)}_{14} + d14 Q^{(2)}_{23} + d24 Q^{(2)}_{13} + d34 Q^{(2)}_{12} + (d12 e345 + d13 e245 + d23 e145) G^{(1)}_{5} + e345 G^{(1)}_{125} + e145 G^{(1)}_{235} + e245 G^{(1)}_{135} + Q^{(1)}_{1234}, i.e., 1 + 5 + 5 + 3 + 7 + 9 = 30.
- convert_mp_alias(tag, latex=False)[source]#
Convert standard active multipole tag to alias name.
- Parameters:
tag (str) – active multipole tag.
- Returns:
(str) – alias name.
- delta(i1, i2)[source]#
Kronecker delta.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2. 1-3.
- Returns:
(sympy) – delta(i1,i2).
- epsilon(i1, i2, i3)[source]#
Levi-Civita epsilon.
- Parameters:
i1 (int) – index 1, 1-3.
i2 (int) – index 2. 1-3.
i3 (int) – index 3, 1-3.
- Returns:
(sympy) – epsilon(i1,i2,i3).
- mp_string(lst, head, sort=True)[source]#
Multipole string.
- Parameters:
head (str) – head of multipole.
sort (bool, optional) – sort subscript ?
- Returns:
(str) – multipole string.
- multipole_rank(tag)[source]#
Rank of standard active multipole tag.
- Parameters:
tag (str) – active multipole tag, e.g., “Qdu” (X=Q/G/M/T + symbol in mp_alias).
- Returns:
(int) – rank, 0-4 for active multipoles (0-9 for any symbol in mp_alias).
Note
the first letter of the symbol (s/p/d/f/g/h/i/j/k/l) gives the rank.
- simplify_tensor(M)[source]#
Simplify tensor.
- Parameters:
M (ndarray) – tensor, [[(symbol, expression)]].
- Returns:
simplified tensor. - (dict): expression dict.
- Return type:
(ndarray)
- RANK_LETTER = 'spdfghijkl'#
Letter of the rank of an orbital name (0-9), e.g., “fax” -> 3.
- mp_alias = {'du': ('u', ''), 'dv': ('v', ''), 'dxy': ('xy', ''), 'dxz': ('xz', ''), 'dyz': ('yz', ''), 'f3': ('xyz', ''), 'fax': ('x', '\\alpha'), 'fay': ('y', '\\alpha'), 'faz': ('z', '\\alpha'), 'fbx': ('x', '\\beta'), 'fby': ('y', '\\beta'), 'fbz': ('z', '\\beta'), 'fc': ('3c', ''), 'fs': ('3s', ''), 'fx': ('3x', ''), 'fy': ('3y', ''), 'g': ('4', ''), 'g0': ('40', ''), 'gau': ('4u', '\\alpha'), 'gav': ('4v', '\\alpha'), 'gax': ('4x', '\\alpha'), 'gay': ('4y', '\\alpha'), 'gaz': ('4z', '\\alpha'), 'gbx': ('4x', '\\beta'), 'gby': ('4y', '\\beta'), 'gbz': ('4z', '\\beta'), 'gc': ('4c', ''), 'gc4': ('4c4', ''), 'gs': ('4s', ''), 'gu': ('4u', ''), 'gv': ('4v', ''), 'hu': ('5u', ''), 'hv': ('5v', ''), 'i3': ('63', ''), 'ixy': ('6xy', ''), 'j3': ('7xyz', ''), 'l3': ('9xyz', ''), 'px': ('x', ''), 'py': ('y', ''), 'pz': ('z', ''), 's': ('0', '')}#
(“x”, “alpha”)}, from the group database.
- Type:
Alias of the multipole symbols, {orbital name
- Type:
(lower, upper)}, e.g., {“fax”