This repository contains functions to calculate and visualize the probability density of hydrogen atom orbitals in both 2D and 3D.
The probability density n
and l
, while the angular part depends on the azimuthal and magnetic quantum numbers l
and m
.
The radial part of the wave function is given by:
where L
are the generalized Laguerre polynomials and
The angular part of the wave function is given by the spherical harmonics:
where
The probability density
Below are some sample visualizations generated by the functions in this repository.
Examples of a 2D probability density plot for hydrogen atom orbital.
Examples of a 3D probability density plot for hydrogen atom orbital.
Calculates the 2D probability density of a hydrogen atom orbital.
- n (int): Principal quantum number, defines the energy level.
- l (int): Azimuthal quantum number, defines the shape of the orbital.
- m (int): Magnetic quantum number, defines the orientation of the orbital.
-
$a_0$ (float): Bohr radius, default is 1.0. - grid_size (int): Resolution of the grid for calculations.
- X, Y, density: 2D arrays representing the X, Y coordinates and the corresponding probability density.
X, Y, density = calculate_hydrogen_density_2d(n, l, m, a0, grid_size)
Calculates the 3D probability density of a hydrogen atom orbital.
- n (int): Principal quantum number, defines the energy level.
- l (int): Azimuthal quantum number, defines the shape of the orbital.
- m (int): Magnetic quantum number, defines the orientation of the orbital.
-
$a_0$ (float): Bohr radius, default is 1.0. - grid_size (int): Resolution of the grid for calculations.
- X, Y, Z, density: 3D arrays representing the X, Y, Z coordinates and the corresponding probability density.
X, Y, Z, density = calculate_hydrogen_density_3d(n, l, m, a0, grid_size)
- Numpy
- Scipy (for special functions like
sph_harm
)
This project is open-source and available under the MIT License.