Skip to content

Commit

Permalink
Merge pull request #200 from mattwelborn/constants
Browse files Browse the repository at this point in the history
Constants: add hbar and fix (?) some units
  • Loading branch information
dgasmith authored Jan 20, 2020
2 parents 3bd53fa + 327a687 commit 8d7c5ac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions qcelemental/physical_constants/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ def __init__(self, context="CODATA2014"):
]

aliases.extend([
('h', 'J', self.pc['hertz-joule relationship'].data, 'The Planck constant (Js)'),
('c', 'Hz', self.pc['inverse meter-hertz relationship'].data, 'Speed of light (ms$^{-1}$)'),
('kb', 'J', self.pc['kelvin-joule relationship'].data, 'The Boltzmann constant (JK$^{-1}$)'),
('h', 'J s', self.pc['hertz-joule relationship'].data, 'The Planck constant (Js)'),
('hbar', 'J s', self.pc['planck constant over 2 pi'].data, 'Reduced Planck constant (Js)'),
('c', 'm s^-1', self.pc['inverse meter-hertz relationship'].data, 'Speed of light (ms$^{-1}$)'),
('kb', 'J K^-1', self.pc['kelvin-joule relationship'].data, 'The Boltzmann constant (JK$^{-1}$)'),
('R', 'J mol^-1 K^-1', self.pc['molar gas constant'].data, 'Universal gas constant (JK$^{-1}$mol$^{-1}$)'),
('bohr2angstroms', 'AA', self.pc['bohr radius'].data * Decimal('1.E10'), 'Bohr to Angstroms conversion factor'),
('bohr2m', 'm', self.pc['bohr radius'].data, 'Bohr to meters conversion factor'),
Expand All @@ -164,7 +165,7 @@ def __init__(self, context="CODATA2014"):
('dipmom_au2si', 'C m', self.pc['atomic unit of electric dipole mom.'].data, 'Atomic units to SI units (Cm) conversion factor for dipoles'),
('dipmom_au2debye', '???', self.pc['atomic unit of electric dipole mom.'].data * Decimal('1.E21') / self.pc['hertz-inverse meter relationship'].data,
'Atomic units to Debye conversion factor for dipoles'),
('dipmom_debye2si', '???', self.pc['hertz-inverse meter relationship'].data * Decimal('1.E-21'), 'Debye to SI units (Cm) conversion factor for dipoles'),
('dipmom_debye2si', 'C m', self.pc['hertz-inverse meter relationship'].data * Decimal('1.E-21'), 'Debye to SI units (Cm) conversion factor for dipoles'),
('c_au', '', self.pc['inverse fine-structure constant'].data, 'Speed of light in atomic units'),
('hartree2ev', 'eV', self.pc['hartree energy in ev'].data, 'Hartree to eV conversion factor'),
('hartree2wavenumbers', 'cm^-1', self.pc['hartree-inverse meter relationship'].data * Decimal('0.01'), 'Hartree to cm$^{-1}$ conversion factor'),
Expand Down

0 comments on commit 8d7c5ac

Please sign in to comment.