Skip to main content

Python package to calculate energy levels, orbital radii, and electronic transitions for the Bohr model of hydrogen and hydrogen-like atoms, with educational visualizations.

Project description

BohrAJJP

Description

BohrAJJP is an educational Python project that demonstrates the Bohr model for hydrogen‑like (hydrogenoid) atoms. The code provides three focused utilities: an energy-level calculator for a single electron, a transition calculator that returns ΔE, photon energy, frequency and wavelength, and a visualizer that draws energy levels and classical circular orbits and writes them to image files. The implementation is intentionally simple and readable so it can be used as a teaching aid or a base for further extensions.

Current state

The repository contains a working src/ package with three main modules that can each be executed as standalone scripts. energy.py offers an interactive menu for computing the energy of an electron in level n using the Bohr formula. transition.py computes initial and final level energies, the energy difference, the photon frequency and wavelength for a given transition. plot_orbits.py generates and saves two PNG images (energy_levels_plot.png and orbits_plot.png) with a simple attempt to open them in the system default image viewer; in headless environments the viewer call fails gracefully and the image files remain saved.

Basic input validation (positive integers for Z and n) and simple exception handling are implemented. Physical constants are included directly in the modules with sufficient precision for pedagogical purposes.

Objectives

The primary goal of this project is pedagogical: to show how the Bohr model predicts bound-state energies and spectral lines and to provide a visual intuition for how energy and orbital radius scale with principal quantum number n and nuclear charge Z.

Installation

A Python 3.8+ environment is recommended. Create and activate a virtual environment and install the plotting dependency:

python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate

The package has been uploaded to PiPy;: The instalation process is as simple as this:

pip install BohrAJJP

Usage and examples

Pending...

Authors: Angie Lorena Pineda, Juan Sebastián Acuña, Jose Luis Zamora, Juan Pablo Patiño.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bohr_library-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bohr_library-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file bohr_library-0.1.0.tar.gz.

File metadata

  • Download URL: bohr_library-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for bohr_library-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4da5a942c9b9ffe4e541da2127ccf13ec33e6378466f514f342e3a5f73a01afe
MD5 73545acf86db719071feb6abcfedb566
BLAKE2b-256 ae28951599ff1c39ae333d831aca7ccc9de2cc242bd7e07bcb5f573aaf3c92bb

See more details on using hashes here.

File details

Details for the file bohr_library-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bohr_library-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for bohr_library-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2c94be78631cc1c95540b5fef3a5cc5f61269a4403de22f04597269bc2bdbab
MD5 f204271f5af61bc73ac0269a8e318b34
BLAKE2b-256 2b1ec790b2486022628d7d41809feefdaead5151936754a07bdb36fd79f28581

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page