Basis Function Class - GaryZ700/CatLab_CompChem GitHub Wiki
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.
from basisFunction import basisFunction
Or
from basisFunction import *
- 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 toconcreteBasisFunction.value(2.2)
.
- concreteBasisFunction.functionName: A string of the function such as "Guassian Basis Function". Should be set in the
__init__
method.
- Graphable
- concreteWaveFunction.graph() will generate a graph of this object.