qstack.reorder¶
Functions for reordering atomic orbitals between different conventions.
- Provides:
pyscf2gpr_l1_order: indices to reorder l=1 orbitals from PySCF to GPR.
- qstack.reorder.get_mrange(l)[source]¶
Get the m quantum number range for a given angular momentum l.
For l=1, returns pyscf order: x,y,z which is (1,-1,0). For other l, returns the standard range from -l to +l.
- Parameters:
l (int) – Angular momentum quantum number.
- Returns:
Magnetic quantum numbers for the given l.
- Return type:
tuple or range
- qstack.reorder.reorder_ao(mol, vector, src='pyscf', dest='gpr')[source]¶
Reorder the atomic orbitals from one convention to another.
For example, src=pyscf dest=gpr reorders p-orbitals from +1,-1,0 (pyscf convention) to -1,0,+1 (SA-GPR convention).
- Parameters:
mol (pyscf.gto.Mole) – pyscf Mole object.
vector (numpy.ndarray) – Vector (nao,) or matrix (mol.nao,mol.nao) to reorder.
src (str) – Current convention. Defaults to ‘pyscf’.
dest (str) – Convention to convert to (available: ‘pyscf’, ‘gpr’, ‘orca’). Defaults to ‘gpr’.
- Returns:
Reordered vector or matrix.
- Return type:
numpy.ndarray
- Raises:
NotImplementedError – If the specified convention is not implemented.
ValueError – If vector dimension is not 1 or 2.