Fix unit for Element properties: density_of_solid and Molar volume#4454
Conversation
1190a26 to
97bd8b2
Compare
Element propertiesElement properties: density_of_solid and Molar volume
| Np: 4273, Pu: 3503, Am: 2880, Cm: 3383} | ||
| Brinell hardness: | ||
| unit: MN m^-2 | ||
| unit: MPa |
There was a problem hiding this comment.
This could be breaking.
These two units are exactly the same but feels like MPa might be more common than MN m^-2 (also more consistent with docstring and other hardness)?
pymatgen/src/pymatgen/core/periodic_table.py
Lines 107 to 112 in f9d9fe8
| mineral_hardness (float, optional): Mohs hardness. | ||
| vickers_hardness (float, optional): Vickers hardness (MPa). | ||
| density_of_solid (float, optional): Density in solid phase (g/cm³). | ||
| density_of_solid (float, optional): Density in solid phase (kg/m³). |
There was a problem hiding this comment.
I have no strong opinion on this, I originally thought we just remove all units from the docstring if it's a scalar and redirect people to get the unit from FloatWithUnit, but feels like it's not good for docstring clarity as most data for ptable wouldn't be updated very often, also many units are pretty much "singleton" (e.g. K for temperature, angstrom for radii,...):
pymatgen/src/pymatgen/core/periodic_table.py
Lines 84 to 116 in f9d9fe8
Summary
Elementproperties, to close Units in docstring appear to be wrong for density_in_solid #4453