Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constants: add hbar and fix (?) some units #200

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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