exatomic.core.basis module

Basis Set Representations

This module provides classes that support representations of various basis sets. There are a handful of basis sets in computational chemistry, the most common of which are Gaussian type functions, Slater type functions, and plane waves. The classes provided by this module support not only storage of basis set data, but also analytical and discrete manipulations of the basis set.

See also

For symbolic and discrete manipulations see basis.

class exatomic.core.basis.BasisSet(*args, **kwargs)[source]

Bases: DataFrame

Stores information about a basis set. Common basis set types in use for electronic structure calculations usually consist of Gaussians or Slater Type Orbitals (STOs). Both types usually employ atom-centered basis functions, where each basis function resides on a given atom with coordinates \(\left(A_{x}, A_{y}, A_{z}\right)\). For Gaussian basis sets, the functional form of \(f\left(x, y, z\right)\) is:

\[\begin{split}r^{2} = \left(x - A_{x}\right)^{2} + \left(x - A_{y}\right)^{2} + \left(z - A_{z}\right)^{2} \\ f\left(x, y, z\right) = \left(x - A_{x}\right)^{l}\left(x - A_{y}\right)^{m}\left(z - A_{z}\right)^{n}e^{-\alpha r^{2}}\end{split}\]

where \(l\), \(m\), and \(n\) are not quantum numbers but positive integers (including zero) whose sum defines the orbital angular momentum of each function and \(alpha\) governs the exponential decay of the given function. Gaussian basis functions are usually constructed from multiple primitive Gaussians, with fixed contraction coefficients. Therefore, a basis function consists of the sum of one or more primitive functions:

\[g_{i}\left(x, y, z\right) = \sum_{j=1}^{N_{i}}c_{ij}f_{ij}\left(x, y, z\right)\]

Alternatively, STOs are usually not constructed from linear combinations of multiple primitives, and differ from Gaussian type functions in that they do not contain an exponent in the \(r\) term of the exponential decay. These functions have 2 main benefits; an adequate description of the cusp in the density at the nucleus, and the appropriate long-range decay behavior.

Column

Type

Description

alpha

float

exponent

shell

int

group of primitives

set

int/cat

unique basis set identifier

d

float

contraction coefficient

L

int

orbital angular momentum

property lmax
shells(program='', spherical=True, gaussian=True)[source]

Generate a multi-index series of Shell in the basis set, indexed by set and L.

Parameters:
  • program (str) – which code the basis set comes from

  • spherical (bool) – expand in ml or cartesian powers

  • gaussian (bool) – exponential dependence of basis functions

Returns:

srs (pd.Series) – multi-indexed by set and L

spherical_by_shell(program, spherical=True)[source]

Allows for some flexibility in treating shells either as cartesian functions or spherical functions (different normalizations).

Parameters:

program (str) – which code the basis set comes from

functions_by_shell()[source]

Return a series of n functions per (set, L). This does not include degenerate functions.

primitives_by_shell()[source]

Return a series of n primitives per (set, L). This does not include degenerate primitives.

functions(spherical)[source]

Return a series of n functions per (set, L). This does include degenerate functions.

primitives(spherical)[source]

Return a series of n primitives per (set, L). This does include degenerate primitives.

exatomic.core.basis.deduplicate_basis_sets(sets, sp=False)[source]

Deduplicate identical basis sets on different centers.

Parameters:
  • sets (pd.DataFrame) – non-unique basis sets

  • sp (bool) – Whether or not to call _expand_sp (gaussian program only)

Returns:

tup (tuple) – deduplicated basis sets and basis set map for atom table

class exatomic.core.basis.BasisSetOrder(*args, **kwargs)[source]

Bases: DataFrame

BasisSetOrder uniquely determines the basis function ordering scheme for a given Universe. This table is provided to make transparent the characteristic ordering scheme of various quantum codes. Either (L, ml) or (l, m, n) must be provided to have access to orbital visualization functionality.

Column

Type

Description

center

int

atomic center

L

int

orbital angular momentum

shell

int

group of primitives

ml

int

magnetic quantum number

l

int

power in x

m

int

power in y

n

int

power in z

r

int

power in r (optional - for STOs)

prefac

float

prefactor (optional - for STOs)

class exatomic.core.basis.Overlap(*args, **kwargs)[source]

Bases: DataFrame

Overlap enumerates the overlap matrix elements between basis functions in a contracted basis set. Currently nothing disambiguates between the primitive overlap matrix and the contracted overlap matrix. As it is square symmetric, only n_basis_functions * (n_basis_functions + 1) / 2 rows are stored.

See Gramian matrix for more on the general properties of the overlap matrix.

Column

Type

Description

frame

int/cat

non-unique integer

chi0

int

first basis function

chi1

int

second basis function

coef

float

overlap matrix element

square(frame=0, column='coef', mocoefs=None, irrep=None)[source]

Return a ‘square’ matrix DataFrame of the Overlap.

Parameters:
  • column (str) – column of coefficients to reshape

  • mocoefs (str) – alias for column

  • frame (int) – default 0

  • irrep (int) – irreducible representation if symmetrized

classmethod from_column(source)[source]

Create an Overlap from a file with just the array of coefficients or an array of the values directly.

classmethod from_square(df)[source]