A small collection of undergraduate atomic-physics computations written as Python notebooks.
This repository gathers computational atomic-physics exercises done as part of undergraduate coursework and self-study. Each project lives in its own directory with a notebook and its dependencies. The collection currently centers on the Bohr model of the hydrogen atom.
An interactive Bohr-model and hydrogen-spectrum visualizer. The notebook computes the standard Bohr quantities from first principles using SI fundamental constants, then lets you explore transitions and spectral series with ipywidgets sliders and a dropdown.
Notebook: bohr_model/notebooks/bohr_model.ipynb
- Computes the Bohr radius (a0), recovering the expected value of about 5.29e-11 m.
- Computes the hydrogen ground-state energy (E1), recovering about -13.606 eV.
- Computes the Rydberg constant (R_inf) from E1, recovering about 1.097e7 m^-1.
- Computes the orbital radius r_n = n^2 * a0 (in nm) and the energy level E_n = E1 / n^2 (in eV) for a given principal quantum number n.
- Computes emission transition wavelengths (in nm) and wavenumbers (in cm^-1) for a transition n_initial to n_final.
- Draws an energy-level diagram with labeled levels and an arrow for the selected transition.
- Draws an emission-spectrum plot with vertical lines color-coded by spectral region (UV, visible, IR) and grouped by series.
- Provides interactive controls: sliders for n_initial and n_final for a specific transition, and a dropdown to display the Lyman (n_f=1), Balmer (n_f=2), or Paschen (n_f=3) series.
Click the "Open In Colab" badge above, then choose Runtime > Run all. The interactive sliders and dropdown appear in the last cell.
git clone https://github.com/iteba15/atomicPhysics_undergraduate_projects.git
cd atomicPhysics_undergraduate_projects/bohr_model
pip install -r requirements.txt
jupyter notebook notebooks/bohr_model.ipynbThe notebook imports numpy, matplotlib, ipywidgets, and IPython.display. The interactive widgets need a Jupyter environment (classic Notebook, JupyterLab, or Colab); the calculations and static plots run anywhere those libraries are installed.
- Python 3
- NumPy for numerical work and physical constants
- Matplotlib for the energy-level and spectrum plots
- ipywidgets and IPython.display for the interactive controls
Undergraduate coursework and learning projects. The Bohr-model notebook is complete and runnable. More atomic-physics topics may be added to this repository over time.
Allan Kiplagat Iteba (GitHub @iteba15), BSc Astrophysics & Space Science, University of Nairobi.
- LinkedIn: (link to be added)
- ResearchGate: (link to be added)