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

Potential unit inconsistencies #8

Open
jchodera opened this issue Apr 16, 2017 · 0 comments
Open

Potential unit inconsistencies #8

jchodera opened this issue Apr 16, 2017 · 0 comments

Comments

@jchodera
Copy link
Member

jchodera commented Apr 16, 2017

I find it's much more foolproof to store work in units of kT whenever we need to store them as a unitless array. We appear to use kJ/mol in the code at various places, such as here, which has the potential to cause some confusion at best and errors at worst (if we accidentally feed them to, say, EXP or BAR before converting to kT).

If we do store energies or work with specific units, we should make sure to actually store unit-bearing quantities. Code like this has the potential to cause confusion by returning unitless quantities that must be interpreted in kJ/mol.

The best policy is

  • If the quantity is supposed to be unit-bearing, make sure it is a simtk.unit.Quantity with the appropriate units
  • If you want it to be dimensionless, convert it to units of kT; it's then safe to be unitless
@jchodera jchodera changed the title Store energies in units of kT throughout Potential unit inconsistencies Apr 16, 2017
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

No branches or pull requests

1 participant