Constants
Available Constants
Physical constants are available directly after importing the package. No initialization is required.
julia> using AtomicAndPhysicalConstants
julia> C_LIGHT
2.99792458e8Fundamental Constants
All constants are available as module-level constants:
Speed and Universal Constants
C_LIGHT: Speed of light [m/s]H_PLANCK: Planck constant [eV⋅s]H_BAR: Reduced Planck constant [eV⋅s]E_CHARGE: Elementary charge [C]FINE_STRUCTURE: Fine structure constant (dimensionless)AVOGADRO: Avogadro constant [mol⁻¹]
Electromagnetic Constants
EPS_0: Permittivity of free space [F/m]MU_0: Permeability of free space [N/A²]
Classical Radii
R_ELECTRON: Classical electron radius [m]R_PROTON: Classical proton radius [m]
Particle Masses
All masses are in [eV/c²]:
M_ELECTRON: Electron massM_PROTON: Proton massM_NEUTRON: Neutron massM_MUON: Muon massM_PION_0: Neutral pion massM_PION_CHARGED: Charged pion massM_DEUTERON: Deuteron massM_HELION: Helion (³He nucleus) mass
Magnetic Moments
All magnetic moments are in [eV/T]:
MU_ELECTRON: Electron magnetic momentMU_PROTON: Proton magnetic momentMU_NEUTRON: Neutron magnetic momentMU_MUON: Muon magnetic momentMU_DEUTERON: Deuteron magnetic momentMU_HELION: Helion magnetic momentMU_TRITON: Triton magnetic moment
g-factors
All g-factors are dimensionless:
G_ELECTRON: Electron g-factorG_PROTON: Proton g-factorG_NEUTRON: Neutron g-factorG_MUON: Muon g-factorG_DEUTERON: Deuteron g-factorG_HELION: Helion g-factorG_TRITON: Triton g-factor
Magnetic Moment Anomalies
Dimensionless anomalies:
ANOMALY_ELECTRON: Electron magnetic moment anomalyANOMALY_MUON: Muon magnetic moment anomaly
Unit Conversions
KG_PER_AMU: Kilograms per atomic mass unit [kg/amu]EV_PER_AMU: Electronvolts per atomic mass unit [eV/amu]J_PER_EV: Joules per electronvolt [J/eV]
Release Information
RELEASE_YEAR: CODATA release year (2022)
Examples
using AtomicAndPhysicalConstants
# Physical constants
println("Speed of light: ", C_LIGHT, " m/s")
println("Electron mass: ", M_ELECTRON, " eV/c²")
println("Planck constant: ", H_PLANCK, " eV⋅s")
println("Fine structure constant: ", FINE_STRUCTURE)
# Unit conversions
println("1 amu = ", EV_PER_AMU, " eV/c²")
println("1 eV = ", J_PER_EV, " J")Data Sources
All constants and species data are sourced from CODATA 2022 (Committee on Data of the International Science Council), the most recent internationally recommended values for fundamental physical constants.