Tag#

For tag.

class TagBasis[source]#

Bases: object

static latex(tag, rank, ket=True)[source]#

Convert to LaTeX.

Parameters:
  • tag (str) – basis tag.

  • rank (int) – rank.

  • ket (bool, optional) – ket ? otherwise bra.

Returns:

  • (str) – in LaTeX format, without $.

static parse(tag)[source]#

Parse basis.

Parameters:

idx (str) – tag.

Returns:

bool, spherical:bool, orbital(M/gamma/J):str, spin(spin/J_M):str).

Return type:

  • (dict) – info, (spinless

static str(info, rank)[source]#

Convert to string.

Parameters:
  • info (dict) – basis info.

  • rank (int) – rank.

Returns:

  • (str) – basis tag.

class TagIrrep[source]#

Bases: object

static latex(tag)[source]#

Convert to LaTeX.

Parameters:

tag (str) – irrep.

Returns:

  • (str) – in LaTeX format, without $.

static parse(tag)[source]#

Parse irrep.

Parameters:

tag (str) – irrep.

Returns:

str, head:str, dimension:int, parity:str, complex:str, subscript:str, superscript:str).

Return type:

  • (dict) – info, (tag

static str(info)[source]#

Convert to string.

Parameters:

info (dict) – irrep. info.

Returns:

  • (str) – in string format.

class TagMultipole[source]#

Bases: object

static latex(idx, mp_type, component=None, tag='', vector=True, internal=False)[source]#

Convert to LaTeX.

Parameters:
  • idx (tuple) – multipole index.

  • mp_type (str) – multipole type, “spherical/point_group”.

  • component (int, optional) – component.

  • tag (str, optional) – superscript.

  • vector (bool, optional) – with vector arrow ?

  • internal (bool, optional) – add internal info. ?

Returns:

  • (str) – in LaTeX format, without $.

classmethod parse(idx, mp_type, component=None)[source]#

Parse multipole.

Parameters:
  • idx (tuple) – multipole index.

  • mp_type (str) – multipole type, “spherical/point_group”.

  • component (int, optional) – component.

Returns:

str, l:int, s:int, k:int, x:str, Gamma:str, n:int, p:int, component:int, t_type:str, p_type:str, mp_type: str).

Return type:

  • (dict) – info, (X

Notes

  • spherical: (X, l, s, k, x), [type, rank, internal rank, internal component, internal type].

  • point_group: (X, l, Gamma, n, p, s, k, x), [type, rank, irrep., multiplicity, additional multiplicity, internal rank, internal component, internal type].

static str(info)[source]#

Convert to string.

Parameters:

info (dict) – multipole info.

Returns:

  • (str) – multipole in str.

d_default = {'Gamma': '', 'X': 'Q', 'component': None, 'k': 0, 'l': 0, 'mp_type': 'spherical', 'n': -1, 'p': -1, 'p_type': 'polar', 's': 0, 't_type': 'electric', 'x': 'q'}#
p_dict = {'G': 'axial', 'M': 'axial', 'Q': 'polar', 'T': 'polar'}#
s_dict = {0: 's', 1: 'p', 2: 'd', 3: 'f'}#
t_dict = {'G': 'electric', 'M': 'magnetic', 'Q': 'electric', 'T': 'magnetic'}#
class TagSymmetryOperation[source]#

Bases: object

static latex(tag)[source]#

Convert to LaTeX.

Parameters:

tag (str) – symmetry operation.

Returns:

  • (str) – in LaTeX format, without $.

static parse(tag, hexagonal=False)[source]#

Parse symmetry operation.

Parameters:
  • tag (str) – symmetry operation.

  • hexagonal (bool, optional) – convert to cartesian coordinate for hexagonal systems ?

Returns:

info, (mirror:bool, inversion:bool, n:int, axis:str, det:int, partial_trans:str, zero_trans:bool, point_group:bool, time_reversal:bool).

Return type:

  • (dict)

Note

  • format of symmetry-operation string (translation is omittable).

  • inversion(-) n-fold rotation(2,3+/-,4+/-,6+/-)mirror(m) axis[n1n2n3][’] :translation[t1,t2,t3].

static parse_axis(tag)[source]#

Parse axis string.

Parameters:

tag (str) – axis string (without [],comma,space).

Returns:

  • (str) axis, [a,b,c].

static str(info, hexagonal=False)[source]#

Convert to string.

Parameters:
  • info (dict) – symmetry operation info.

  • hexagonal (bool, optional) – convert from cartesian coordinate for hexagonal systems ?

Returns:

  • (str) – in string format.