Schrödinger Class - GaryZ700/CatLab_CompChem GitHub Wiki

Schrödinger Class

Overview

The Schrödinger class is implemented in the schrodinger.py file, and the class is named schrod. This class takes in the Hamiltonian operator, along with the basis set in order to calculate the wavefunctions of the system.

Import

from schrodinger import schrod Or from schrodinger import *

Methods

  • Instantiation: schrodInstance = schrod(arg1, basis, pes)
    • arg1: Hamiltonian Operator Object (Optional)
    • basis: Basis Set Object (Optional)
    • PES: Potential Energy Surface Object (Optional)
    • Returns a new instance of the schrod class.
    • All the parameters for the constructor are optional since not including them will result in an empty schrod object being created. Then, to compute the solution, the solve method can be called with the Hamiltonian and basis set as arguments. If the Hamiltonian and basis set are passed into the constructor, then the solution is computed immediately. In case of either computation through the constructor or the solve method, the potential energy surface argument is optional, if provided the graph of the wavefunction solutions will be imposed over the potential energy surface.

  • schrodInstance.solve(H, basis, pes)
    • Parameters have same meaning as in schrod instantiation, see above.
    • Has a void return.
    • The solve method is used to run a numerical linear algebra procedure on the Hamiltonian and basis set to produce the eigen values and vectors that then make up the wavefunctions of the system.

  • schrodInstance.getWaveFunctions()
    • Returns a list of wavefunctions that are the solution to the system passed into the schrod class. Will return an empty list if the schrod object as not solved any system.

Public Variables

  • schrodInstance.eigenValues: A list of eigen values that satisfy the solution generated by the schrod class. Will be None if a solution was not generated.
  • schrodInstance.eigenVectors: A list of eigen vectors that satisy the solution generated by the schrod classs. Will be None if a solution was not gnerated.
  • schrodInstance.basis: A basis set object. Will be none if the schrod object does not have a basis set.
  • schrodInstance.maxWaveFunctions: An integer representing the maximum number of wavefunctions that should be graphed at once. All wavefunction data still exists in the object, but only the first to the max wavefunction will be graphed for performance reasons.

Parent Classes

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