Tag#

Utilities for tags.

TagGroup#

TagGroup manages tag of group.

class TagGroup(tag_str: dataclasses.InitVar[str], no: int = 1, SS: str = 'C_1', IS: str = 'C_1', crystal: str = 'triclinic', setting: str = '', pg: str = '', subgroup: str = 'cubic')[source]#

Bases: Tag

tag of group.

classmethod create(crystal='', space_group=False)[source]#

create group tags.

Parameters:
  • crystal (str, optional) -- crystal system, or "complex/real/cubic_series/hexagonal_series" for point group.

  • space_group (bool, optional) -- space group or point_group ?

Returns:

tags.

Return type:

TagList

info(latex=False)[source]#

info. of point group.

Parameters:

latex (bool, optional) -- in LaTeX ?

Returns:

No. of group. - str: Schoenflies symbol. - str: International (short) symbol. - str: setting. or - str: info. string in LaTeX.

Return type:

  • int

is_hexagonal_subgroup()[source]#

is hexagonal subgroup ?

Returns:

is hexagonal subgroup ?

Return type:

bool

is_point_group()[source]#

is point group ?

Returns:

is point group ?

Return type:

bool

latex()[source]#

default function to convert latex format. impliment explicitly in each subclass.

property lattice#

Bravais lattice, (A/B/C/P/I/F/R) or null for point group.

Returns:

lattice letter.

Return type:

str

TagIrrep#

TagIrrep manages tag of irreducible representation.

class TagIrrep(tag_str: dataclasses.InitVar[str], tag: str = '', dim: int = 1, parity: str = '', cmplx: str = '', head: str = '', sub: str = '', sup: str = '')[source]#

Bases: Tag

tag of irreducible representation.

classmethod create()[source]#

irrep. tags for point groups.

Returns:

all irrep. tags.

Return type:

TagList

latex()[source]#

default function to convert latex format. impliment explicitly in each subclass.

TagMultipole#

TagMultipole manages tag of multipole.

class TagMultipole(tag_str: dataclasses.InitVar[str], head: str = 'Q', m_type: str = 'h', rank: int = 0, irrep: str = '', mul: int = 0, comp: int = -1, s: int = -1, k: int = -1, dim: int = 1)[source]#

Bases: Tag

tag of multipole.

classmethod create(axial=False)[source]#

harmonics tags.

Parameters:

axial (bool, optional) -- axial ?

Returns:

tags.

Return type:

TagList

classmethod create_spherical(head='Q', rank=0, mul=0, comp=1, s=-1, k=-1)[source]#

create tag for spherical (atomic) multipole.

Parameters:
  • head (str, optional) -- _description_. Defaults to "Q".

  • rank (int, optional) -- _description_. Defaults to 0.

  • mul (int, optional) -- _description_. Defaults to 0.

  • comp (int, optional) -- _description_. Defaults to 1.

  • s (int, optional) -- _description_. Defaults to -1.

  • k (int, optional) -- _description_. Defaults to -1.

Returns:

_description_

Return type:

_type_

latex()[source]#

default function to convert latex format. impliment explicitly in each subclass.

reverse_i_type()[source]#

space-reversal tag.

Returns:

space-reversal tag.

Return type:

TagMultipole

reverse_t_type()[source]#

time-reversal tag.

Returns:

time-reversal tag.

Return type:

TagMultipole

tag_irrep()[source]#

tag of irrep.

Returns:

tag of irrep. or None (for spherical case).

Return type:

TagIrrep

to_harmonics()[source]#

convert tag to corresponding harmonics.

Returns:

converted tag.

Return type:

TagMultipole

to_polar()[source]#

convert tag to corresponding polar one.

Returns:

converted tag.

Return type:

TagMultipole

property i_type#

parity type.

Returns:

parity type, (polar/axial).

Return type:

str

property l#

rank of multipole.

Returns:

rank.

Return type:

int

property m#

component of multipole (\(-l\le m \le l\) for spherical version).

Returns:

component.

Return type:

int

property t_type#

time-reversal type.

Returns:

time-reversal type, (electric/magnetic).

Return type:

str

TagResponseTensor#

TagResponseTensor manages tag of response tensor.

class TagResponseTensor(tag_str: dataclasses.InitVar[str], head: str = 'Q', rank: int = 0, comp: str = 's')[source]#

Bases: Tag

tag of response tensor.

classmethod create(head, rank, comp)[source]#

create response tensor tag.

Parameters:
  • head (str) -- head, (Q/G/T/M).

  • rank (int) -- rank, (0/1/2/3/4).

  • comp (str) -- (0):(s), (1):(s), (2):(s/a), (3):(s/a), (4):(sss/ssa/aas/aaa/sa/as).

Returns:

tag.

Return type:

TagResponseTensor

latex()[source]#

default function to convert latex format. impliment explicitly in each subclass.

property i_type#

parity type.

Returns:

parity type, (polar/axial).

Return type:

str

property t_type#

time-reversal type.

Returns:

time-reversal type, (electric/magnetic).

Return type:

str

TagSymmetryOperation#

TagSymmetryOperation manages tag of symmetry operation.

class TagSymmetryOperation(tag_str: dataclasses.InitVar[str], mirror: bool = False, inversion: bool = False, n: int = 1, axis: str = '[0,0,1]', t: str = '[0,0,0]', t0: bool = True, pg: bool = True)[source]#

Bases: Tag

tag of symmetry operation.

latex()[source]#

default function to convert latex format. impliment explicitly in each subclass.

TagWyckoff#

TagWyckoff manages tag of wyckoff position.

class TagWyckoff(tag_str: dataclasses.InitVar[str], letter: str = 'a', n: int = 1)[source]#

Bases: Tag

tag of wyckoff position.

classmethod create(tag)[source]#

point-group tags.

Parameters:

tag (str) -- point-group/space-group tag.

Returns:

tags.

Return type:

[TagWyckoff]

latex()[source]#

default function to convert latex format. impliment explicitly in each subclass.

TagList#

This file provides utility functions for tag.

class TagList(lst=None)[source]#

Bases: list

create tags.

Parameters:

lst ([Tag]) -- list of tag class.

classmethod from_str(tag_type, tag_list)[source]#

create tags.

Parameters:
  • tag_type (Tag) -- Tag class.

  • tag_list ([str]) -- tag list in str.

latex()[source]#

convert to list of LaTeX.

Returns:

latex string.

Return type:

[str] or str

select(**kwargs)[source]#

select tags with given keywords.

Parameters:

kwargs (dict) -- field-value pairs to select.

Returns:

selected tag list.

Return type:

TagList

str_list()[source]#

convert to list of string.

Returns:

tag string.

Return type:

[str] or str

symbol(commutative=False)[source]#

convert to list of non-commutative symbol.

Returns:

non-commutative symbol.

Return type:

[sympy]