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

Conversation

mattwelborn
Copy link
Collaborator

Description

This PR adds hbar to constants and fixes some of the units. I don't understand:

  1. Were the units "incorrect" intentionally?
  2. Why do we have constants separate from the unit registry?
  3. Why aren't constants in the unit registry?

Changelog description

hbar was added to constants. The units of c, kb, h, and dipmom_debye2si were corrected.

Status

  • Code base linted
  • Ready to go

@dgasmith
Copy link
Collaborator

See conversation in #198, we should continue this there.

@loriab
Copy link
Collaborator

loriab commented Jan 20, 2020

I haven’t put in tests for codata 2018 yet, so any physconst affecting PR should toggle the line at the end of context.py and check that ureg changes are ok for 2018 as well as 2014.

Copy link
Collaborator

@loriab loriab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't trace back why the units were wrong.

I suspect that most qcel clients are comfortable with direct physical constants and conversion_factor() seems newfangled. So ureg gets most use as user API and isn't so fully built out. I think we want to keep context and ureg separate as they have different sources.

@dgasmith
Copy link
Collaborator

To refine, I think we want to keep the PhysicalConstantsContext class, but slowly deprecated the aliases in favor of direct ureg generated ones?

This would be my vote anyways so we have a single source of truth.

@dgasmith
Copy link
Collaborator

Merging, moved conversation to #198.

@dgasmith dgasmith merged commit 8d7c5ac into MolSSI:master Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants