Skip to content

qsym2

Attributes

PyPureSpinorOrder module-attribute

Python
PyPureSpinorOrder: TypeAlias = tuple[bool, bool] | tuple[list[int], bool]

PyShellOrder module-attribute

Python
PyShellOrder: TypeAlias = PyPureSpinorOrder | list[tuple[int, int, int]] | None

PyStructureConstraint module-attribute

Python
PyStructureConstraint: TypeAlias = PySpinConstraint | PySpinOrbitCoupled

Classes

ShellType

Bases: Enum

Python-exposed enumerated type indicating the shell type.

Attributes

Pure class-attribute instance-attribute
Python
Pure = 0

Variant for a pure shell.

Cartesian class-attribute instance-attribute
Python
Cartesian = 1

Variant for a Cartesian shell.

SpinorFermion class-attribute instance-attribute
Python
SpinorFermion = 2

Variant for a spinor shell corresponding to a fermion without any additional balance symmetries.

SpinorFermionKineticBalance class-attribute instance-attribute
Python
SpinorFermionKineticBalance = 3

Variant for a spinor shell corresponding to a fermion with the kinetic balance symmetry due to σp^\mathbf{\sigma} \cdot \hat{\mathbf{p}}.

SpinorAntifermion class-attribute instance-attribute
Python
SpinorAntifermion = 4

Variant for a spinor shell corresponding to an antifermion without any additional balance symmetries.

SpinorAntifermionKineticBalance class-attribute instance-attribute
Python
SpinorAntifermionKineticBalance = 5

Variant for a spinor shell describing an antifermion with the kinetic balance symmetry due to σp^\mathbf{\sigma} \cdot \hat{\mathbf{p}}.

PyBasisAngularOrder

Python
PyBasisAngularOrder(
    basis_atoms: Sequence[
        tuple[str, Sequence[tuple[int, ShellType, PyShellOrder]]]
    ],
)

Python-exposed structure to marshall basis angular order information between Python and Rust.

Parameters:

  • basis_atoms

    (Sequence[tuple[str, Sequence[tuple[int, ShellType, PyShellOrder]]]]) –

    A vector of tuples, each of which provides information for one basis atom in the form (element, basis_shells). Here:

    • element is a string giving the element symbol of the atom, and
    • basis_shells is a vector of tuples, each of which provides information for one basis shell on the atom in the form (angmom, shelltype, order). Here:
      • angmom is an integer specifying the angular momentum of the shell, the meaning of which depends on the shell type,
      • shelltype is an enumerated type with possible variants ShellType.Pure, ShellType.Cartesian, ShellType.Spinor, and ShellType.SpinorKineticBalance indicating the type of the shell, and
      • order specifies how the functions in the shell are ordered:
        • if shelltype is ShellType.Cartesian, order can be None for lexicographic order, or a list of tuples (lx, ly, lz) specifying a custom order for the Cartesian functions where lx, ly, and lz are the xx-, yy-, and zz-exponents, respectively;
        • if shelltype is ShellType.Pure, ShellType.SpinorFermion, SpinorFermionKineticBalance, ShellType.SpinorAntifermion, or ShellType.SpinorAntifermionKineticBalance, order is a tuple of two values: the first can be true for increasing-mm order, false for decreasing-mm order, or a list of mm values for custom order, and the second is a boolean indicating whether the spatial parts of the functions in the shell are even with respect to spatial inversion.

Functions

from_qchem_archive classmethod
Python
from_qchem_archive(filename: str) -> list[PyBasisAngularOrder]

Extracts basis angular order information from a Q-Chem HDF5 archive file.

A summary showing how the PyBasisAngularOrder objects map onto the Q-Chem calculations in the HDF5 archive file is also logged at the INFO level.

Parameters:

  • filename
    (str) –

    A path to a Q-Chem HDF5 archive file.

Returns:

  • list[PyBasisAngularOrder]

    A sequence of PyBasisAngularOrder objects, one for each Q-Chem calculation found in the HDF5 archive file.

PySpinConstraint

Bases: Enum

Python-exposed enumerated type to marshall basis spin constraint information between Rust and Python.

Attributes

Restricted class-attribute instance-attribute
Python
Restricted = 0

Variant for restricted spin constraint. Only two spin spaces are exposed.

Unrestricted class-attribute instance-attribute
Python
Unrestricted = 1

Variant for unrestricted spin constraint. Only two spin spaces arranged in decreasing-mm order (i.e. (α,β)(\alpha, \beta)) are exposed.

Generalised class-attribute instance-attribute
Python
Generalised = 2

Variant for generalised spin constraint. Only two spin spaces arranged in decreasing-mm order (i.e. (α,β)(\alpha, \beta)) are exposed.

PySpinOrbitCoupled

Bases: Enum

Python-exposed enumerated type to marshall basis spin--orbit-coupled layout in the coupled treatment of spin and spatial degrees of freedom between Rust and Python.

Attributes

JAdapted2C class-attribute instance-attribute
Python
JAdapted2C = 0

Variant for two-component jj-adapted basis functions.

JAdapted4C class-attribute instance-attribute
Python
JAdapted4C = 1

Variant for four-component jj-adapted basis functions.

PyBasisShellContraction

Python-exposed structure to marshall basis shell contraction information between Rust and Python.

Parameters:

  • basis_shell

    (tuple[int, ShellType, PyShellOrder]) –

    A tuple which provides information for one basis shell on the atom in the form (angmom, shelltype, order). Here:

    • angmom is an integer specifying the angular momentum of the shell, the meaning of which depends on the shell type,
    • shelltype is an enumerated type with possible variants ShellType.Pure, ShellType.Cartesian, ShellType.Spinor, and ShellType.SpinorKineticBalance indicating the type of the shell, and
    • order specifies how the functions in the shell are ordered:
      • if shelltype is ShellType.Cartesian, order can be None for lexicographic order, or a list of tuples (lx, ly, lz) specifying a custom order for the Cartesian functions where lx, ly, and lz are the xx-, yy-, and zz-exponents, respectively;
      • if shelltype is ShellType.Pure, ShellType.SpinorFermion, SpinorFermionKineticBalance, ShellType.SpinorAntifermion, or ShellType.SpinorAntifermionKineticBalance, order is a tuple of two values: the first can be true for increasing-mm order, false for decreasing-mm order, or a list of mm values for custom order, and the second is a boolean indicating whether
  • primitives

    (Sequence[tuple[float, float]]) –

    A list of tuples, each of which contains the exponent and the contraction coefficient of a Gaussian primitive in this shell.

  • cart_origin

    (tuple[float, float, float]) –

    A fixed-size list of length 3 containing the Cartesian coordinates of the origin of this shell.

  • k

    (tuple[float, float, float] | None) –

    An optional fixed-size list of length 3 containing the Cartesian components of the k\mathbf{k} vector of this shell.

Functions