Wavefunctions#

class Wavefunction(atom, basisStates, coefficients)[source]#

Calculates and plots electron wavefunctions.

For an example see wavefunction plotting example snippet.

Args:

atom: atom type considered (for example Rubidum87()) basisStates (array): array of states in fine basis that contribute

to the state whose wavefunction is requested. \([[n_1, \ell_1, j_1, m_{j1}], ...]\) For efficient calculation do not pass all the possible basis states, but just the once that have significant contribution to the reqested state.

coefficients (array): array [c1, …] of complex coefficents

\(c_i = \langle \psi_i |\psi\rangle\) corresponding to decomposition of required state \(|\psi\rangle\) on basis states \(|\psi_i \rangle\) .

Calculating#

getPsi(x, y, z)

Calculates list of \(\psi_{m_s} (x,y,z)\)

getRtimesPsi(x, y, z)

Calculates list of \(r \cdot \psi_{m_s} (x, y, z)\)

getRtimesPsiSpherical(theta, phi, r)

Calculates list of \(r \cdot \psi_{m_s} (\theta, \phi, r)\)

getRtimesPsiSquaredInPlane([plane, ...])

Calculates \(|r \cdot \psi|^2\) on a mesh in a given plane.

Visualising#

plot2D([plane, pointsPerAxis, axisLength, ...])

2D colour plot of \(|r \cdot \psi|^2\) wavefunction in a requested plane.

plot3D([plane, pointsPerAxis, axisLength, ...])

3D colour surface plot of \(|r \cdot \psi|^2\) wavefunction in a requested plane.