bohrpy
Librería en Python del modelo atómico de Bohr para el hidrógeno y átomos hidrogenoides. Calcula niveles de energía, radios de órbita y transiciones electrónicas, y dibuja esos resultados.
Instalación
Desde la raíz del repositorio:
python -m venv venv
source venv/bin/activate
pip install -e ".[test]"
Hace falta Python 3.12 o superior. El paquete instala exactamente estas versiones, que son las recientes con paquete listo para Python 3.12, 3.13 y 3.14:
numpy==2.5.4matplotlib==3.11.2pytest==9.2.0para las pruebas
Desde PyPI:
pip install bohrpy
Uso básico
from bohrpy import BohrAtom
hidrogeno = BohrAtom(Z=1)
print(hidrogeno.energy_level(1)) # energía del nivel n, en eV
print(hidrogeno.orbit_radius(1)) # radio de la órbita, en metros
transicion = hidrogeno.transition(3, 2)
print(transicion["delta_E_eV"])
print(transicion["frequency_Hz"])
print(transicion["wavelength_m"])
print(transicion["type"]) # "emisión" o "absorción"
hidrogeno.plot_energy_levels(max_n=5)
hidrogeno.plot_orbits(max_n=4)
Z es el número atómico. Con Z=1 se obtiene el hidrógeno y con Z=2 el He+.
Para guardar una figura sin abrir una ventana:
hidrogeno.plot_energy_levels(max_n=5, show=False, save_path="niveles.png")
hidrogeno.plot_orbits(max_n=4, show=False, save_path="orbitas.png")
Ejemplo
python examples/ejemplo_uso.py
Imprime los niveles del hidrógeno, la línea de Balmer n = 3 → n = 2 y una absorción n = 1 → n = 2. También guarda las figuras en examples/figuras/.
Pruebas
pytest
Autores
- Isabel Nieto
- Kevin Osorio
Metadata
Release files for bohrpy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bohrpy-0.1.1.tar.gz | 7.7 kB | With provenance | Details for bohrpy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bohrpy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for bohrpy-0.1.1-py3-none-any.whl |
Total release size: 15.3 kB
Release files / bohrpy-0.1.1.tar.gz
| Download URL | bohrpy-0.1.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09b4d8e81e98554e52c27cab597c70d07ae50391056aae6acaf0c9d7f571083f
|
|
BLAKE2b-256 checksum How to use checksums |
62448c955058f0e066cfc4a4ab38d707444826613c12be1bd83eeb6bcca14042
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / bohrpy-0.1.1-py3-none-any.whl
| Download URL | bohrpy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d1103035f823c4f42c32fc5a4e8c158e7bdb811d94f458eefd3e8ddb34fd690
|
|
BLAKE2b-256 checksum How to use checksums |
541ac53065fc9590044b3084b96b4162595d8770904c5f62183580698bc6f3a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for bohrpy 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bohrpy-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.