constants.py

A database like file containing numerical values of various natural constants in SI units .

Avogadro constant [1/mol]
  • N_A = 6.022 \(\cdot\) 10\({}^{23}\)

Bohr’s Magneton [J/T]
  • mu_bohr = 9.274009994 \(\cdot\) 10\({}^{-24}\)

Bohr radius [m]
  • a0 = 5.2917721067 \(\cdot\) 10\({}^{-11}\)

Boltzmann constant [J/K]
  • k_B = 1.38064852 \(\cdot\) 10\({}^{-23}\)

Dielectric constant in vacuum [C / V / m]
  • eps0 = 8.854 \(\cdot\) 10\({}^{-12}\)

Electronvolt [J]
  • eV = 1.6021766208 \(\cdot\) 10\({}^{-19}\)

Electron mass [kg]
  • m_e = 9.10938356 \(\cdot\) 10\({}^{-31}\)

Planck’s constant [J * s]
  • h = 6.626070040 \(\cdot\) 10\({}^{-34}\)

reduced Planck’s constant [J * s]
  • hbar = h / (2 \(\cdot\) 3.14159265358979)

reduced Planck’s constant [eV * s]
  • hbar_eV = hbar / eV

Rydberg constant [1 / m]
  • R_const = 10973731.56816

Speed of light [m / s]
  • c = 299792458.

Universal Gas constant [J / K / mol]
  • R = 8.3144598

constants.convert_eV_nm(eV_or_nm)[source]

Convert between electronvolt and nanometers for electromagnetic waves. The conversion follows from \(E = h*c/\lambda\) and is simply:

nm_or_eV = 1239.84193 / eV_or_nm
Parameters:

eV_or_nm (float) – value in [eV] or [nm] to be converted.

Returns:

if [eV] were given, this is the corresponding value in [nm], and vice versa.

Return type:

float

constants.Ry2eV(erg)[source]

Convert rydberg energy units to electronvolt The conversion follows that 1 Ry = 13.6(…) eV

Parameters:

erg (float) – value in [eV] or [Ry] to be converted.

Returns:

if [eV] were given, this is the corresponding value in [Ry], and vice versa.

Return type:

float