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
val
is a vector, matrix or multidimensional array, the conversion is performed elementwise andcVal
has the same shape asval
. - All inverse unit conversions are supported, i.e., if
aaa2bbb
is a member method, so doesbbb2aaa
.
Conversion from atomic units
au2ev
to electron volts: 1 [a.u.] = 27.2116 [eV]au2meter
to meters: 1 [a.u.] = 5.2917721067e-11 [m]au2second
to seconds: 1 [a.u] = 2.419e-17 [s]
Conversion from electron volts
ev2au
to atomic units: 1 [eV] = 1/27.2116 [a.u.]
Conversion from meters
meter2au
to atomic units: 1 [m] = 1/5.2917721067e-11 [a.u.]
Conversion from seconds
second2au
to atomic units: 1 [s] = 1/2.419e-17 [a.u]