3.1.12. horton.units – Conversion from and to atomic units

Internally HORTON always uses atomic units. Atomic units are consistent, similar to the SI unit system: one does not need conversion factors in the middle of a computation. This choice facilitates the programming and reduces accidental bugs.

References for the conversion values:

  • B. J. Mohr and B. N. Taylor, CODATA recommended values of the fundamental physical constants: 1998, Rev. Mod. Phys. 72(2), 351 (2000)
  • The NIST Reference on Constants, Units, and Uncertainty (http://physics.nist.gov/cuu/Constants/index.html)
  • 1 calorie = 4.184 Joules

Conventions followed by this module:

Let foo be is the value of an external unit in internal (atomic) units. The way to use this unit is as follows: 5*foo litterally means five times foo. The result of this operation is a floating point number for this value in atomic units.

Examples:

If you want to have a distance of five angstrom in internal units: 5*angstrom.

If you want to convert a length of 5 internal units to angstrom: 5/angstrom.

Remarks:

It is highly recommended to perform unit conversions only when data is read from the input or data is written to the output. It may also be useful in input scripts that use HORTON. Do not perform any unit conversion in other parts of the program.

An often recurring question is how to convert a frequency in internal units to a spectroscopic wavenumber in inverse centimeters. This is how it can be done:

>>> from horton import centimeter, lightspeed
>>> invcm = lightspeed/centimeter
>>> freq = 0.00320232
>>> print freq/invcm

These are the conversion constants defined in this module:

Name Value
ampere 1.5097490095e+02
amu 1.8228886274e+03
angstrom 1.8897261339e+00
atm 3.4439674262e-09
au 1.0000000000e+00
avogadro 6.0221415000e+23
bar 3.3989315828e-09
calorie 9.5968941808e+17
centimeter 1.8897261339e+08
coulomb 6.2415097445e+18
debye 3.9343031369e-01
decimeter 1.8897261339e+09
deg 1.7453292520e-02
electronvolt 3.6749325920e-02
femtosecond 4.1341373337e+01
gram 1.0977693253e+27
hertz 2.4188843265e-17
joule 2.2937127583e+17
kcalmol 1.5936015753e-03
kelvin 1.0000000000e+00
kilogram 1.0977693253e+30
kjmol 3.8087991760e-04
liter 6.7483345942e+27
meter 1.8897261339e+10
micrometer 1.8897261339e+04
miligram 1.0977693253e+24
milimeter 1.8897261339e+07
nanometer 1.8897261339e+01
nanosecond 4.1341373337e+07
newton 1.2137805141e+07
pascal 3.3989315828e-14
picometer 1.8897261339e-02
picosecond 4.1341373337e+04
rad 1.0000000000e+00
rydberg 5.0000000000e-01
second 4.1341373337e+16
unified 1.8228886274e+03