Basis Function Class - GaryZ700/CatLab_CompChem GitHub Wiki

Basis Function

Overview

The basis function class is implemented in the waveFunction.py file, and the class is named basis function. This abstract class provides an interface for programmers to define their own basis functions that integrate cleanly into the package's framework. The abstract class provides a init method that is provided with diatomicConstants, and the wavenumber as default parameters.

Import

from basisFunction import basisFunction Or from basisFunction import *

Methods

  • Instantiation: basisFunction = concreteBasisFunction(diatomicConstants, n)
    • diatomicConstants: Diatomic Constants Object
    • n: Wavefunction Energy Level Number
    • Returns a new instance of the concrete basis function class.
    • Is an abstract method and must be overridden in all child classes.
    • Constructor for the a basis function object.

  • basisFunction.value(r)
    • r: Refers to the bond distance of the diatomic in angstroms for which the basis function value should be returned.
    • Returns the value of the basis function in units of inverse square root of angstrom.
    • Is an abstract method and must be overridden by the child class.

  • basisFunction.squaredValue(r)
    • r: Refers to the bond distance of the diatomic in angstroms for which the squared basis function value should be returned.
    • Returns the squared value of the wave function in units of inverse angstrom.

  • basisFunction.__call__(r)
    • r Refers to the bond distance of the diatomic in angstroms for which the basis function value should be returned.
    • Returns the value of the basis function in units of inverse square root of angstrom.
    • Allows the wavefunction object to be directly evaluated. As an example: concreteBasisFunction(2.2) is equivalent to concreteBasisFunction.value(2.2).

Public Variables

  • concreteBasisFunction.functionName: A string of the function such as "Guassian Basis Function". Should be set in the __init__ method.

Parent Classes

  • Graphable
    • concreteWaveFunction.graph() will generate a graph of this object.
⚠️ **GitHub.com Fallback** ⚠️