Skip to content

Commit 2f2c8d7

Browse files
authored
Fix unit for Element properties: density_of_solid and Molar volume (#4454)
* remove unit in docstring for density of solid * add unit hatree to "Atomic orbitals" * fix unit for molar volume * maybe recover unit in docstring, need discussion * MN m^-2 -> MPa for Brinell and Vickers hardness
1 parent 2e060a3 commit 2f2c8d7

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

dev_scripts/periodic_table_resources/_periodic_table.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Atomic no:
3535
No: 102, Lr: 103, Rf: 104, Db: 105, Sg: 106, Bh: 107, Hs: 108, Mt: 109, Ds: 110,
3636
Rg: 111, Cn: 112, Nh: 113, Fl: 114, Mc: 115, Lv: 116, Ts: 117, Og: 118}
3737
Atomic orbitals:
38+
unit: hartree
3839
data:
3940
H:
4041
1s: -0.233471
@@ -1086,7 +1087,7 @@ Boiling point:
10861087
Pb: 2022, Bi: 1837, Po: 1235, Rn: 211.3, Ra: 2010, Ac: 3573, Th: 5093, U: 4200,
10871088
Np: 4273, Pu: 3503, Am: 2880, Cm: 3383}
10881089
Brinell hardness:
1089-
unit: MN m^-2
1090+
unit: MPa
10901091
data: {Be: 600, Na: 0.69, Mg: 260, Al: 245, K: 0.363, Ca: 167, Sc: 750, Ti: 716,
10911092
V: 628, Cr: 1120, Mn: 196, Fe: 490, Co: 700, Ni: 700, Cu: 874, Zn: 412, Ga: 60,
10921093
As: 1440, Se: 736, Rb: 0.216, Y: 589, Zr: 650, Nb: 736, Mo: 1500, Ru: 2160, Rh: 1100,
@@ -2579,7 +2580,7 @@ Mineral hardness:
25792580
Re: 7.0, Os: 7.0, Ir: 6.5, Pt: 3.5, Au: 2.5, Hg: 1.5, Tl: 1.2, Pb: 1.5, Bi: 2.25,
25802581
Th: 3.0, U: 6.0}
25812582
Molar volume:
2582-
unit: cm^3
2583+
unit: cm^3 mol^-1
25832584
data: {H: 11.42, He: 21.0, Li: 13.02, Be: 4.85, B: 4.39, C: 5.29, N: 13.54, O: 17.36,
25842585
F: 11.20, Ne: 13.23, Na: 23.78, Mg: 14.00, Al: 10.00, Si: 12.06, P: 17.02, S: 15.53,
25852586
Cl: 17.39, Ar: 22.56, K: 45.94, Ca: 26.20, Sc: 15.00, Ti: 10.64, V: 8.32, Cr: 7.23,
@@ -4156,7 +4157,7 @@ Velocity of sound:
41564157
Hf: 3010, Ta: 3400, W: 5174, Re: 4700, Os: 4940, Ir: 4825, Pt: 2680, Au: 1740,
41574158
Hg: 1407, Tl: 818, Pb: 1260, Bi: 1790, Th: 2490, U: 3155, Pu: 2260}
41584159
Vickers hardness:
4159-
unit: MN m^-2
4160+
unit: MPa
41604161
data: {Be: 1670, B: 49000, Al: 167, Ti: 970, V: 628, Cr: 1060, Fe: 608, Co: 1043,
41614162
Ni: 638, Cu: 369, Zr: 903, Nb: 1320, Mo: 1530, Rh: 1246, Pd: 461, Ag: 251, La: 491,
41624163
Ce: 270, Pr: 400, Nd: 343, Sm: 412, Eu: 167, Gd: 570, Tb: 863, Dy: 540, Ho: 481,

dev_scripts/periodic_table_resources/elemental_properties.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ Atomic no:
244244
D: 1
245245
T: 1
246246
Atomic orbitals:
247+
unit: hartree
247248
data:
248249
Ac:
249250
1s: -3443.110367
@@ -1349,7 +1350,7 @@ Boiling point:
13491350
Zn: 1180
13501351
Zr: 4682
13511352
Brinell hardness:
1352-
unit: MN m^-2
1353+
unit: MPa
13531354
data:
13541355
Ag: 24.5
13551356
Al: 245
@@ -2584,7 +2585,7 @@ Mineral hardness:
25842585
Zn: 2.5
25852586
Zr: 5.0
25862587
Molar volume:
2587-
unit: cm^3
2588+
unit: cm^3 mol^-1
25882589
data:
25892590
Ac: 22.55
25902591
Ag: 10.27
@@ -3183,7 +3184,7 @@ Velocity of sound:
31833184
Zn: 3700
31843185
Zr: 3800
31853186
Vickers hardness:
3186-
unit: MN m^-2
3187+
unit: MPa
31873188
data:
31883189
Ag: 251
31893190
Al: 167
10 Bytes
Binary file not shown.

src/pymatgen/core/periodic_table.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __init__(self, symbol: str) -> None:
110110
rigidity_modulus (float, optional): Rigidity modulus (GPa).
111111
mineral_hardness (float, optional): Mohs hardness.
112112
vickers_hardness (float, optional): Vickers hardness (MPa).
113-
density_of_solid (float, optional): Density in solid phase (g/cm³).
113+
density_of_solid (float, optional): Density in solid phase (kg/m³).
114114
coefficient_of_linear_thermal_expansion (float, optional): Thermal expansion coefficient (K⁻¹).
115115
ground_level (float, optional): Ground energy level of the element.
116116
ionization_energies (list[Optional[float]]): Ionization energies (kJ/mol), indexed from 0.
@@ -125,10 +125,13 @@ def __init__(self, symbol: str) -> None:
125125
>>> hydrogen.electronic_structure
126126
'1s1'
127127
128-
Access additional attributes such as atomic radius:
128+
Access additional attributes such as atomic radius. For scalar, the unit may also be available:
129129
>>> hydrogen.atomic_radius_calculated
130130
0.53
131131
132+
>>> hydrogen.atomic_radius_calculated.unit
133+
ang
134+
132135
Notes:
133136
- This class supports handling of isotopes by incorporating named isotopes
134137
and their respective properties.

0 commit comments

Comments
 (0)