:py:mod:`pemtk.sym._directProduct` ================================== .. py:module:: pemtk.sym._directProduct .. autoapi-nested-parse:: Direct product functions for libmsym and symmetrized harmonics routines. 17/04/23 v1 Developed/adapted from libmsym demo code, see https://github.com/mcodev31/libmsym/issues/29 Special thanks to mcodev31 for the help. For quick reference tables, see also http://www.gernot-katzers-spice-pages.com/character_tables/index.html Formulas should follow those on p29 in Atkins, B.P.W., Child, M.S. and Phillips, C.S.G. (2006) Tables for Group Theory. Oxford University Press. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: pemtk.sym._directProduct.prod pemtk.sym._directProduct.prodList pemtk.sym._directProduct.dotArray pemtk.sym._directProduct.symDecomposition pemtk.sym._directProduct.diretProductFromList pemtk.sym._directProduct.directProductTable .. py:function:: prod(character_table, s1, s2) Array product of two irrep characters. :param character_table: :type character_table: libmsym character table. :param s1: Index for irrep/symmetry species 1. :type s1: int :param s2: Index for irrep/symmetry species 2. :type s2: int :returns: **np.array** :rtype: array product. .. py:function:: prodList(character_table, symList) Array product of (any number of) irrep characters from a list. :param character_table: :type character_table: libmsym character table. :param symList: List of species to use. E.g. symList = ['A1g','A1u','B1u', 'B1u'] defines resultant as direct product of these terms. :type symList: list :returns: **np.array** :rtype: array product. .. rubric:: Examples >>> PG = 'D2h' >>> ctx = msym.Context(elements=[msym.Element(name = "H", coordinates = [.0,.0,.0])], basis_functions=[], point_group=PG) >>> r = prodMulti(ctx.character_table, ['A1g','A1u','B1u', 'B1u']) >>> r array([ 1., 1., -1., -1., -1., -1., 1., 1.]) .. py:function:: dotArray(character_table, s, p) Irrep representation dot products. .. py:function:: symDecomposition(character_table, p) Decompose basis vector to irreps :param character_table: :type character_table: libmsym character table. :param p: Vecotor for analysis. Must contain len(character_table.symmetry_species) elements. :type p: np.array .. py:function:: diretProductFromList(PG='Cs', terms=[]) Compute direct products from a list of irreps/species with [libmsym](https://github.com/mcodev31/libmsym). Developed from https://github.com/mcodev31/libmsym/issues/29. :param PG: Supported point groups from libmsym: Ci, Cs, Cnv, Dn, Dnh, Dnd, Td, O, Oh, I and Ih :type PG: point group string. :param terms: List of species to use. E.g. symList = ['A1g','A1u','B1u', 'B1u'] defines resultant as direct product of these terms. :type terms: list :returns: * **list** (*resultant as list of specices.*) * **dict** (*contains various other forms of the output (as labelled).*) .. rubric:: Examples >>> dDict, _ = diretProductFromList(PG = 'D2h', terms = ['A1g','A1u','B1u', 'B1u']) >>> dDict {'A1g': 0, 'B1g': 0, 'A1u': 1, 'B1u': 0, 'B3g': 0, 'B3u': 0, 'B2g': 0, 'B2u': 0} .. py:function:: directProductTable(PG='Cs') Generate direct product tables with [libmsym](https://github.com/mcodev31/libmsym). Developed from https://github.com/mcodev31/libmsym/issues/29 :param PG: Supported point groups from libmsym: Ci, Cs, Cnv, Dn, Dnh, Dnd, Td, O, Oh, I and Ih :type PG: point group string. :returns: * **pd.DataFrame** (*direct product table.*) * **dict** (*contains various other forms of the output (as labelled).*)