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:
- n
int
, default: 1 Principal quantum number. Must be a positive integer. This is often referred to as the “energy level” or “shell”.
- l
int
, 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.- m
int
, default: 0 Magnetic quantum number. Must be an integer ranging from
-l
tol
(inclusive). This is the orientation of the angular momentum in space.- zoom_fac
float
, default: 1.0 Zoom factor for the electron cloud. Increase this value to focus on the center of the electron cloud.
- n
- 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
, andm=-2
.>>> from pyvista import examples >>> grid = examples.load_hydrogen_orbital(3, 2, -2) >>> grid.plot(volume=True, opacity=[1, 0, 1], cmap='magma')
See Plot Atomic Orbitals for additional examples using this function.
See also
- Hydrogen Orbital Dataset
See this dataset in the Dataset Gallery for more info.