forte2.system.basis_utils#

Module Contents#

forte2.system.basis_utils.SPH_LABELS = [['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.

forte2.system.basis_utils.AM_LABELS = ['s', 'p', 'd', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n']#
forte2.system.basis_utils.MAX_L = 11#
forte2.system.basis_utils.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.

forte2.system.basis_utils.get_shell_label(l, idx)#

Get the label for a shell based on its angular momentum quantum number (l) and index (idx).

Parameters:
lint

Angular momentum quantum number.

idxint

Index of the shell within the angular momentum type.

Returns:
str

The label for the shell.

forte2.system.basis_utils.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:
lint

Angular momentum quantum number.

jdoubleint

Total angular momentum quantum number (2*j).

mjdoubleint

Magnetic quantum number (2*mj).

Returns:
str

The label for the shell.

forte2.system.basis_utils.shell_label_to_lm(shell_label)#

Convert a shell label to its angular momentum quantum number (l) and index (m).

Parameters:
shell_labelstr

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.

class forte2.system.basis_utils.BasisInfo#

A class to hold information about the basis set of a system.

Parameters:
systemSystem

The system for which the basis set information is to be generated.

basisBasis

The basis set.

Attributes:
basis_labelslist[_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_spinorlist[_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_aosdict[intdict[intlist[int]]]

A dict of dict where e.g., atom_to_aos[6][2] gives a list of absolute indices of all AOs on C2.

system: forte2.system.System#
basis: forte2.Basis#
print_basis_labels(spinor=False)#

Pretty print the basis labels.

print_ao_composition(coeff, idx, nprint=5, thres=0.001, spinorbital=False)#
print_spinor_composition(spinor_coeff, idx, nprint=5, thres=0.001)#