Group#

Utilities for point and space groups.

PointGroup#

PointGroup manages point group.

class PointGroup(pg_tag=None, core=None, verbose=False)[source]#

Bases: object

initialize the class.

Parameters:
  • pg_tag (TagGroup or str, optional) -- point-group tag.

  • core (BinaryManager, optional) -- core for binary data.

  • verbose (bool, optional) -- verbose access to binary data ?

Notes

  • if pg_tag is None, "C1" is used.

atomic_samb(bra_list, ket_list, spinful=False, u_matrix=None)[source]#

create atomic multipole basis set.

Parameters:
  • bra_list ([str]) -- atomic basis set for bra. see the examples in AtomicBasisSet

  • ket_list ([str]) -- atomic basis set for ket. see the examples in AtomicBasisSet

  • spinful (bool, optional) -- spinful ?

  • u_matrix (NSArray/[NSArray]) -- unitary transformation matrix from ket_list to arbitrary ket list.

Returns:

atomic SAMB, {TagMultipole: NSArray(matrix)}.

Return type:

dict

bond_cluster_samb(bond)[source]#

create bond-cluster multipole basis set.

Parameters:

bond (str or NSArray) -- bond, "vector@center", "tail;head", "start:vector".

Returns: tuple.
  • dict: bond-cluster SAMB, {TagMultipole: NSArray(vector)}.

  • NSArray: bonds, NSArray(bond).

bond_mapping(bond)[source]#

mapping between bond and symmetry operations (reduced coordinate).

Parameters:

bond (str or NSArray) -- bond, "vector@center", "tail;head", "start:vector".

Returns: tuple
  • dict: mapping from bond to symmetry-operation IDs. bond = "tail;head".

  • bool: nondirectional ?

Notes

  • if bond direction is reversed, symmetry operation ID with minus sign.

  • bonds are sorted by 1st SO.

find_rep_bond(bond_list)[source]#

find representative bonds from bond_list.

Parameters:

bond_list (NSArray) -- bond list.

Returns:

representative bonds.

Return type:

NSArray

find_rep_site(site_list)[source]#

find representative sites from site_list.

Parameters:

site_list (NSArray) -- site list.

Returns:

representative sites.

Return type:

NSArray

find_wyckoff_position(site)[source]#

find Wyckoff position for a given site (reduced coordinate).

Parameters:

site (str or NSArray) -- site, "[x,y,z]".

Returns:

Wyckoff position.

Return type:

str

irrep_decomposition(point_group, rank, axial=False)[source]#

irrep. decomposition of harmonics in terms of given point group.

Parameters:
  • point_group (str) -- point-group tag to be decompsed.

  • rank (int) -- rank of harmonics.

  • axial (bool, optional) -- axia harmonics ?

Returns:

