File Exchange

image thumbnail

Hydrogenic Wavefunction Visulization Tool

version (205 KB) by

Visualize hydrogenic wave-functions in 3D and watch animations of atomic state changes



View License

The code provides base functionality to calculate the wave-functions for hydrogen and visualise those wave-functions using iso-surfaces in 3D. This can be used to explore the spatial nature of the wave-functions.
In addition it is easy to calculate something approximating the wave-function of the atom whist undergoing a state transition (to make it easier to understand we assume the Rabi frequency is very slow). Then the wave-function of the atom can be visualised as a function of time whilst a transition is simulated. The transition GUI allows the user to program in any desired transition (even non-electric dipole transitions) and watch the evolution of the wave-function.

The animations clearly show why pi-transition emit linearly polarized light and sigma-transitions circular polarized light.

Developed in conjunction with Oxford Physics. Many thanks to Dr. David Lucas and Mr. Chris Ballance. The code in this submission was written by Chris Ballance whilst undertaking an internship at The MathWorks.

Comments and Ratings (4)

Mr Smart


Oren (view profile)

Hi, looking at your code again I noticed that in calculating psiNorm in line 168 in: "calculateHydrogenicWavefunction.m" you are missing a power of 3 over factorial(N+L), that is according to :introductory quantum mechanics" by Liboff, table 10.3


Oren (view profile)

Hi, thanks for this contribution.
I am also using Hydrogen eigenfunction \psi=Ylm(\theta,\phi)*Rnl(r) and encountered a problem which I detect in this tool as well, regarding the file: "calculateHydrogenicWavefunction.m". It appears that your wavefunctions are not orthonormal... for example the inner-product of the wavefunctions for (N,L,M)=(2,1,0) and (3,1,0) does not vanish.
If psi1 is the matrix for (2,1,0) and psi2 is for (3,1,0) then sum(sum(sum(psi1*conj(psi2)))) is -2.7754. I suspect it has something to do with the implementation of the radial functions.
Is this a numerical by product? How can this be avoided?

Thanks a lot!


Updated license


Updated file to include as an App for R2012b


Copyright updated.


Copyright notices added.

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video