Basis Set Class - GaryZ700/CatLab_CompChem GitHub Wiki

Basis Set

Overview

The Schrödinger class is implemented in the basisSet.py file, and the class is named basisSet. The class essentially acts as a container object for an individual basis function object. The class takes in a basis function class along with a size for the basis sets and creates the desired number of copies of the basis function to create the basis set of the desired size.

Import

from basisSet import basisSet Or from basisSet import *

Methods

  • Instantiation: basisSetInstance = basisSet(diatomicConstants, basisFunctionClass, size)
    • diatomicConstants: Diatomic Constants Object
    • basisFunctionClass: Basis Function Concrete Class Reference
    • size: Integer for the desired size of the basis set. (Optional, default value is 10)
    • Returns a new instance of the basisSet class.

  • basisSetInstance.value(n, r)
    • n Refers to the nth basis function in the basis set whose value is to be computed. n ranges between 0 and the size of the set - 1.
    • r: Refers to the bond distance in angstroms at which the nth basis function is to be evaluated.
    • Returns the value of the nth basis function at position r in units of inverse square root of angstrom.

  • basisSetInstance.getBasisSet()
    • Returns a list containing of the basis functions in the basisSet.

  • basisSetInstance.getBasisFunction(n)
    • n: Refers to the nth wavefunction in the basis set to return. Value ranges between 0 and the basis size - 1.
    • Returns a reference to the nth wavefunction in the basis set.
  • basisSetInstance.__iter__()
    • Allows a basis set object to be iterated over in a for loop. Ex: for basisFunction in basisSetInstance
    • The _iterator class definition and the __next__() method are used as support code for the iteration functionality.

  • basisSetInstance.__len__()
    • Allows the bulitin len function in Python to be used on a basis set object to get its size.

  • __getitem__(key)
    • key: Represents the nth wavefunction in the basis set to return. Ranges between 0 and the size of the basis set - 1.
    • Allows basis set object to be indexed akin to a list, retrieving the specified wavefunction from the basis set.

Public Variables

  • basisSetInstance.basisFunctionClass: Reference to the basis function class used to build the basis set.
  • basisSetInstance.size: Size of the basis function.
  • basisSetInstance.basisFunctions: List of the basis functions in the basis set.
  • basisSetInstance.diatomicConstants: Diatomic constants dictionary.

Parent Classes

  • None
⚠️ **GitHub.com Fallback** ⚠️