Physical constants (sisl.constant)ΒΆ

Module containing a pre-set set of physical constants. The SI units are following the new convention that takes effect on 20 May 2019.

The currently stored constants are (all are given in SI units):

PhysicalConstant

Class to create a physical constant with unit-conversion capability, works exactly like a float.

q([unit])

Unit of charge [C], or [A s]

c([unit])

Speed of light [m/s]

h([unit])

Plancks constant [J s]

hbar([unit])

Reduced Plancks constant [J s]

m_e([unit])

Mass of electron [kg]

m_p([unit])

Mass of proton [kg]

G0([unit])

Conductance quantum [S], or [m^2/s^2]

G([unit])

Gravitational constant [m^3/kg/s^2]

All constants may be used like an ordinary float (which converts it to a float:

>>> c
299792458.0 m/s
>>> c * 2
599584916

while one can just as easily convert the units (which ensures thay stay like another PhysicalConstant):

>>> c('Ang/ps')
2997924.58 Ang/ps