pyvista.examples.examples.load_hydrogen_orbital#

load_hydrogen_orbital(n=1, l=0, m=0, zoom_fac=1.0)[source]#

Load the hydrogen wave function for a pyvista.ImageData.

This is the solution to the Schrödinger equation for hydrogen evaluated in three-dimensional Cartesian space.

Inspired by Hydrogen Wave Function.

Parameters:
nint, default: 1

Principal quantum number. Must be a positive integer. This is often referred to as the “energy level” or “shell”.

lint, default: 0

Azimuthal quantum number. Must be a non-negative integer strictly smaller than n. By convention this value is represented by the letters s, p, d, f, etc.

mint, default: 0

Magnetic quantum number. Must be an integer ranging from -l to l (inclusive). This is the orientation of the angular momentum in space.

zoom_facfloat, default: 1.0

Zoom factor for the electron cloud. Increase this value to focus on the center of the electron cloud.

Returns:
pyvista.ImageData

ImageData containing two point_data arrays:

  • 'real_wf' - Real part of the wave function.

  • 'wf' - Complex wave function.

Notes

This example requires sympy.

Examples

Plot the 3dxy orbital of a hydrogen atom. This corresponds to the quantum numbers n=3, l=2, and m=-2.

>>> from pyvista import examples
>>> grid = examples.load_hydrogen_orbital(3, 2, -2)
>>> grid.plot(volume=True, opacity=[1, 0, 1], cmap='magma')
../../../_images/pyvista-examples-examples-load_hydrogen_orbital-1_00_00.png

See Plot Atomic Orbitals for additional examples using this function.