gasfir.utils — unit conversion

class gasfir.utils.AtomicUnits[source]

Bases: object

Atomic units constants and unit conversion utilities.

All class attributes express one atomic unit of a given quantity in practical/SI units. For example, AtomicUnits.nm = 0.05292 means that one atomic unit of length equals 0.05292 nm (the Bohr radius).

The static methods provide clearly named two-way conversions so callers never have to reason about which direction to multiply or divide.

meter

1 a.u. of length in metres (Bohr radius).

nm

1 a.u. of length in nanometres.

angstrom

1 a.u. of length in ångström.

second

1 a.u. of time in seconds.

fs

1 a.u. of time in femtoseconds.

Joule

1 a.u. of energy in joules (Hartree).

eV

1 a.u. of energy in electronvolts (Hartree).

Volts_per_meter

1 a.u. of electric field in V/m.

Volts_per_Angstrom

1 a.u. of electric field in V/Å.

speed_of_light

Speed of light in atomic units (= 1/α ≈ 137).

Coulomb

1 a.u. of charge in coulombs (elementary charge).

PW_per_cm2_au

1 PW/cm² expressed in a.u. of intensity.

Example

>>> AtomicUnits.au_to_nm(1.0)   # Bohr radius in nm
0.05292...
>>> AtomicUnits.nm_to_au(800)   # 800 nm in a.u.
15117.6...
>>> AtomicUnits.au_to_eV(0.5)   # hydrogen IP in eV
13.606...
>>> AtomicUnits.wavelength_nm_to_omega_au(800)  # angular freq for 800 nm
0.05696...