decomposition info., [(harm_tag, [(coeff,harmonics basis of this group)].

Return type:

list

irrep_decomposition_table()[source]#

product irreducible decomposition table.

Returns:

(irrep1,irrep2): {irrep:n}, { (str, str): [(int,str)] }.

Return type:

dict

site_cluster_samb(site)[source]#

create site-cluster multipole basis set.

Parameters:

site (str or NSArray) -- representative site, "[x,y,z]".

Returns: tuple.
  • dict: site-cluster SAMB, {TagMultipole: NSArray(vector)}.

  • NSArray: sites, NSArray(vector).

site_mapping(site)[source]#

mapping between site and symmetry operations (reduced coordinate).

Parameters:

site (str or NSArray) -- site, "[x,y,z]".

Returns:

mapping from site string to symmetry-operation IDs.

Return type:

dict

Notes

  • sites are sorted by 1st SO.

classmethod spherical_atomic_multipole_basis(bra_list, ket_list, spinful=False, crystal='cubic', core=None, verbose=False)[source]#

create spherical atomic multipole basis set.

Parameters:
  • bra_list ([str]) -- atomic basis set for bra. see the examples in AtomicBasisSet

  • ket_list ([str]) -- atomic basis set for ket. see the examples in AtomicBasisSet

  • spinful (bool, optional) -- spinful ?

  • crystal (str, optional) -- seven crystal systems, triclinic/monoclinic/orthorhombic/tetragonal/trigonal/hexagonal/cubic.

  • core (BinaryManager, optional) -- core for binary data.

  • verbose (bool, optional) -- verbose parallel info and verbose access to binary data ?

Returns:

spherical atomic SAMB, {TagMultipole: NSArray(matrix)}.

Return type:

dict

transform_bond(bond, nondirectional=False, remove_duplicate=False)[source]#

set of transformed bonds (reduced coordinate).

Parameters:
  • bond (str or NSArray) -- bond, "vector@center", "tail;head", "start:vector".

  • nondirectional (bool, optional) -- ignore directional property ?

  • remove_duplicate (bool, optional) -- remove the same bonds ?

Returns:

transformed bonds (in order of symmetry operations).

Return type:

NSArray

Notes

  • when remove_duplicate and nondirectional are True, return values in the same order as bond_mapping keys.

transform_matrix_bond(bond, nondirectional=False, cc_only=False)[source]#

trasform matrix for bond basis (reduced coordinate).

Parameters:
  • bond (str or NSArray) -- bond, "vector@center", "tail;head", "start:vector".

  • nondirectional (bool, optional) -- ignore directional property ?

  • cc_only (bool, optional) -- conjugacy-class operations only ?

Returns: tuple
  • NSArray: symmetry operation matrices.

  • NSArray: bond basis.

transform_matrix_orbital(axial=False, cc_only=False, **kwargs)[source]#

transform matrix for harmonics basis (cartesian coordinate).

Parameters:
  • axial (bool, optional) -- axial harmonics ?

  • cc_only (bool, optional) -- conjugacy-class operations only ?

  • kwargs (dict, optional) -- select conditions for harmonics, (rank/irrep/mul/comp).

Returns: tuple
  • NSArray: symmetry operation matrices.

  • NSArray: harmonics basis.

transform_matrix_site(site, cc_only=False)[source]#

trasform matrix for site basis (reduced coordinate).

Parameters:
  • site (str or NSArray) -- site, "[x,y,z]".

  • cc_only (bool, optional) -- conjugacy-class operations only ?

Returns: tuple
  • NSArray: symmetry operation matrices.

  • NSArray: site basis.

transform_matrix_vector(axial=False, cc_only=False)[source]#

trasform matrix for vector basis (cartesian coordinate).

Parameters:
  • axial (bool, optional)

  • cc_only (bool, optional) -- conjugacy-class operations only ?

Returns: tuple
  • NSArray: symmetry operation matrices.

  • NSArray: vector basis.

transform_orbital(orbital, axial=False)[source]#

set of transformed orbitals (cartesian coordinate).

Parameters:
  • orbital (str) -- (xyz)-polynomial expression.

  • axial (bool, optional) -- axial orbital ?

Returns:

transformed orbitals (in order of symmetry operations).

Return type:

NSArray

transform_site(site, remove_duplicate=False)[source]#

set of transformed sites (reduced coordinate).

Parameters:
  • site (str or NSArray) -- site, "[x,y,z]".

  • remove_duplicate (bool, optional) -- remove the same sites ?

Returns:

transformed sites (in order of symmetry operations).

Return type:

NSArray

Notes

  • when remove_duplicate is True, return values in the same order as site_mapping keys.

transform_vector(vector, axial=False)[source]#

set of transformed vectors (cartesian coordinate).

Parameters:
  • vector (str or NSArray) -- vector, "[x,y,z]".

  • axial (bool, optional)

Returns:

transformed vectors (in order of symmetry operations).

Return type:

NSArray

virtual_cluster_basis(wyckoff=None, ortho=True, create=False)[source]#

virtual-cluster basis set.

Parameters:
  • wyckoff (str, optional) -- Wyckoff position.

  • ortho (bool, optional) -- orthogonalize ?

  • create (bool, optional) -- create from scratch ?

Returns: tuple
  • TagMultipole or NSArray: virtual-cluster basis set, (multipole tag, basis vector).

  • NSArray: site basis (reduced coordinate).

z_samb(x_tag_list, y_tag_list, toroidal_priority=False, **kwargs)[source]#

create combined multipole basis set.

Parameters:
  • x_tag_list (str/TagMultipole/[TagMultipole]) -- multipole/harmonics tag list.

  • y_tag_list (str/TagMultipole/[TagMultipole]) -- multipole/harmonics tag list.

  • toroidal_priority (bool, optional) -- create toroidal multipoles (G,T) in priority? else prioritize conventional multipoles (Q,M).

  • kwargs (dict, optional) -- select condition for multipoles, keywords in TagMultipole except for head.

Returns:

{(TagMultipole, TagMultipole(atomic), TagMultipole(site/bond)): [(coefficient, TagMultipole(atomic), TagMultipole(site/bond)] }.

Return type:

dict

character: CharacterPG#

the class to manage character table.

clebsch_gordan: ClebschGordanPG#

the class to manage Clebsch-Gordan coefficients.

core#

binary data.

harmonics: HarmonicsPG#

the class to manage harmonics.

property identity_irrep#

identity irreducible representation.

Returns:

identity irreducible representation.

Return type:

str

mp_dataset: BaseAtomicMultipoleDataset#

the class to manage atomic multipole matrices.

response: ResponseTensorPG#

the class to manage response tensors.

symmetry_operation: SymmetryOperationG#

the class to manage symmetry operations.

tag#

point-group tag.

virtual_cluster: VirtualClusterPG#

the class to manage virtual cluster.

wyckoff: WyckoffG#

the class to manage Wyckoff positions.

SpaceGroup#

SpaceGroup manages space group.

class SpaceGroup(sg_tag=None, core=None, verbose=False)[source]#

Bases: object

initialize the class.

Parameters:
  • sg_tag (TagGroup or str or int, optional) -- tag of space group.

  • core (BinaryManager, optional) -- core for binary data.

  • verbose (bool, optional) -- verbose access to binary data ?

Notes

  • if sg_tag is None, "C1^1" is used.

bond_cluster_samb(bond)[source]#

create bond-cluster multipole basis set.

Parameters:

bond (str or NSArray) -- bond, "vector@center", "tail;head", "start:vector".

Returns: tuple,
  • dict: bond-cluster SAMB, {TagMultipole: NSArray(vector)}.

  • NSArray: bonds, NSArray(bond).

bond_mapping(bond, plus_set=False)[source]#

mapping between bond and symmetry operations (reduced coordinate).

Parameters:
  • bond (str or NSArray) -- bond, "vector@center", "tail;head", "start:vector".

  • plus_set (bool, optional) -- add partial translations ?

Returns: tuple
  • dict: mapping from bond to symmetry-operations IDs. bond = "tail;head"

  • bool: nondirectional ?

Notes

  • if bond direction is reversed, symmetry operation ID with minus sign.

  • bonds are sorted by 1st SO.

  • if plus_set is True, return [set(t0),set(t1),...]

find_rep_bond(bond_list)[source]#

find representative bonds from bond_list.

Parameters:

bond_list (NSArray) -- bond list.

Returns:

representative bonds.

Return type:

NSArray

find_rep_site(site_list)[source]#

find representative sites from site_list.

Parameters:

site_list (NSArray) -- site list.

Returns:

representative sites.

Return type:

NSArray

find_wyckoff_position(site)[source]#

find Wyckoff position for a given site (reduced coordinate).

Parameters:

site (str or NSArray) -- site, "[x,y,z]".

Returns:

Wyckoff position.

Return type:

str

shift_home_unit_cell(site)[source]#

shift to home unit cell.

Parameters:

site (str or NSArray) -- site to be shifted.

Returns:

shifted site.

Return type:

NSArray

site_cluster_samb(site)[source]#

create site-cluster multipole basis set.

Parameters:

site (str or NSArray) -- representative site, "[x,y,z]".

Returns: tuple,
  • dict: site-cluster SAMB, {TagMultipole: NSArray(vector)}.

  • NSArray: sites, NSArray(vector).

site_mapping(site, plus_set=False)[source]#

mapping between site and symmetry operations (reduced coordinate).

Parameters:
  • site (str or NSArray) -- site, "[x,y,z]".

  • plus_set (bool, optional) -- add partial translations ?

Returns:

mapping from site string to symmetry-operation IDs.

Return type:

dict

Notes

  • sites are sorted by 1st SO.

  • if plus_set is True, return [set(t0),set(t1),...]

transform_bond(bond, nondirectional=False, shift=False, remove_duplicate=False, plus_set=False)[source]#

set of transformed bonds (reduced coordinate).

Parameters:
  • bond (str or NSArray) -- bond, "vector@center", "tail;head", "start:vector".

  • nondirectional (bool, optional) -- ignore directional property ?

  • shift (bool, optional) -- transformed bond starting points are moved into unit cell ?

  • remove_duplicate (bool, optional) -- remove the same bonds ?

  • plus_set (bool, optional) -- add partial translations ?

Returns:

transformed bonds (in order of symmetry operations, and plus_set).

Return type:

NSArray

Notes

  • when remove_duplicate, nondirectional and shift are True, return values in the same order as bond_mapping keys.

transform_matrix_bond(bond, nondirectional=False, cc_only=False)[source]#

transform matrix for bond basis (reduced coordinate).

Parameters:
  • bond (str or NSArray) -- bond, "vector@center", "tail;head", "start:vector".

  • nondirectional (bool, optional) -- ignore directional property ?

  • cc_only (bool, optional) -- conjugacy-class operations only ?

Returns: tuple
  • NSArray: symmetry operation matrices.

  • NSArray: bond basis.

transform_matrix_site(site, cc_only=False)[source]#

transform matrix for site basis (reduced coordinate).

Parameters:
  • site (str or NSArray) -- site, "[x,y,z]".

  • cc_only (bool, optional) -- conjugacy-class operations only ?

Returns: tuple
  • NSArray: symmetry operation matrices.

  • NSArray: site basis.

transform_site(site, shift=False, remove_duplicate=False, plus_set=False)[source]#

set of transformed sites (reduced coordinate).

Parameters:
  • site (str or NSArray) -- site, "[x,y,z]".

  • shift (bool, optional) -- transformed sites are moved into unit cell ?

  • remove_duplicate (bool, optional) -- remove the same sites ?

  • plus_set (bool, optional) -- add partial translations ?

Returns:

transformed sites (in order of symmetry operations, and plus_set).

Return type:

NSArray

Notes

  • when remove_duplicate and shift are True, return values in the same order as site_mapping keys.

z_samb(x_tag_list, y_tag_list, toroidal_priority=False, **kwargs)[source]#

create combined multipole basis set.

Parameters:
  • x_tag_list (str/TagMultipole/[TagMultipole]) -- multipole/harmonics tag list.

  • y_tag_list (str/TagMultipole/[TagMultipole]) -- multipole/harmonics tag list.

  • toroidal_priority (bool, optional) -- create toroidal multipoles (G,T) in priority? else prioritize conventional multipoles (Q,M).

  • kwargs (dict, optional) -- select condition for multipoles, keywords in TagMultipole except for head.

Returns:

{(TagMultipole, TagMultipole(atomic), TagMultipole(site/bond)): [(coefficient, TagMultipole(atomic), TagMultipole(site/bond)] }.

Return type:

dict

core#

binary data.

pg#

associated point group.

symmetry_operation: SymmetryOperationG#

the class to manage symmetry operations.

tag#

space-group tag.

wyckoff: WyckoffG#

the class to manage Wyckoff positions.