Skip to main content

Module units

Module units 

Source
Expand description

Unit conventions.

All physical quantities are SI internally (metres, kilograms, seconds, joules, kelvin). Two places deliberately use customary atomic-physics units at the API boundary, and say so in their names: energies carry an _ev suffix (electronvolts) and table densities are quoted in g/cm³ in the source tables. The factors below convert between them; they are exact because the SI 2019 redefinition fixes the elementary charge and the gram is a defined fraction of the kilogram.

Constants§

J_PER_EV
Joules per electronvolt. One eV is the elementary charge times one volt (CODATA 2022 value of e, exact; see ELEMENTARY_CHARGE).
KG_M3_PER_G_CM3
Kilograms per cubic metre for a density of 1 g/cm³ (exact: 1e-3 kg / 1e-6 m³).
M_PER_ANGSTROM
Metres per ångström (exact by definition of the prefix).

Functions§

ev_to_j
Convert electronvolts to joules.
g_cm3_to_kg_m3
Convert g/cm³ to kg/m³.
j_to_ev
Convert joules to electronvolts.
kg_m3_to_g_cm3
Convert kg/m³ to g/cm³.