convertUnit - fmauger1/QMol-grid GitHub Wiki
convertUnit
Miscellaneous unit conversions
Syntax
convertUnit is defined as an abstract class with unit conversion defined by static methods with the following generic syntax
cVal = convertUnit.old2new(val)
with "old" and "new" the units being converted.
Description
cVal = convertUnit.old2new(val) converts val between old and new systems of units and returns the result in cVal
- If
valis a vector, matrix or multidimensional array, the conversion is performed elementwise andcValhas the same shape asval. - All inverse unit conversions are supported, i.e., if
aaa2bbbis a member method, so doesbbb2aaa.
Conversion from atomic units
au2evto electron volts: 1 [a.u.] = 27.2116 [eV]au2meterto meters: 1 [a.u.] = 5.2917721067e-11 [m]au2secondto seconds: 1 [a.u] = 2.419e-17 [s]
Conversion from electron volts
ev2auto atomic units: 1 [eV] = 1/27.2116 [a.u.]
Conversion from meters
meter2auto atomic units: 1 [m] = 1/5.2917721067e-11 [a.u.]
Conversion from seconds
second2auto atomic units: 1 [s] = 1/2.419e-17 [a.u]