Central Variables

Note

There have recently been major changes to the code involved in this section. All old functionality has been preserved as far as possible but there are some major new features which are layed-out below.

In ORBKIT, all central variables are extracted from quantum chemistry outputs (cf. orbkit.read) and organized within the class orbkit.qcinfo.QCinfo. The corresponding command reads:

from orbkit import read
qc = read.main_read('h2o.md')

This class stores all the information required for subsequent computations and is organized as follows:

Member Type Shape/Members
qc.geo_info numpy.ndarray (dtype= str) (Natoms, 3)
qc.geo_spec numpy.ndarray (dtype= str) (Natoms, 3)
qc.geo_info:
  • Contains information about the atoms and is only required for the creation of the output file.
  • The three columns correspond to
    1. Atom symbol
    2. Atom number (according to the input file)
    3. Nuclear charge (if present in the input file)
qc.geo_spec:
  • Contains the atom positions in units of Bohr radii.
  • The three columns correspond to the x-, y-, and z-coordinates.

New API

Though with the exception of qc.ao_spherical, “old-style” APIs are still supported, the suggested way to access AO and MO data is now to use the new AOClass and MOClass classes which provide methods to directly obtain the data as numpy arrays. See the module documentation for more details.

orbkit.orbitals.AOClass(seq=[], restart=None)[source]

AO base class which contains all information on atomic orbitals. Two types of dataformats are available:

  1. Numpy-style data:

    cont2atoms : numpy.ndarray, dtype=numpy.intc, shape = (NAO)

    Transformation matrix between contracted GTO’s and atoms.

    _assign_prim_to_cont : numpy.ndarray, dtype=numpy.intc, shape = (NPAO)

    Transformation matrix between contracted GTO’s and primitive GTO’s.

    pg_expcont : numpy.ndarray, dtype=float64, shape = (NPAO, 2)
    Information on primitive GTO’s:

    1st element exponent and 2nd element contraction

    contspher : numpy.ndarray, dtype=numpy.intc, shape = (NAO, 2)

    Same information as ao_spherical as numpy.ndarray

    lxlylz : numpy.ndarray, dtype=numpy.intc, shape = (NAO, 3)

    Contains the expontents lx, ly, lz for the Cartesian Gaussians.

  2. Lists of dictionaries / list of tuples:

Member of dict Content ——————– ————————————- ‘atom’ Index of atom ‘pnum’ Number of primitives ‘type’ Type of AO ‘coeffs’ AO coefficients ‘lxlylz’ Exponents of Cartesian Gaussians ‘lm’ (if spherical) Quantum number of Spherical Gaussians

See Central Variables in the manual for details.

orbkit.orbitals.MOClass(seq=[], restart=None)[source]

MO base class which contains all information on atomic orbitals. Two types of dataformats are available:

  1. Numpy-style data:

    coeffs : numpy.ndarray, dtype=float64, shape = (NMO, NAO)

    Molecular orbital coefficients.

    occ : numpy.ndarray, dtype=float64, shape = (NMO)

    Occupation numbers for molecular orbitals.

    eig : numpy.ndarray, dtype=float64, shape = (NMO)

    Eigenvalues for molecular orbitals.

    sym : numpy.ndarray, dtype=str, shape = (NMO)

    MOLPRO-like symmetry label of molecular orbitals.

  2. Lists of dictionaries:

mo_spec

See Central Variables in the manual for details.

Old API

Danger

qc.ao_spherical is no longer supported - rather than in a central variable this information is now saved locally for each AO i.e. for the n’th AO, its ao_spherical data to can be accsessed as: qc.ao_spec[n]['spherical']. If you are in desperate need of the old format use: qc.ao_spec.get_old_ao_spherical(). Note though that this is only a compatibility function and might well be depreciated in the future.

Member Type Shape/Members
     
qc.ao_spec list of dict “pnum”, “atom”, “type”, “coeffs”, (“exp_list”)
qc.mo_spec list of dict “energy”, “occ_num”, “sym”, “coeffs”
qc.ao_spec:
  • Contains all information about the atomic orbitals
  • The number of dictionaries corresponds to the number of contracted Gaussians
  • Members of the dictionaries:
    • “atom”
      • Atom number (according to the input file, i.e., starting from 1) (int)
    • “coeffs”
      • 1st element exponent and 2nd element contraction coefficients of the basis functions
      • numpy.ndarray (dtype= float) with the shape (Nprimitives, 2)
    • “pnum”
      • Number of number of primitives (int)
    • “exp_list” (optional)
      • Exponents \((l_x,l_y,l_z)\) of the basis functions
      • Only present if the order of the exponents deviate from the standard molden order
      • list of tuple, i.e., [(l_x1,l_y1,l_z1), (l_x2,l_y2,l_z2), ...]
qc.mo_spec:
  • Contains all information about the molecular orbitals.
  • The number of dictionaries corresponds to number of molecular orbitals
  • Members of the dictionaries:
    • “coeffs”
      • Molecular orbital coefficients
      • numpy.ndarray (dtype= float) with the shape (NAO, 1)
    • “energy”
      • Energy of molecular orbital (float)
    • “occ_num”
      • Occupation of molecular orbital (float)
    • “sym”
      • MOLPRO-like symmetry label of molecular orbital (str), e.g., “12.1” or “12.A1”

Besides those central variables, the orbkit.qcinfo.QCinfo class possess additional members which are not of importance for the computations done by ORBKIT.