Physical constants (sisl.constant
)ΒΆ
Module containing a pre-set set of physical constants.
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. |
c |
Speed of light [m/s] |
h |
Plancks constant [J s] |
hbar |
Reduced Plancks constant [J s] |
m_e |
Mass of electron [kg] |
m_p |
Mass of proton [kg] |
G |
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