You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some masses in atomic mass units and energy units that are kcal/mol. For some reason Unitful won't let me uconvert() atomic mass units into g/mol even though they are equivalent (e.g. mass of Carbon is 12.011 u or g/mol). This prevents the per mol quantity from canceling with the energy and its breaks everything.
Is there some way around this?
The text was updated successfully, but these errors were encountered:
u is a unit of mass and g/mol is a unit of molar mass. These are different dimensions, so one cannot be converted to the other. Also, since 20 May 2019, 1 u and 1 g/mol are not exactly equivalent (see below).
To get an approximate result, you can multiply the mass by the avogadro constant before converting to g/mol:
julia>uconvert(u"g/mol", 1u"u*Na")
0.9999999996544214 g mol^-1
The reason that this is not exactly 1 g/mol is the following:
This package follows the latest version of the SI unit system. Since the 2019 redefinition of the base SI units, the molar mass of a substance in g/mol and the mass of one of its molecules in u have slightly different values.
In short, before 2019, the Avogadro constant was an inexact measurement and the molar mass constant was defined to be exactly 1 g/mol. In 2019, the Avogadro constant was defined to be exact (because its value forms the basis for one of the SI base units, the mol) and as a result, the molar mass constant is no longer exact.
I have some masses in atomic mass units and energy units that are kcal/mol. For some reason Unitful won't let me uconvert() atomic mass units into g/mol even though they are equivalent (e.g. mass of Carbon is 12.011 u or g/mol). This prevents the per mol quantity from canceling with the energy and its breaks everything.
Is there some way around this?
The text was updated successfully, but these errors were encountered: