UnitsNet icon indicating copy to clipboard operation
UnitsNet copied to clipboard

New Units - Molecular Mass (Dalton)

Open rogerfydp opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Within existing quantity Mass there is no units often used for "Molecular mass"

Describe the solution you'd like Molecular mass (m) is the mass of a given molecule. The unit dalton (Da) is often used.

Will be nice to extend the quantity mass (if it's the proper one) to include Dalton (unit) such as,

  • Daltons (Da) - Used for individual molecules or small biomolecules.
  • Kilodaltons (kDa) - Used for larger molecules, such as proteins.
  • Megadaltons (MDa) - Used for very large molecular complexes, such as viruses and large protein assemblies.
  • Gigadaltons (GDa) - Used for extremely large molecular structures.

Describe alternatives you've considered None. Using other mass units for 'molecular mass' is not common.

rogerfydp avatar Jun 18 '24 09:06 rogerfydp

Hi, sure this sounds reasonable to add. Would you be interested in attempting a pull request? I'm happy to assist.

Detailed steps here: https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit

angularsen avatar Jun 18 '24 17:06 angularsen

Hi, thanks for accepting it!

I can do a pull request, no problem.

I was adding the quantity mass.json in the following way,

{
  "SingularName": "Dalton",
  "PluralName": "Daltons",
  "BaseUnits": {
    "M": "Dalton"
  },
  "FromUnitToBaseFunc": "{x} * 1.66053906660e-27",
  "FromBaseToUnitFunc": "{x} / 1.66053906660e-27",
  "Prefixes": ["Kilo", "Mega", "Giga"],
  "Localization": [
    {
      "Culture": "en-US",
      "Abbreviations": ["Da"]
    }
  ],
  "XmlDocSummary": "A Dalton, also known as the unified atomic mass unit, is a unit of mass commonly used to express the mass of atoms and molecules. It is defined as one twelfth of the mass of an unbound neutral atom of carbon-12 in its nuclear and electronic ground state.",
  "XmlDocRemarks": "https://en.wikipedia.org/wiki/Dalton_(unit)"
}

Taking initially the value from Wikipedia. But when double checking with other sources I see variations, here some examples.

Source Value
Wikipedia 1.66053906892(52)×10−27 kg
CODATA (2018) (page 50) 1.66053906660(50)x10−27
UCLA 1.660538921x10−27 kg
chemeurope.com 1.660538782(83)×10−27 kg

On the other hand, on Wikipedia's article, in the references we can find

Therefor I would like your opinion on the value to take, to comply with your project. Do you have any other reference or source?

Thanks!

rogerfydp avatar Jun 29 '24 08:06 rogerfydp

@rogerfydp Sorry for the late reply. I don't have any domain knowledge here, but generally I would follow SI definitions.

The wiki article seems quite thorough, but I'm confused why the wiki constant differs from CODATA/SI and I can't see any reference to where they got their value.

Until we learn otherwise, I'd say use CODATA/SI. They seem fairly up to date at least.

angularsen avatar Jul 08 '24 11:07 angularsen

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Aug 08 '24 02:08 github-actions[bot]

This issue was automatically closed due to inactivity.

github-actions[bot] avatar Aug 16 '24 02:08 github-actions[bot]