atomdb.promolecule module

AtomDB promolecule submodule.

class atomdb.promolecule.Promolecule

Bases: object

Promolecule class.

A promolecule is an approximation of a molecule constructed from a linear combination of atomic and/or ionic species. Properties of this promolecule can be computed from those of the atomic and/or ionic species, depending on whether the property is an extensive one or an intensive one.

For an extensive property, the formula is a linear combination:

\[\text{prop.}_{\text{mol;extensive}} = \sum_{A=1}^{N_{\text{atoms}}} c_A \text{prop.}_A\]

For an intensive property, the formula is a mean:

\[\text{prop.}_{\text{mol;intensive}} = {\left\langle \left\{ \text{prop.}_A \right\}_{A=1}^{N_{\text{atoms}}} \right\rangle}_p\]

where the parameter p defines the type of mean used (1 = linear, 2 = geometric, etc.).

atoms

Species instances out of which the promolecule is composed.

Type

list of Species

coords

Coordinates of each species component of the promolecule.

Type

np.ndarray((N, 3), dtype=float)

coeffs

Coefficients of each species component of the promolecule.

Type

np.ndarray((N,), dtype=float)

density(points, spin='ab', log=False)

Compute the electron density of the promolecule at the desired points.

ked(points, spin='ab', log=False)

Compute the kinetic energy density of the promolecule at the desired points.

energy()

Compute the energy of the promolecule.

mass()

Compute the mass of the promolecule.

ip(p=1)

Compute the ionization potential of the promolecule.

mu(p=1)

Compute the chemical potential of the promolecule.

eta(p=1)

Compute the chemical hardness of the promolecule.

Initialize a Promolecule instance.

density(points, spin='t', log=False)

Compute the electron density of the promolecule at the desired points.

Parameters
  • points (np.ndarray((N, 3), dtype=float)) – Points at which to compute the density.

  • spin (('t' | 'a' | 'b' | 'm'), default='t') – Type of density to compute; either total, alpha-spin, beta-spin, or magnetization density.

  • log (bool, default=False) – Whether to compute the log of the density instead of the density. May be slightly more accurate.

ked(points, spin='t', log=False)

Compute the kinetic energy density of the promolecule at the desired points.

points: np.ndarray((N, 3), dtype=float)

Points at which to compute the density.

spin: (‘t’ | ‘a’ | ‘b’ | ‘m’), default=’t’

Type of density to compute; either total, alpha-spin, beta-spin, or magnetization density.

log: bool, default=False

Whether to compute the log of the density instead of the density. May be slightly more accurate.

nelec()

Compute the electron number of the promolecule.

charge()

Compute the charge of the promolecule.

energy()

Compute the energy of the promolecule.

mass()

Compute the mass of the promolecule.

nspin(p=1)

Compute the spin number of the promolecule.

mult(p=1)

Compute the multiplicity of the promolecule.

ip(p=1)

Compute the ionization potential of the promolecule.

Parameters

p (int, default=1) – Value of p for the p-mean computation.

mu(p=1)

Compute the chemical potential of the promolecule.

Parameters

p (int, default=1) – Value of p for the p-mean computation.

eta(p=1)

Compute the chemical hardness of the promolecule.

Parameters

p (int, default=1) – Value of p for the p-mean computation.

gradient(points, spin='t', log=False)

Compute the electron density gradient of the promolecule at the desired points.

Promolecular gradient: .. math:

\nabla \rho_{\text{mol}}^{(0)} (\mathbf{R})
    = \sum_{A=1}^{N_{\text{atoms}}}
        c_A \nabla \rho_A^{(0)}(\mathbf{R})

where

\(N_{\text{atoms}}\) is the number of atoms in the molecule,

\(c_A\) are the coefficients of the species,

\(R\) are points in 3D cartesian coordinates,

\(\nabla \rho_A^{(0)}(\mathbf{R})\) is the gradient of the species.

Parameters
  • points (np.ndarray((N, 3), dtype=float)) – Points at which to compute the density.

  • spin (('t' | 'a' | 'b' | 'm'), default='t') – Type of density to compute; either total, alpha-spin, beta-spin, or magnetization density.

  • log (bool, default=False) – Whether to compute the log of the density instead of the density. May be slightly more accurate.

Returns

gradient

Return type

np.ndarray((N, 3), dtype=float)

hessian(points, spin='t', log=False)

Compute the promolecule’s electron density Hessian at the desired points.

Parameters
  • points (np.ndarray((N, 3), dtype=float)) – Points at which to compute the density.

  • spin (('t' | 'a' | 'b' | 'm'), default='t') – Type of density to compute; either total, alpha-spin, beta-spin, or magnetization density.

  • log (bool, default=False) – Whether to compute the log of the density instead of the density. May be slightly more accurate.

laplacian(points, spin='t', log=False)

Compute the promolecule’s electron density Laplacian at the desired points.

Parameters
  • points (np.ndarray((N, 3), dtype=float)) – Points at which to compute the density.

  • spin (('t' | 'a' | 'b' | 'm'), default='t') – Type of density to compute; either total, alpha-spin, beta-spin, or magnetization density.

  • log (bool, default=False) – Whether to compute the log of the density instead of the density. May be slightly more accurate.

atomdb.promolecule.make_promolecule(atnums, coords, charges=None, mults=None, units=None, dataset='slater', datapath='/home/runner/work/AtomDB/AtomDB/atomdb/datasets', remotepath='https://raw.githubusercontent.com/theochem/AtomDBdata/main/')

Construct a Promolecule instance from a set of atoms and their coordinates, charges, and multiplicities.

Parameters
  • atnums (list of (str|int)) – List of element number for each atom.

  • coords (list of np.ndarray((3,), dtype=float)) – List of coordinates for each atom.

  • charges (list of (int | float), default=[0, ..., 0]) – List of charges.

  • mults (list of (int), default=[1, ..., 1]) – List of multiplicities for each atom.

  • units (('bohr' | 'angstrom')) – Units of coords values. Default is Bohr.

  • dataset (str, default=DEFAULT_DATASET) – Data set from which to load atomic species.

  • datapath (str, default=DEFAULT_DATAPATH) – System path where the desired data set is located.

  • remotepath (str, default=DEFAULT_REMOTE) – Remote path where the desired data set is located.