forte2.system.basis_utils ========================= .. py:module:: forte2.system.basis_utils Module Contents --------------- .. py:data:: SPH_LABELS :value: [['s'], ['py', 'pz', 'px'], ['dxy', 'dyz', 'dz2', 'dxz', 'dx2-y2'], ['fy(3x2-y2)', 'fxyz',... The labels for spherical harmonics up to f orbitals. We follow the `Libint2 convention `_. .. !! processed by numpydoc !! .. py:data:: AM_LABELS :value: ['s', 'p', 'd', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n'] .. py:data:: MAX_L :value: 11 .. py:function:: ml_from_shell_index_cca(l, idx) Map Libint Standard/CCA shell index (0..2*l) to signed magnetic quantum number (m_l) value. CCA standard is such that Y_{lm}s are listed from Y_{l,-l}, ... Y_{l,0}, ... Y_{l,l}. Thus, the 0-based index position is related to the m quantum number via index - l. :Parameters: **l: int** Angular momentum quantum number. **idx: int** Index of the shell within the angular momentum type. :Returns: int: Magnetic quantum number m_l. .. !! processed by numpydoc !! .. py:function:: get_shell_label(l, idx) Get the label for a shell based on its angular momentum quantum number (l) and index (idx). :Parameters: **l** : int Angular momentum quantum number. **idx** : int Index of the shell within the angular momentum type. :Returns: str The label for the shell. .. !! processed by numpydoc !! .. py:function:: get_spinor_label(l, jdouble, mjdouble) Get the label for a shell based on its angular momentum quantum number (l), total angular momentum (jdouble/2), and magnetic quantum number (mjdouble/2). :Parameters: **l** : int Angular momentum quantum number. **jdouble** : int Total angular momentum quantum number (2*j). **mjdouble** : int Magnetic quantum number (2*mj). :Returns: str The label for the shell. .. !! processed by numpydoc !! .. py:function:: shell_label_to_lm(shell_label) Convert a shell label to its angular momentum quantum number (l) and index (m). :Parameters: **shell_label** : str The label of the shell, e.g., "s", "p", "dx2-y2", "h(9)" :Returns: list[tuple] A list of a single tuple containing the angular momentum quantum number (l) and the index (m), if both l and m can be determined. If only l can be determined, returns a list of tuples of all possible (l, m) pairs. .. !! processed by numpydoc !! .. py:class:: BasisInfo A class to hold information about the basis set of a system. :Parameters: **system** : System The system for which the basis set information is to be generated. **basis** : Basis The basis set. :Attributes: **basis_labels** : list[_AOLabel] `_AOLabel` is a data structure with the following attributes: - iatom: int, the index of the atom in the system. - Z: int, the atomic number of the atom. - Zidx: int, the index of the atom in the system (1-based). - n: int, the principal quantum number for the shell. - l: int, the angular momentum quantum number. - ml: int, the magnetic quantum number m_l. - m: int, the index of the basis function within the shell. **basis_labels_spinor** : list[_SpinorAOLabel] `_SpinorAOLabel` is a data structure with the following attributes: - iatom: int, the index of the atom in the system. - Z: int, the atomic number of the atom. - Zidx: int, the index of the atom in the system (1-based). - n: int, the principal quantum number for the shell. - l: int, the angular momentum quantum number. - jdouble: int, the total angular momentum quantum number (2*j). - mjdouble: int, the magnetic quantum number (2*m_j). **atom_to_aos** : dict[int : dict[int : list[int]]] A dict of dict where e.g., ``atom_to_aos[6][2]`` gives a list of absolute indices of all AOs on C2. .. !! processed by numpydoc !! .. py:attribute:: system :type: forte2.system.System .. py:attribute:: basis :type: forte2.Basis .. py:method:: print_basis_labels(spinor=False) Pretty print the basis labels. .. !! processed by numpydoc !! .. py:method:: print_ao_composition(coeff, idx, nprint=5, thres=0.001, spinorbital=False) .. py:method:: print_spinor_composition(spinor_coeff, idx, nprint=5, thres=0.001)