bjodah / chempy

⚗ A package useful for chemistry written in Python
BSD 2-Clause "Simplified" License
536 stars 79 forks source link

Suggested updates to periodic.py #199

Closed cbporch closed 2 years ago

cbporch commented 2 years ago

Consolidates element information into a single tuple, update relative atomic mass/uncertainty values (current file is missing changes since 2016).

Also, alters the atomic_number function to accept lowercase atomic symbols.

References:

Edit: full disclusure, my Chemistry knowledge is middling to amateur at best, so the reasons for the failing tests are entirely opaque to me.

bjodah commented 2 years ago

@cbporch thank you for these updates! Much appreciated. The test failures are actually due to overly tight tolerances (it doesn't make sense that I have tighter tolerances in those tests than the uncertainty associated with the average molar mass of the natural abundance of the isotopes of the element). I pushed a commit locking the mass used in those tests, if they pass I'll merge.

Thanks again!