quantized-lab 0.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quantized/__init__.py +11 -0
- quantized/__main__.py +14 -0
- quantized/api.py +220 -0
- quantized/app.py +206 -0
- quantized/calc/__init__.py +8 -0
- quantized/calc/_clipfit.py +76 -0
- quantized/calc/_natural_neighbor.py +219 -0
- quantized/calc/aggregate.py +159 -0
- quantized/calc/backgrounds.py +353 -0
- quantized/calc/baseline.py +349 -0
- quantized/calc/batch_fit.py +148 -0
- quantized/calc/constants.py +27 -0
- quantized/calc/corrections.py +192 -0
- quantized/calc/crystallography.py +400 -0
- quantized/calc/diffusion.py +120 -0
- quantized/calc/electrical.py +248 -0
- quantized/calc/electrochemistry.py +176 -0
- quantized/calc/element_data.json +1 -0
- quantized/calc/element_data.py +59 -0
- quantized/calc/errors.py +246 -0
- quantized/calc/figure.py +417 -0
- quantized/calc/figure_break.py +152 -0
- quantized/calc/figure_categorical.py +156 -0
- quantized/calc/figure_corner.py +229 -0
- quantized/calc/figure_facets.py +127 -0
- quantized/calc/figure_field.py +137 -0
- quantized/calc/figure_hitmap.py +116 -0
- quantized/calc/figure_labels.py +62 -0
- quantized/calc/figure_map.py +287 -0
- quantized/calc/figure_overrides.py +159 -0
- quantized/calc/figure_page.py +266 -0
- quantized/calc/figure_scale.py +125 -0
- quantized/calc/figure_statplots.py +167 -0
- quantized/calc/figure_styles.py +131 -0
- quantized/calc/figure_ternary.py +239 -0
- quantized/calc/figure_ticks.py +217 -0
- quantized/calc/fit_autoguess.py +156 -0
- quantized/calc/fit_bootstrap.py +163 -0
- quantized/calc/fit_bumps.py +258 -0
- quantized/calc/fit_constraints.py +114 -0
- quantized/calc/fit_equation.py +264 -0
- quantized/calc/fit_findxy.py +80 -0
- quantized/calc/fit_models.py +195 -0
- quantized/calc/fit_models_special.py +189 -0
- quantized/calc/fit_odr.py +99 -0
- quantized/calc/fit_scan.py +243 -0
- quantized/calc/fit_stats.py +215 -0
- quantized/calc/fitting.py +199 -0
- quantized/calc/formula.py +90 -0
- quantized/calc/global_curve_fit.py +305 -0
- quantized/calc/global_fit.py +181 -0
- quantized/calc/interp2d.py +260 -0
- quantized/calc/linecut.py +269 -0
- quantized/calc/magnetic.py +414 -0
- quantized/calc/magnetometry.py +464 -0
- quantized/calc/map.py +228 -0
- quantized/calc/mcmc.py +177 -0
- quantized/calc/optics.py +228 -0
- quantized/calc/pawley.py +251 -0
- quantized/calc/peak_batch.py +128 -0
- quantized/calc/peak_fit.py +259 -0
- quantized/calc/peak_integrate.py +104 -0
- quantized/calc/peak_multifit.py +260 -0
- quantized/calc/peak_track.py +134 -0
- quantized/calc/peaks.py +298 -0
- quantized/calc/peakshapes.py +85 -0
- quantized/calc/plotting.py +147 -0
- quantized/calc/processing.py +232 -0
- quantized/calc/qspace.py +48 -0
- quantized/calc/reductions.py +155 -0
- quantized/calc/reductions_fft.py +383 -0
- quantized/calc/refl_sld_presets.json +1 -0
- quantized/calc/reflectivity.py +80 -0
- quantized/calc/registry.py +303 -0
- quantized/calc/relaxation.py +119 -0
- quantized/calc/report.py +253 -0
- quantized/calc/report_emit.py +227 -0
- quantized/calc/resample.py +142 -0
- quantized/calc/rsm.py +91 -0
- quantized/calc/rsm_analyze.py +245 -0
- quantized/calc/semiconductor.py +488 -0
- quantized/calc/sld.py +131 -0
- quantized/calc/sld_formula.py +138 -0
- quantized/calc/spectral.py +357 -0
- quantized/calc/statplots.py +214 -0
- quantized/calc/stats.py +399 -0
- quantized/calc/stats_anova2.py +202 -0
- quantized/calc/stats_anova_ext.py +338 -0
- quantized/calc/stats_dist.py +196 -0
- quantized/calc/stats_glm.py +245 -0
- quantized/calc/stats_multivar.py +289 -0
- quantized/calc/stats_roc.py +157 -0
- quantized/calc/stats_survival.py +261 -0
- quantized/calc/stats_tests.py +380 -0
- quantized/calc/substrates.py +181 -0
- quantized/calc/superconductor.py +359 -0
- quantized/calc/surface_fit.py +290 -0
- quantized/calc/surface_models.py +156 -0
- quantized/calc/thermal.py +119 -0
- quantized/calc/thin_film.py +425 -0
- quantized/calc/unit_convert.py +259 -0
- quantized/calc/units.py +80 -0
- quantized/calc/vacuum.py +290 -0
- quantized/calc/xray.py +169 -0
- quantized/cli.py +214 -0
- quantized/datastruct.py +153 -0
- quantized/io/__init__.py +11 -0
- quantized/io/_hdf5_layout.py +308 -0
- quantized/io/_jcamp_asdf.py +135 -0
- quantized/io/_xrdml_scan.py +291 -0
- quantized/io/base.py +82 -0
- quantized/io/bruker_brml.py +177 -0
- quantized/io/bruker_raw.py +158 -0
- quantized/io/cif.py +266 -0
- quantized/io/consolidated.py +122 -0
- quantized/io/delimited.py +222 -0
- quantized/io/excel.py +135 -0
- quantized/io/hdf5.py +192 -0
- quantized/io/import_filters.py +178 -0
- quantized/io/import_preview.py +262 -0
- quantized/io/jcamp.py +179 -0
- quantized/io/lakeshore.py +163 -0
- quantized/io/ncnr.py +278 -0
- quantized/io/netcdf.py +195 -0
- quantized/io/opus.py +231 -0
- quantized/io/origin.py +346 -0
- quantized/io/origin_com.py +194 -0
- quantized/io/origin_project/__init__.py +221 -0
- quantized/io/origin_project/annotation_marks.py +288 -0
- quantized/io/origin_project/container.py +262 -0
- quantized/io/origin_project/curve_style_color.py +359 -0
- quantized/io/origin_project/figure_geometry.py +108 -0
- quantized/io/origin_project/figure_layers.py +333 -0
- quantized/io/origin_project/figure_text.py +258 -0
- quantized/io/origin_project/figures.py +210 -0
- quantized/io/origin_project/figures_opju.py +440 -0
- quantized/io/origin_project/notes.py +302 -0
- quantized/io/origin_project/opj.py +459 -0
- quantized/io/origin_project/opj_curves.py +297 -0
- quantized/io/origin_project/opj_shapes.py +148 -0
- quantized/io/origin_project/opju.py +146 -0
- quantized/io/origin_project/opju_axis_real_form.py +418 -0
- quantized/io/origin_project/opju_axis_specimen_form.py +167 -0
- quantized/io/origin_project/opju_codec.py +370 -0
- quantized/io/origin_project/opju_curves.py +497 -0
- quantized/io/origin_project/opju_curves_allcols.py +258 -0
- quantized/io/origin_project/opju_figure_curves.py +302 -0
- quantized/io/origin_project/opju_figure_text.py +245 -0
- quantized/io/origin_project/opju_reports.py +129 -0
- quantized/io/origin_project/origin_richtext.py +145 -0
- quantized/io/origin_project/preview.py +132 -0
- quantized/io/origin_project/templates.py +314 -0
- quantized/io/origin_project/tree.py +379 -0
- quantized/io/origin_project/tree_opju.py +228 -0
- quantized/io/origin_project/windows.py +238 -0
- quantized/io/origin_project/windows_opju.py +393 -0
- quantized/io/origin_project/writer.py +156 -0
- quantized/io/origin_project/writer_blocks.py +282 -0
- quantized/io/qd.py +380 -0
- quantized/io/refl1d.py +132 -0
- quantized/io/registry.py +210 -0
- quantized/io/report_export.py +347 -0
- quantized/io/rigaku.py +100 -0
- quantized/io/sims.py +398 -0
- quantized/io/spc.py +311 -0
- quantized/io/xrd_csv.py +308 -0
- quantized/io/xrdml.py +394 -0
- quantized/jobs.py +173 -0
- quantized/plugins/__init__.py +50 -0
- quantized/plugins/contract.py +111 -0
- quantized/plugins/loader.py +394 -0
- quantized/plugins/steps.py +90 -0
- quantized/routes/__init__.py +7 -0
- quantized/routes/_bookcache.py +62 -0
- quantized/routes/_export_common.py +27 -0
- quantized/routes/_payload.py +58 -0
- quantized/routes/_uploadcache.py +59 -0
- quantized/routes/aggregate.py +46 -0
- quantized/routes/baseline.py +210 -0
- quantized/routes/books.py +117 -0
- quantized/routes/calc.py +56 -0
- quantized/routes/corrections.py +78 -0
- quantized/routes/crystallography.py +80 -0
- quantized/routes/diffusion.py +58 -0
- quantized/routes/electrical.py +101 -0
- quantized/routes/electrochemistry.py +83 -0
- quantized/routes/export.py +280 -0
- quantized/routes/export_facets.py +83 -0
- quantized/routes/export_figures.py +471 -0
- quantized/routes/export_page.py +125 -0
- quantized/routes/fitting.py +379 -0
- quantized/routes/fitting_bumps.py +97 -0
- quantized/routes/import_template.py +97 -0
- quantized/routes/import_wizard.py +150 -0
- quantized/routes/jobs_api.py +59 -0
- quantized/routes/magnetic.py +135 -0
- quantized/routes/magnetometry.py +133 -0
- quantized/routes/optics.py +98 -0
- quantized/routes/parsers.py +281 -0
- quantized/routes/peaks.py +184 -0
- quantized/routes/plot.py +103 -0
- quantized/routes/reductions.py +121 -0
- quantized/routes/reference.py +58 -0
- quantized/routes/reflectivity.py +91 -0
- quantized/routes/report_export.py +119 -0
- quantized/routes/rsm.py +136 -0
- quantized/routes/samples.py +32 -0
- quantized/routes/semiconductor.py +207 -0
- quantized/routes/sld.py +42 -0
- quantized/routes/spectral.py +54 -0
- quantized/routes/statplots.py +99 -0
- quantized/routes/stats.py +418 -0
- quantized/routes/stats_design.py +321 -0
- quantized/routes/substrates.py +46 -0
- quantized/routes/superconductor.py +139 -0
- quantized/routes/thermal.py +57 -0
- quantized/routes/thin_film.py +153 -0
- quantized/routes/vacuum.py +113 -0
- quantized/routes/xray.py +32 -0
- quantized/samples/demo_vsm.csv +42 -0
- quantized/server_launch.py +251 -0
- quantized/web/assets/JetBrainsMono-Bold-CUogYd9I.woff2 +0 -0
- quantized/web/assets/JetBrainsMono-Regular-CA-Os4ii.woff2 +0 -0
- quantized/web/assets/index-BHmmCL-x.js +27 -0
- quantized/web/assets/index-BiZzN7J6.css +1 -0
- quantized/web/index.html +13 -0
- quantized/web/loading.html +69 -0
- quantized_lab-0.8.0.dist-info/METADATA +122 -0
- quantized_lab-0.8.0.dist-info/RECORD +233 -0
- quantized_lab-0.8.0.dist-info/WHEEL +4 -0
- quantized_lab-0.8.0.dist-info/entry_points.txt +4 -0
- quantized_lab-0.8.0.dist-info/licenses/LICENSE +201 -0
- quantized_lab-0.8.0.dist-info/licenses/NOTICE +11 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
r"""Electrical transport calculators (DiraCulator ``buildElectricalTab`` +
|
|
2
|
+
``+calc/+electrical``).
|
|
3
|
+
|
|
4
|
+
Pure calc layer — closed-form scalars in, result dicts out. No fastapi /
|
|
5
|
+
pydantic imports. Ports the seven MATLAB ``calc.electrical`` functions verbatim:
|
|
6
|
+
|
|
7
|
+
.. math::
|
|
8
|
+
|
|
9
|
+
\rho = R_s\,t \qquad R_s = \rho / t \qquad \sigma = 1/\rho \\
|
|
10
|
+
\mu = \frac{1}{q\,n\,\rho} \qquad J = I / A \\
|
|
11
|
+
R_H = \frac{V_H\,t}{I\,B} \qquad n = \frac{1}{|R_H|\,q} \qquad
|
|
12
|
+
\kappa_e = \frac{L_0\,T}{\rho}
|
|
13
|
+
|
|
14
|
+
Units follow the MATLAB toolbox (the behavioural reference): resistivity in
|
|
15
|
+
Ω·cm, sheet resistance in Ω/sq, thickness in cm, carrier density in cm⁻³,
|
|
16
|
+
mobility in cm²/(V·s), current density in A/cm², Hall coefficient in cm³/C.
|
|
17
|
+
Sign convention for the Hall coefficient: ``R_H > 0`` → holes (p-type),
|
|
18
|
+
``R_H < 0`` → electrons (n-type).
|
|
19
|
+
|
|
20
|
+
Reference values (frozen from ``quantized_matlab``):
|
|
21
|
+
- ``resistivity(500, 2e-5) -> rho = 0.01`` Ω·cm
|
|
22
|
+
- ``sheet_resistance(1e-3, 2e-5) -> Rs = 50`` Ω/sq
|
|
23
|
+
- ``conductivity(1e-3) -> sigma = 1000`` S/cm
|
|
24
|
+
- ``mobility(1e-2, 1e18) -> mu ≈ 624.15`` cm²/(V·s)
|
|
25
|
+
- ``wiedemann_franz(300, 1.72e-6) -> kappa_e ≈ 4.26`` W/(cm·K)
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from __future__ import annotations
|
|
29
|
+
|
|
30
|
+
from typing import Any
|
|
31
|
+
|
|
32
|
+
import numpy as np
|
|
33
|
+
|
|
34
|
+
from quantized.calc.constants import constants
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"conductivity",
|
|
38
|
+
"current_density",
|
|
39
|
+
"hall_analysis",
|
|
40
|
+
"hall_single_point",
|
|
41
|
+
"mobility",
|
|
42
|
+
"resistivity",
|
|
43
|
+
"sheet_resistance",
|
|
44
|
+
"wiedemann_franz",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
# Lorenz number (Sommerfeld value): L0 = pi^2 kB^2 / (3 e^2) = 2.44e-8 W*Ohm/K^2
|
|
48
|
+
_LORENZ = 2.44e-8 # W*Ohm/K^2
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _carrier_type(r_h: float) -> str:
|
|
52
|
+
"""Carrier type from the sign of the Hall coefficient (+ holes, - electrons)."""
|
|
53
|
+
if r_h > 0:
|
|
54
|
+
return "hole"
|
|
55
|
+
if r_h < 0:
|
|
56
|
+
return "electron"
|
|
57
|
+
return "unknown"
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def resistivity(rs: float, t: float) -> dict[str, float]:
|
|
61
|
+
"""Bulk resistivity ρ = R_s·t (Ω·cm) from sheet resistance and thickness.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
rs: sheet resistance (Ω/sq), > 0.
|
|
65
|
+
t: film thickness (cm), > 0.
|
|
66
|
+
|
|
67
|
+
>>> round(resistivity(500.0, 2e-5)["rho"], 12)
|
|
68
|
+
0.01
|
|
69
|
+
"""
|
|
70
|
+
if rs <= 0 or t <= 0:
|
|
71
|
+
raise ValueError("Rs and t must be positive")
|
|
72
|
+
return {"rho": rs * t, "Rs": rs, "t": t}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def sheet_resistance(rho: float, t: float) -> dict[str, float]:
|
|
76
|
+
"""Sheet resistance R_s = ρ/t (Ω/sq) from bulk resistivity and thickness.
|
|
77
|
+
|
|
78
|
+
>>> round(sheet_resistance(1e-3, 2e-5)["Rs"], 9)
|
|
79
|
+
50.0
|
|
80
|
+
"""
|
|
81
|
+
if rho <= 0 or t <= 0:
|
|
82
|
+
raise ValueError("rho and t must be positive")
|
|
83
|
+
return {"Rs": rho / t, "rho": rho, "t": t}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def conductivity(rho: float) -> dict[str, float]:
|
|
87
|
+
"""Electrical conductivity σ = 1/ρ (S/cm) from resistivity (Ω·cm).
|
|
88
|
+
|
|
89
|
+
>>> conductivity(1e-3)["sigma"]
|
|
90
|
+
1000.0
|
|
91
|
+
"""
|
|
92
|
+
if rho <= 0:
|
|
93
|
+
raise ValueError("rho must be positive")
|
|
94
|
+
return {"sigma": 1.0 / rho, "rho": rho}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def mobility(rho: float, n: float) -> dict[str, float]:
|
|
98
|
+
"""Carrier mobility μ = 1/(q·n·ρ) (cm²/V·s).
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
rho: resistivity (Ω·cm), > 0.
|
|
102
|
+
n: carrier concentration (cm⁻³), > 0.
|
|
103
|
+
|
|
104
|
+
>>> round(mobility(1e-2, 1e18)["mu"], 3)
|
|
105
|
+
624.151
|
|
106
|
+
"""
|
|
107
|
+
if rho <= 0 or n <= 0:
|
|
108
|
+
raise ValueError("rho and n must be positive")
|
|
109
|
+
q = constants()["e"]
|
|
110
|
+
return {"mu": 1.0 / (q * n * rho), "rho": rho, "n": n}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def current_density(i: float, area: float) -> dict[str, float]:
|
|
114
|
+
"""Current density J = I/A (A/cm²).
|
|
115
|
+
|
|
116
|
+
>>> current_density(0.01, 0.04)["J"]
|
|
117
|
+
0.25
|
|
118
|
+
"""
|
|
119
|
+
if area <= 0:
|
|
120
|
+
raise ValueError("area must be positive")
|
|
121
|
+
return {"J": i / area, "I": i, "area": area}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def hall_single_point(v_h: float, i: float, b: float, t: float) -> dict[str, Any]:
|
|
125
|
+
"""Single-point Hall analysis (DiraCulator ``doHallEffect``).
|
|
126
|
+
|
|
127
|
+
From one Hall-voltage measurement: ``R_H = V_H·t/(I·B)`` (cm³/C, with ``t``
|
|
128
|
+
in cm), majority carrier density ``n = 1/(|R_H|·q)`` (cm⁻³), and carrier
|
|
129
|
+
type from ``sign(R_H)``.
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
v_h: Hall voltage (V); sign carries the carrier type.
|
|
133
|
+
i: longitudinal current (A), non-zero.
|
|
134
|
+
b: magnetic field (T), non-zero.
|
|
135
|
+
t: sample thickness (cm), > 0.
|
|
136
|
+
|
|
137
|
+
>>> r = hall_single_point(1e-3, 1e-3, 1.0, 1e-5)
|
|
138
|
+
>>> round(r["r_h"], 8)
|
|
139
|
+
1e-05
|
|
140
|
+
>>> r["carrier_type"]
|
|
141
|
+
'hole'
|
|
142
|
+
"""
|
|
143
|
+
if i == 0 or b == 0:
|
|
144
|
+
raise ValueError("Current I and field B must be non-zero")
|
|
145
|
+
if t <= 0:
|
|
146
|
+
raise ValueError("thickness t must be positive")
|
|
147
|
+
r_h = v_h * t / (i * b) # cm^3/C
|
|
148
|
+
q = constants()["e"]
|
|
149
|
+
n_abs = float("inf") if r_h == 0 else abs(1.0 / (r_h * q))
|
|
150
|
+
return {
|
|
151
|
+
"r_h": r_h,
|
|
152
|
+
"carrier_density": n_abs,
|
|
153
|
+
"carrier_type": _carrier_type(r_h),
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def hall_analysis(
|
|
158
|
+
field: list[float],
|
|
159
|
+
hall_resistance: list[float],
|
|
160
|
+
*,
|
|
161
|
+
thickness: float | None = None,
|
|
162
|
+
field_unit: str = "T",
|
|
163
|
+
sigma: float | None = None,
|
|
164
|
+
) -> dict[str, Any]:
|
|
165
|
+
"""Single-carrier Hall analysis from an R_xy vs H sweep (``hallAnalysis.m``).
|
|
166
|
+
|
|
167
|
+
Linear-fits ``R_xy = R_H·H + offset`` (normal equations, no toolbox), then
|
|
168
|
+
converts the slope to a Hall coefficient in cm³/C, deduces carrier type and
|
|
169
|
+
density, and — if σ is supplied — the Hall mobility ``μ_H = |R_H|·σ``.
|
|
170
|
+
|
|
171
|
+
Args:
|
|
172
|
+
field: magnetic field vector (T, or Oe if ``field_unit='Oe'``).
|
|
173
|
+
hall_resistance: transverse resistance/resistivity R_xy.
|
|
174
|
+
thickness: sample thickness (cm); needed for a bulk R_H / carrier density.
|
|
175
|
+
field_unit: ``'T'`` (default) or ``'Oe'`` (converted via 1 Oe = 1e-4 T).
|
|
176
|
+
sigma: longitudinal conductivity σ (S/cm) for the Hall mobility.
|
|
177
|
+
|
|
178
|
+
Returns a dict with ``r_h`` (cm³/C), ``carrier_density`` (cm⁻³),
|
|
179
|
+
``carrier_type``, ``mobility`` (cm²/V·s), and ``fit_r2``.
|
|
180
|
+
"""
|
|
181
|
+
h = np.asarray(field, dtype=float)
|
|
182
|
+
ry = np.asarray(hall_resistance, dtype=float)
|
|
183
|
+
if h.size != ry.size:
|
|
184
|
+
raise ValueError("field and hall_resistance must have the same length")
|
|
185
|
+
if h.size < 2:
|
|
186
|
+
raise ValueError("at least 2 data points are required for a linear fit")
|
|
187
|
+
|
|
188
|
+
unit = field_unit.upper()
|
|
189
|
+
if unit not in ("T", "OE"):
|
|
190
|
+
raise ValueError("field_unit must be 'T' or 'Oe'")
|
|
191
|
+
if unit == "OE":
|
|
192
|
+
h = h * 1e-4 # CGS -> SI
|
|
193
|
+
|
|
194
|
+
hm = float(h.mean())
|
|
195
|
+
rm = float(ry.mean())
|
|
196
|
+
sxx = float(np.sum((h - hm) ** 2))
|
|
197
|
+
sxy = float(np.sum((h - hm) * (ry - rm)))
|
|
198
|
+
if sxx < np.finfo(float).eps:
|
|
199
|
+
raise ValueError("field range is effectively zero; cannot compute Hall slope")
|
|
200
|
+
|
|
201
|
+
slope = sxy / sxx # Ohm/T (or Ohm*cm/T)
|
|
202
|
+
intercept = rm - slope * hm
|
|
203
|
+
ry_fit = slope * h + intercept
|
|
204
|
+
ss_tot = float(np.sum((ry - rm) ** 2))
|
|
205
|
+
ss_res = float(np.sum((ry - ry_fit) ** 2))
|
|
206
|
+
fit_r2 = 1.0 if ss_tot < np.finfo(float).eps else 1.0 - ss_res / ss_tot
|
|
207
|
+
|
|
208
|
+
# R_H [cm^3/C] = slope [Ohm/T] * t_cm * 1e4; t=1 cm placeholder when absent.
|
|
209
|
+
r_h = slope * thickness * 1e4 if thickness is not None else slope * 1e4
|
|
210
|
+
|
|
211
|
+
q = constants()["e"]
|
|
212
|
+
if thickness is not None and abs(r_h) > 0:
|
|
213
|
+
carrier_density: float = 1.0 / (abs(r_h) * q)
|
|
214
|
+
else:
|
|
215
|
+
carrier_density = float("nan")
|
|
216
|
+
mu = abs(r_h) * sigma if sigma is not None else float("nan")
|
|
217
|
+
|
|
218
|
+
return {
|
|
219
|
+
"r_h": r_h,
|
|
220
|
+
"carrier_density": carrier_density,
|
|
221
|
+
"carrier_type": _carrier_type(r_h),
|
|
222
|
+
"mobility": mu,
|
|
223
|
+
"fit_r2": fit_r2,
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def wiedemann_franz(
|
|
228
|
+
temperature: float | list[float], resistivity_ohm_cm: float | list[float]
|
|
229
|
+
) -> dict[str, Any]:
|
|
230
|
+
"""Electronic thermal conductivity κ_e = L₀·T/ρ (W/(cm·K)).
|
|
231
|
+
|
|
232
|
+
L₀ = 2.44e-8 W·Ω/K² is the Sommerfeld Lorenz number. Scalars broadcast; a
|
|
233
|
+
list T with a scalar ρ (and vice versa) is supported.
|
|
234
|
+
|
|
235
|
+
>>> round(wiedemann_franz(300.0, 1.72e-6)["kappa"][0], 4)
|
|
236
|
+
4.2558
|
|
237
|
+
"""
|
|
238
|
+
t = np.atleast_1d(np.asarray(temperature, dtype=float))
|
|
239
|
+
rho = np.atleast_1d(np.asarray(resistivity_ohm_cm, dtype=float))
|
|
240
|
+
if t.size == 1 and rho.size > 1:
|
|
241
|
+
t = np.full(rho.shape, t[0])
|
|
242
|
+
if rho.size == 1 and t.size > 1:
|
|
243
|
+
rho = np.full(t.shape, rho[0])
|
|
244
|
+
if t.size != rho.size:
|
|
245
|
+
raise ValueError("temperature and resistivity must be the same size, or one scalar")
|
|
246
|
+
with np.errstate(divide="ignore", invalid="ignore"):
|
|
247
|
+
kappa = _LORENZ * t / rho
|
|
248
|
+
return {"kappa": kappa.tolist(), "temperature": t.tolist(), "lorenz": _LORENZ}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
r"""Electrochemistry calculators (DiraCulator ``buildElectrochemistryTab`` +
|
|
2
|
+
``+calc/+electrochemistry``).
|
|
3
|
+
|
|
4
|
+
Pure calc layer — closed-form scalars in, result dicts out. No fastapi /
|
|
5
|
+
pydantic imports. Ports the five MATLAB ``calc.electrochemistry`` functions
|
|
6
|
+
verbatim:
|
|
7
|
+
|
|
8
|
+
.. math::
|
|
9
|
+
|
|
10
|
+
E = E^0 - \frac{R\,T}{n\,F}\,\ln Q \\
|
|
11
|
+
j = j_0\!\left[e^{\alpha F\eta/RT} - e^{-(1-\alpha)F\eta/RT}\right] \\
|
|
12
|
+
b = \frac{2.303\,R\,T}{\alpha\,F} \qquad V_{IR} = I\,R \\
|
|
13
|
+
C = \frac{\varepsilon_0\,\varepsilon_r\,A}{d}
|
|
14
|
+
|
|
15
|
+
Units follow the MATLAB toolbox (the behavioural reference): potentials in V,
|
|
16
|
+
current density in A/cm², Tafel slope in V/decade (and mV/decade), resistance
|
|
17
|
+
in Ω, double-layer thickness ``d`` in nm, electrode area ``A`` in cm²,
|
|
18
|
+
capacitance in F (plus µF, pF, and F/cm² specific). Temperatures default to
|
|
19
|
+
298.15 K (25 °C). The MATLAB ``latex`` result field is intentionally omitted.
|
|
20
|
+
|
|
21
|
+
Reference values (closed-form, see ``test_electrochemistry``):
|
|
22
|
+
- ``nernst_potential(0.77, 1, 0.01) -> E ≈ 0.8883`` V (25 °C)
|
|
23
|
+
- ``tafel_slope(0.5) -> bMv ≈ 118.3`` mV/dec (25 °C)
|
|
24
|
+
- ``ohmic_drop(1e-3, 50) -> V = 0.05`` V (50 mV)
|
|
25
|
+
- ``double_layer_capacitance(78, 0.5, 1.0) -> C ≈ 138`` µF
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from __future__ import annotations
|
|
29
|
+
|
|
30
|
+
import math
|
|
31
|
+
from typing import Any
|
|
32
|
+
|
|
33
|
+
from quantized.calc.constants import constants
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
"butler_volmer",
|
|
37
|
+
"double_layer_capacitance",
|
|
38
|
+
"nernst_potential",
|
|
39
|
+
"ohmic_drop",
|
|
40
|
+
"tafel_slope",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
_T_STANDARD = 298.15 # K (25 °C), MATLAB default temperature
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def nernst_potential(e0: float, n: float, q: float, *, t: float = _T_STANDARD) -> dict[str, float]:
|
|
47
|
+
"""Nernst equilibrium electrode potential E = E⁰ − (R·T)/(n·F)·ln(Q) (V).
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
e0: standard electrode potential E⁰ (V).
|
|
51
|
+
n: number of electrons transferred (> 0).
|
|
52
|
+
q: reaction quotient (dimensionless, > 0).
|
|
53
|
+
t: temperature (K, > 0); default 298.15.
|
|
54
|
+
|
|
55
|
+
>>> round(nernst_potential(0.77, 1, 0.01)["E"], 4)
|
|
56
|
+
0.8883
|
|
57
|
+
"""
|
|
58
|
+
if n <= 0:
|
|
59
|
+
raise ValueError("n must be positive")
|
|
60
|
+
if q <= 0:
|
|
61
|
+
raise ValueError("Q must be positive")
|
|
62
|
+
if t <= 0:
|
|
63
|
+
raise ValueError("T must be positive")
|
|
64
|
+
c = constants()
|
|
65
|
+
e = e0 - (c["R"] * t) / (n * c["F"]) * math.log(q)
|
|
66
|
+
return {"E": e, "E0": e0, "n": n, "Q": q, "T": t}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def butler_volmer(
|
|
70
|
+
j0: float, eta: float, *, alpha: float = 0.5, t: float = _T_STANDARD
|
|
71
|
+
) -> dict[str, float]:
|
|
72
|
+
"""Butler-Volmer electrode current density (A/cm²).
|
|
73
|
+
|
|
74
|
+
j = j₀·[exp(α·F·η/RT) − exp(−(1−α)·F·η/RT)], with anodic/cathodic partials
|
|
75
|
+
and the large-overpotential Tafel approximation jTafel = j₀·exp(α·F·η/RT).
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
j0: exchange current density (A/cm², > 0).
|
|
79
|
+
eta: overpotential (V); positive = anodic.
|
|
80
|
+
alpha: transfer coefficient (0 < α < 1); default 0.5.
|
|
81
|
+
t: temperature (K, > 0); default 298.15.
|
|
82
|
+
|
|
83
|
+
>>> round(butler_volmer(1e-3, 0.0)["j"], 12)
|
|
84
|
+
0.0
|
|
85
|
+
"""
|
|
86
|
+
if j0 <= 0:
|
|
87
|
+
raise ValueError("j0 must be positive")
|
|
88
|
+
if not (0 < alpha < 1):
|
|
89
|
+
raise ValueError("alpha must satisfy 0 < alpha < 1")
|
|
90
|
+
if t <= 0:
|
|
91
|
+
raise ValueError("T must be positive")
|
|
92
|
+
c = constants()
|
|
93
|
+
f_over_rt = c["F"] / (c["R"] * t)
|
|
94
|
+
try:
|
|
95
|
+
j_anodic = j0 * math.exp(alpha * f_over_rt * eta)
|
|
96
|
+
j_cathodic = -j0 * math.exp(-(1.0 - alpha) * f_over_rt * eta)
|
|
97
|
+
j = j_anodic + j_cathodic
|
|
98
|
+
j_tafel = j0 * math.exp(alpha * f_over_rt * eta)
|
|
99
|
+
except OverflowError as exc:
|
|
100
|
+
raise ValueError(
|
|
101
|
+
"overpotential eta is too large: the Butler-Volmer exponential "
|
|
102
|
+
"overflows (use a physical |eta|, well under ~30 V)"
|
|
103
|
+
) from exc
|
|
104
|
+
return {
|
|
105
|
+
"j": j,
|
|
106
|
+
"jAnodic": j_anodic,
|
|
107
|
+
"jCathodic": j_cathodic,
|
|
108
|
+
"jTafel": j_tafel,
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def tafel_slope(alpha: float, *, t: float = _T_STANDARD) -> dict[str, float]:
|
|
113
|
+
"""Tafel slope b = 2.303·R·T/(α·F) (V/decade and mV/decade).
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
alpha: transfer coefficient (0 < α < 1).
|
|
117
|
+
t: temperature (K, > 0); default 298.15.
|
|
118
|
+
|
|
119
|
+
>>> round(tafel_slope(0.5)["bMv"], 1)
|
|
120
|
+
118.3
|
|
121
|
+
"""
|
|
122
|
+
if not (0 < alpha < 1):
|
|
123
|
+
raise ValueError("alpha must satisfy 0 < alpha < 1")
|
|
124
|
+
if t <= 0:
|
|
125
|
+
raise ValueError("T must be positive")
|
|
126
|
+
c = constants()
|
|
127
|
+
b = 2.303 * c["R"] * t / (alpha * c["F"])
|
|
128
|
+
return {"b": b, "bMv": b * 1000.0}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def ohmic_drop(i: float, r: float) -> dict[str, float]:
|
|
132
|
+
"""Ohmic (iR) voltage drop V = I·R (V and mV).
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
i: current (A); positive = anodic.
|
|
136
|
+
r: uncompensated cell resistance (Ω, ≥ 0).
|
|
137
|
+
|
|
138
|
+
>>> ohmic_drop(1e-3, 50)["V"]
|
|
139
|
+
0.05
|
|
140
|
+
"""
|
|
141
|
+
if r < 0:
|
|
142
|
+
raise ValueError("R must be non-negative")
|
|
143
|
+
v = i * r
|
|
144
|
+
return {"V": v, "VmV": v * 1000.0}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def double_layer_capacitance(epsilon: float, d: float, area: float) -> dict[str, Any]:
|
|
148
|
+
"""Parallel-plate double-layer capacitance C = ε₀·ε_r·A/d.
|
|
149
|
+
|
|
150
|
+
Internally converts d (nm → m) and A (cm² → m²); returns capacitance in F,
|
|
151
|
+
µF, pF, and the specific capacitance per unit area (F/cm²).
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
epsilon: relative permittivity ε_r (dimensionless, > 0).
|
|
155
|
+
d: layer thickness (nm, > 0).
|
|
156
|
+
area: electrode area (cm², > 0).
|
|
157
|
+
|
|
158
|
+
>>> round(double_layer_capacitance(78, 0.5, 1.0)["CuF"], 1)
|
|
159
|
+
138.1
|
|
160
|
+
"""
|
|
161
|
+
if epsilon <= 0:
|
|
162
|
+
raise ValueError("epsilon must be positive")
|
|
163
|
+
if d <= 0:
|
|
164
|
+
raise ValueError("d must be positive")
|
|
165
|
+
if area <= 0:
|
|
166
|
+
raise ValueError("area must be positive")
|
|
167
|
+
c = constants()
|
|
168
|
+
d_m = d * 1e-9 # nm -> m
|
|
169
|
+
area_m2 = area * 1e-4 # cm^2 -> m^2
|
|
170
|
+
cap = c["eps0"] * epsilon * area_m2 / d_m # F
|
|
171
|
+
return {
|
|
172
|
+
"C": cap,
|
|
173
|
+
"CuF": cap * 1e6,
|
|
174
|
+
"CpF": cap * 1e12,
|
|
175
|
+
"Cspec": cap / area, # F/cm^2
|
|
176
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"Z":1,"symbol":"H","name":"Hydrogen","mass":1.008,"group":1,"period":1,"category":"nonmetal","density":8.988E-5,"electronConfig":"1s1","electronegativity":2.2,"atomicRadius":53,"ionizationEnergy":13.5984,"electronAffinity":0.7542,"meltingPoint":14.01,"boilingPoint":20.28,"thermalConductivity":0.1805,"bCoherent":-3.739,"xrayEdges":{"K":13.6,"L1":null,"L2":null,"L3":null}},{"Z":2,"symbol":"He","name":"Helium","mass":4.0026,"group":18,"period":1,"category":"noble gas","density":0.0001664,"electronConfig":"1s2","electronegativity":null,"atomicRadius":31,"ionizationEnergy":24.5874,"electronAffinity":0,"meltingPoint":0.95,"boilingPoint":4.22,"thermalConductivity":0.1513,"bCoherent":3.26,"xrayEdges":{"K":24.6,"L1":null,"L2":null,"L3":null}},{"Z":3,"symbol":"Li","name":"Lithium","mass":6.94,"group":1,"period":2,"category":"alkali metal","density":0.534,"electronConfig":"[He] 2s1","electronegativity":0.98,"atomicRadius":167,"ionizationEnergy":5.3917,"electronAffinity":0.6182,"meltingPoint":453.65,"boilingPoint":1615,"thermalConductivity":84.8,"bCoherent":-1.9,"xrayEdges":{"K":54.7,"L1":null,"L2":null,"L3":null}},{"Z":4,"symbol":"Be","name":"Beryllium","mass":9.0122,"group":2,"period":2,"category":"alkaline earth metal","density":1.85,"electronConfig":"[He] 2s2","electronegativity":1.57,"atomicRadius":112,"ionizationEnergy":9.3227,"electronAffinity":0,"meltingPoint":1560,"boilingPoint":2742,"thermalConductivity":200,"bCoherent":7.79,"xrayEdges":{"K":111.5,"L1":null,"L2":null,"L3":null}},{"Z":5,"symbol":"B","name":"Boron","mass":10.81,"group":13,"period":2,"category":"metalloid","density":2.34,"electronConfig":"[He] 2s2 2p1","electronegativity":2.04,"atomicRadius":87,"ionizationEnergy":8.298,"electronAffinity":0.2797,"meltingPoint":2349,"boilingPoint":4200,"thermalConductivity":27.4,"bCoherent":5.3,"xrayEdges":{"K":188,"L1":null,"L2":null,"L3":null}},{"Z":6,"symbol":"C","name":"Carbon","mass":12.011,"group":14,"period":2,"category":"nonmetal","density":2.267,"electronConfig":"[He] 2s2 2p2","electronegativity":2.55,"atomicRadius":77,"ionizationEnergy":11.2603,"electronAffinity":1.2621,"meltingPoint":3823,"boilingPoint":4300,"thermalConductivity":140,"bCoherent":6.646,"xrayEdges":{"K":284.2,"L1":null,"L2":null,"L3":null}},{"Z":7,"symbol":"N","name":"Nitrogen","mass":14.007,"group":15,"period":2,"category":"nonmetal","density":0.001251,"electronConfig":"[He] 2s2 2p3","electronegativity":3.04,"atomicRadius":75,"ionizationEnergy":14.5341,"electronAffinity":0,"meltingPoint":63.15,"boilingPoint":77.36,"thermalConductivity":0.02583,"bCoherent":9.36,"xrayEdges":{"K":409.9,"L1":null,"L2":null,"L3":null}},{"Z":8,"symbol":"O","name":"Oxygen","mass":15.999,"group":16,"period":2,"category":"nonmetal","density":0.001429,"electronConfig":"[He] 2s2 2p4","electronegativity":3.44,"atomicRadius":73,"ionizationEnergy":13.6181,"electronAffinity":1.4611,"meltingPoint":54.36,"boilingPoint":90.2,"thermalConductivity":0.02658,"bCoherent":5.803,"xrayEdges":{"K":543.1,"L1":null,"L2":null,"L3":null}},{"Z":9,"symbol":"F","name":"Fluorine","mass":18.998,"group":17,"period":2,"category":"halogen","density":0.001696,"electronConfig":"[He] 2s2 2p5","electronegativity":3.98,"atomicRadius":64,"ionizationEnergy":17.4228,"electronAffinity":3.4012,"meltingPoint":53.53,"boilingPoint":85.03,"thermalConductivity":0.0277,"bCoherent":5.654,"xrayEdges":{"K":696.7,"L1":null,"L2":null,"L3":null}},{"Z":10,"symbol":"Ne","name":"Neon","mass":20.18,"group":18,"period":2,"category":"noble gas","density":0.0009002,"electronConfig":"[He] 2s2 2p6","electronegativity":null,"atomicRadius":38,"ionizationEnergy":21.5645,"electronAffinity":0,"meltingPoint":24.56,"boilingPoint":27.07,"thermalConductivity":0.0491,"bCoherent":4.566,"xrayEdges":{"K":870.2,"L1":null,"L2":null,"L3":null}},{"Z":11,"symbol":"Na","name":"Sodium","mass":22.99,"group":1,"period":3,"category":"alkali metal","density":0.968,"electronConfig":"[Ne] 3s1","electronegativity":0.93,"atomicRadius":190,"ionizationEnergy":5.1391,"electronAffinity":0.5479,"meltingPoint":370.87,"boilingPoint":1156,"thermalConductivity":142,"bCoherent":3.63,"xrayEdges":{"K":1070.8,"L1":63.5,"L2":30.5,"L3":30.4}},{"Z":12,"symbol":"Mg","name":"Magnesium","mass":24.305,"group":2,"period":3,"category":"alkaline earth metal","density":1.738,"electronConfig":"[Ne] 3s2","electronegativity":1.31,"atomicRadius":145,"ionizationEnergy":7.6462,"electronAffinity":0,"meltingPoint":923,"boilingPoint":1363,"thermalConductivity":156,"bCoherent":5.375,"xrayEdges":{"K":1303,"L1":88.7,"L2":49.8,"L3":49.2}},{"Z":13,"symbol":"Al","name":"Aluminium","mass":26.982,"group":13,"period":3,"category":"post-transition metal","density":2.7,"electronConfig":"[Ne] 3s2 3p1","electronegativity":1.61,"atomicRadius":118,"ionizationEnergy":5.9858,"electronAffinity":0.4328,"meltingPoint":933.47,"boilingPoint":2792,"thermalConductivity":237,"bCoherent":3.449,"xrayEdges":{"K":1559.6,"L1":117.8,"L2":72.9,"L3":72.5}},{"Z":14,"symbol":"Si","name":"Silicon","mass":28.085,"group":14,"period":3,"category":"metalloid","density":2.3296,"electronConfig":"[Ne] 3s2 3p2","electronegativity":1.9,"atomicRadius":111,"ionizationEnergy":8.1517,"electronAffinity":1.3895,"meltingPoint":1687,"boilingPoint":3538,"thermalConductivity":149,"bCoherent":4.1491,"xrayEdges":{"K":1839,"L1":149.7,"L2":99.8,"L3":99.2}},{"Z":15,"symbol":"P","name":"Phosphorus","mass":30.974,"group":15,"period":3,"category":"nonmetal","density":1.823,"electronConfig":"[Ne] 3s2 3p3","electronegativity":2.19,"atomicRadius":98,"ionizationEnergy":10.4867,"electronAffinity":0.7465,"meltingPoint":317.25,"boilingPoint":553.65,"thermalConductivity":0.236,"bCoherent":5.13,"xrayEdges":{"K":2145.5,"L1":189.3,"L2":136,"L3":135}},{"Z":16,"symbol":"S","name":"Sulfur","mass":32.06,"group":16,"period":3,"category":"nonmetal","density":2.07,"electronConfig":"[Ne] 3s2 3p4","electronegativity":2.58,"atomicRadius":88,"ionizationEnergy":10.36,"electronAffinity":2.0771,"meltingPoint":388.36,"boilingPoint":717.87,"thermalConductivity":0.205,"bCoherent":2.847,"xrayEdges":{"K":2472,"L1":229.2,"L2":165.5,"L3":164.1}},{"Z":17,"symbol":"Cl","name":"Chlorine","mass":35.45,"group":17,"period":3,"category":"halogen","density":0.003214,"electronConfig":"[Ne] 3s2 3p5","electronegativity":3.16,"atomicRadius":79,"ionizationEnergy":12.9676,"electronAffinity":3.6127,"meltingPoint":171.65,"boilingPoint":239.11,"thermalConductivity":0.0089,"bCoherent":9.577,"xrayEdges":{"K":2822.4,"L1":270.2,"L2":201.6,"L3":200}},{"Z":18,"symbol":"Ar","name":"Argon","mass":39.948,"group":18,"period":3,"category":"noble gas","density":0.001784,"electronConfig":"[Ne] 3s2 3p6","electronegativity":null,"atomicRadius":71,"ionizationEnergy":15.7596,"electronAffinity":0,"meltingPoint":83.8,"boilingPoint":87.3,"thermalConductivity":0.01772,"bCoherent":1.909,"xrayEdges":{"K":3205.9,"L1":326.3,"L2":250.6,"L3":248.4}},{"Z":19,"symbol":"K","name":"Potassium","mass":39.098,"group":1,"period":4,"category":"alkali metal","density":0.862,"electronConfig":"[Ar] 4s1","electronegativity":0.82,"atomicRadius":243,"ionizationEnergy":4.3407,"electronAffinity":0.5015,"meltingPoint":336.53,"boilingPoint":1032,"thermalConductivity":102.5,"bCoherent":3.67,"xrayEdges":{"K":3608.4,"L1":378.6,"L2":297.3,"L3":294.6}},{"Z":20,"symbol":"Ca","name":"Calcium","mass":40.078,"group":2,"period":4,"category":"alkaline earth metal","density":1.55,"electronConfig":"[Ar] 4s2","electronegativity":1,"atomicRadius":194,"ionizationEnergy":6.1132,"electronAffinity":0.02455,"meltingPoint":1115,"boilingPoint":1757,"thermalConductivity":201,"bCoherent":4.7,"xrayEdges":{"K":4038.5,"L1":437.8,"L2":350,"L3":346.2}},{"Z":21,"symbol":"Sc","name":"Scandium","mass":44.956,"group":3,"period":4,"category":"transition metal","density":2.985,"electronConfig":"[Ar] 3d1 4s2","electronegativity":1.36,"atomicRadius":184,"ionizationEnergy":6.5615,"electronAffinity":0.188,"meltingPoint":1814,"boilingPoint":3109,"thermalConductivity":15.8,"bCoherent":12.29,"xrayEdges":{"K":4492.8,"L1":500.4,"L2":403.6,"L3":398.7}},{"Z":22,"symbol":"Ti","name":"Titanium","mass":47.867,"group":4,"period":4,"category":"transition metal","density":4.507,"electronConfig":"[Ar] 3d2 4s2","electronegativity":1.54,"atomicRadius":176,"ionizationEnergy":6.8281,"electronAffinity":0.0787,"meltingPoint":1941,"boilingPoint":3560,"thermalConductivity":21.9,"bCoherent":-3.438,"xrayEdges":{"K":4966.4,"L1":563.4,"L2":461.2,"L3":453.8}},{"Z":23,"symbol":"V","name":"Vanadium","mass":50.942,"group":5,"period":4,"category":"transition metal","density":6.11,"electronConfig":"[Ar] 3d3 4s2","electronegativity":1.63,"atomicRadius":171,"ionizationEnergy":6.7462,"electronAffinity":0.5258,"meltingPoint":2183,"boilingPoint":3680,"thermalConductivity":30.7,"bCoherent":-0.3824,"xrayEdges":{"K":5465.1,"L1":626.7,"L2":519.8,"L3":512.1}},{"Z":24,"symbol":"Cr","name":"Chromium","mass":51.996,"group":6,"period":4,"category":"transition metal","density":7.19,"electronConfig":"[Ar] 3d5 4s1","electronegativity":1.66,"atomicRadius":166,"ionizationEnergy":6.7665,"electronAffinity":0.668,"meltingPoint":2180,"boilingPoint":2944,"thermalConductivity":93.9,"bCoherent":3.635,"xrayEdges":{"K":5988.8,"L1":695.7,"L2":583.8,"L3":574.1}},{"Z":25,"symbol":"Mn","name":"Manganese","mass":54.938,"group":7,"period":4,"category":"transition metal","density":7.47,"electronConfig":"[Ar] 3d5 4s2","electronegativity":1.55,"atomicRadius":161,"ionizationEnergy":7.434,"electronAffinity":0,"meltingPoint":1519,"boilingPoint":2334,"thermalConductivity":7.81,"bCoherent":-3.73,"xrayEdges":{"K":6539,"L1":769.1,"L2":649.9,"L3":638.7}},{"Z":26,"symbol":"Fe","name":"Iron","mass":55.845,"group":8,"period":4,"category":"transition metal","density":7.874,"electronConfig":"[Ar] 3d6 4s2","electronegativity":1.83,"atomicRadius":156,"ionizationEnergy":7.9024,"electronAffinity":0.151,"meltingPoint":1811,"boilingPoint":3134,"thermalConductivity":80.4,"bCoherent":9.45,"xrayEdges":{"K":7112,"L1":844.6,"L2":719.9,"L3":706.8}},{"Z":27,"symbol":"Co","name":"Cobalt","mass":58.933,"group":9,"period":4,"category":"transition metal","density":8.9,"electronConfig":"[Ar] 3d7 4s2","electronegativity":1.88,"atomicRadius":152,"ionizationEnergy":7.881,"electronAffinity":0.6633,"meltingPoint":1768,"boilingPoint":3200,"thermalConductivity":100,"bCoherent":2.49,"xrayEdges":{"K":7709,"L1":925.1,"L2":793.2,"L3":778.1}},{"Z":28,"symbol":"Ni","name":"Nickel","mass":58.693,"group":10,"period":4,"category":"transition metal","density":8.908,"electronConfig":"[Ar] 3d8 4s2","electronegativity":1.91,"atomicRadius":149,"ionizationEnergy":7.6398,"electronAffinity":1.1562,"meltingPoint":1728,"boilingPoint":3186,"thermalConductivity":90.9,"bCoherent":10.3,"xrayEdges":{"K":8333,"L1":1008.6,"L2":870,"L3":852.7}},{"Z":29,"symbol":"Cu","name":"Copper","mass":63.546,"group":11,"period":4,"category":"transition metal","density":8.96,"electronConfig":"[Ar] 3d10 4s1","electronegativity":1.9,"atomicRadius":145,"ionizationEnergy":7.7264,"electronAffinity":1.2357,"meltingPoint":1357.77,"boilingPoint":2835,"thermalConductivity":401,"bCoherent":7.718,"xrayEdges":{"K":8979,"L1":1096.7,"L2":952.3,"L3":932.7}},{"Z":30,"symbol":"Zn","name":"Zinc","mass":65.38,"group":12,"period":4,"category":"transition metal","density":7.14,"electronConfig":"[Ar] 3d10 4s2","electronegativity":1.65,"atomicRadius":142,"ionizationEnergy":9.3942,"electronAffinity":0,"meltingPoint":692.68,"boilingPoint":1180,"thermalConductivity":116,"bCoherent":5.68,"xrayEdges":{"K":9659,"L1":1196.2,"L2":1044.9,"L3":1021.8}},{"Z":31,"symbol":"Ga","name":"Gallium","mass":69.723,"group":13,"period":4,"category":"post-transition metal","density":5.91,"electronConfig":"[Ar] 3d10 4s2 4p1","electronegativity":1.81,"atomicRadius":136,"ionizationEnergy":5.9993,"electronAffinity":0.3012,"meltingPoint":302.91,"boilingPoint":2477,"thermalConductivity":40.6,"bCoherent":7.288,"xrayEdges":{"K":10367,"L1":1299,"L2":1143.2,"L3":1116.4}},{"Z":32,"symbol":"Ge","name":"Germanium","mass":72.63,"group":14,"period":4,"category":"metalloid","density":5.323,"electronConfig":"[Ar] 3d10 4s2 4p2","electronegativity":2.01,"atomicRadius":125,"ionizationEnergy":7.8994,"electronAffinity":1.2328,"meltingPoint":1211.4,"boilingPoint":3106,"thermalConductivity":60.2,"bCoherent":8.185,"xrayEdges":{"K":11103.1,"L1":1414.6,"L2":1248.1,"L3":1217}},{"Z":33,"symbol":"As","name":"Arsenic","mass":74.922,"group":15,"period":4,"category":"metalloid","density":5.727,"electronConfig":"[Ar] 3d10 4s2 4p3","electronegativity":2.18,"atomicRadius":114,"ionizationEnergy":9.7886,"electronAffinity":0.8048,"meltingPoint":1090,"boilingPoint":887,"thermalConductivity":50.2,"bCoherent":6.58,"xrayEdges":{"K":11867,"L1":1526.5,"L2":1358.6,"L3":1323.1}},{"Z":34,"symbol":"Se","name":"Selenium","mass":78.971,"group":16,"period":4,"category":"nonmetal","density":4.81,"electronConfig":"[Ar] 3d10 4s2 4p4","electronegativity":2.55,"atomicRadius":103,"ionizationEnergy":9.7524,"electronAffinity":2.0207,"meltingPoint":494,"boilingPoint":958,"thermalConductivity":0.52,"bCoherent":7.97,"xrayEdges":{"K":12657.8,"L1":1652,"L2":1474.3,"L3":1433.9}},{"Z":35,"symbol":"Br","name":"Bromine","mass":79.904,"group":17,"period":4,"category":"halogen","density":3.1028,"electronConfig":"[Ar] 3d10 4s2 4p5","electronegativity":2.96,"atomicRadius":94,"ionizationEnergy":11.8138,"electronAffinity":3.3636,"meltingPoint":265.8,"boilingPoint":332,"thermalConductivity":0.122,"bCoherent":6.795,"xrayEdges":{"K":13474,"L1":1782,"L2":1596,"L3":1549.9}},{"Z":36,"symbol":"Kr","name":"Krypton","mass":83.798,"group":18,"period":4,"category":"noble gas","density":0.003749,"electronConfig":"[Ar] 3d10 4s2 4p6","electronegativity":3,"atomicRadius":88,"ionizationEnergy":13.9996,"electronAffinity":0,"meltingPoint":115.79,"boilingPoint":119.93,"thermalConductivity":0.00943,"bCoherent":7.81,"xrayEdges":{"K":14325.6,"L1":1921,"L2":1730.9,"L3":1678.4}},{"Z":37,"symbol":"Rb","name":"Rubidium","mass":85.468,"group":1,"period":5,"category":"alkali metal","density":1.532,"electronConfig":"[Kr] 5s1","electronegativity":0.82,"atomicRadius":265,"ionizationEnergy":4.1771,"electronAffinity":0.486,"meltingPoint":312.46,"boilingPoint":961,"thermalConductivity":58.2,"bCoherent":7.09,"xrayEdges":{"K":15199.7,"L1":2065.1,"L2":1863.9,"L3":1804.4}},{"Z":38,"symbol":"Sr","name":"Strontium","mass":87.62,"group":2,"period":5,"category":"alkaline earth metal","density":2.64,"electronConfig":"[Kr] 5s2","electronegativity":0.95,"atomicRadius":219,"ionizationEnergy":5.6949,"electronAffinity":0.0518,"meltingPoint":1050,"boilingPoint":1655,"thermalConductivity":35.4,"bCoherent":7.02,"xrayEdges":{"K":16104.6,"L1":2216.3,"L2":2006.8,"L3":1939.6}},{"Z":39,"symbol":"Y","name":"Yttrium","mass":88.906,"group":3,"period":5,"category":"transition metal","density":4.472,"electronConfig":"[Kr] 4d1 5s2","electronegativity":1.22,"atomicRadius":212,"ionizationEnergy":6.2173,"electronAffinity":0.307,"meltingPoint":1799,"boilingPoint":3609,"thermalConductivity":17.2,"bCoherent":7.75,"xrayEdges":{"K":17038.4,"L1":2372.5,"L2":2155.5,"L3":2080}},{"Z":40,"symbol":"Zr","name":"Zirconium","mass":91.224,"group":4,"period":5,"category":"transition metal","density":6.52,"electronConfig":"[Kr] 4d2 5s2","electronegativity":1.33,"atomicRadius":206,"ionizationEnergy":6.6339,"electronAffinity":0.426,"meltingPoint":2128,"boilingPoint":4682,"thermalConductivity":22.6,"bCoherent":7.16,"xrayEdges":{"K":17998,"L1":2531.6,"L2":2306.7,"L3":2222.3}},{"Z":41,"symbol":"Nb","name":"Niobium","mass":92.906,"group":5,"period":5,"category":"transition metal","density":8.57,"electronConfig":"[Kr] 4d4 5s1","electronegativity":1.6,"atomicRadius":198,"ionizationEnergy":6.7589,"electronAffinity":0.8935,"meltingPoint":2750,"boilingPoint":5017,"thermalConductivity":53.7,"bCoherent":7.054,"xrayEdges":{"K":18986,"L1":2697.7,"L2":2464.7,"L3":2370.5}},{"Z":42,"symbol":"Mo","name":"Molybdenum","mass":95.95,"group":6,"period":5,"category":"transition metal","density":10.28,"electronConfig":"[Kr] 4d5 5s1","electronegativity":2.16,"atomicRadius":190,"ionizationEnergy":7.0924,"electronAffinity":0.7472,"meltingPoint":2896,"boilingPoint":4912,"thermalConductivity":138,"bCoherent":6.715,"xrayEdges":{"K":19999.5,"L1":2865.5,"L2":2625.1,"L3":2520.2}},{"Z":43,"symbol":"Tc","name":"Technetium","mass":97,"group":7,"period":5,"category":"transition metal","density":11.5,"electronConfig":"[Kr] 4d5 5s2","electronegativity":1.9,"atomicRadius":183,"ionizationEnergy":7.28,"electronAffinity":0.55,"meltingPoint":2430,"boilingPoint":4538,"thermalConductivity":50.6,"bCoherent":6.8,"xrayEdges":{"K":21044,"L1":3042.5,"L2":2793.2,"L3":2676.9}},{"Z":44,"symbol":"Ru","name":"Ruthenium","mass":101.07,"group":8,"period":5,"category":"transition metal","density":12.45,"electronConfig":"[Kr] 4d7 5s1","electronegativity":2.2,"atomicRadius":178,"ionizationEnergy":7.3605,"electronAffinity":1.04638,"meltingPoint":2607,"boilingPoint":4423,"thermalConductivity":117,"bCoherent":7.03,"xrayEdges":{"K":22117.2,"L1":3224,"L2":2966.9,"L3":2837.9}},{"Z":45,"symbol":"Rh","name":"Rhodium","mass":102.91,"group":9,"period":5,"category":"transition metal","density":12.41,"electronConfig":"[Kr] 4d8 5s1","electronegativity":2.28,"atomicRadius":173,"ionizationEnergy":7.4589,"electronAffinity":1.14289,"meltingPoint":2237,"boilingPoint":3968,"thermalConductivity":150,"bCoherent":5.88,"xrayEdges":{"K":23219.9,"L1":3411.9,"L2":3146.1,"L3":3003.8}},{"Z":46,"symbol":"Pd","name":"Palladium","mass":106.42,"group":10,"period":5,"category":"transition metal","density":12.023,"electronConfig":"[Kr] 4d10","electronegativity":2.2,"atomicRadius":169,"ionizationEnergy":8.3369,"electronAffinity":0.5613,"meltingPoint":1828.05,"boilingPoint":3236,"thermalConductivity":71.8,"bCoherent":5.91,"xrayEdges":{"K":24350.3,"L1":3604.3,"L2":3330.3,"L3":3173.3}},{"Z":47,"symbol":"Ag","name":"Silver","mass":107.87,"group":11,"period":5,"category":"transition metal","density":10.49,"electronConfig":"[Kr] 4d10 5s1","electronegativity":1.93,"atomicRadius":165,"ionizationEnergy":7.5762,"electronAffinity":1.30447,"meltingPoint":1234.93,"boilingPoint":2435,"thermalConductivity":429,"bCoherent":5.922,"xrayEdges":{"K":25514,"L1":3805.8,"L2":3523.7,"L3":3351.1}},{"Z":48,"symbol":"Cd","name":"Cadmium","mass":112.41,"group":12,"period":5,"category":"transition metal","density":8.65,"electronConfig":"[Kr] 4d10 5s2","electronegativity":1.69,"atomicRadius":161,"ionizationEnergy":8.9938,"electronAffinity":0,"meltingPoint":594.22,"boilingPoint":1040,"thermalConductivity":96.6,"bCoherent":4.87,"xrayEdges":{"K":26711.2,"L1":4018,"L2":3727,"L3":3537.5}},{"Z":49,"symbol":"In","name":"Indium","mass":114.82,"group":13,"period":5,"category":"post-transition metal","density":7.31,"electronConfig":"[Kr] 4d10 5s2 5p1","electronegativity":1.78,"atomicRadius":156,"ionizationEnergy":5.7864,"electronAffinity":0.304,"meltingPoint":429.75,"boilingPoint":2345,"thermalConductivity":81.8,"bCoherent":4.065,"xrayEdges":{"K":27939.9,"L1":4237.5,"L2":3938,"L3":3730.1}},{"Z":50,"symbol":"Sn","name":"Tin","mass":118.71,"group":14,"period":5,"category":"post-transition metal","density":7.265,"electronConfig":"[Kr] 4d10 5s2 5p2","electronegativity":1.96,"atomicRadius":145,"ionizationEnergy":7.3439,"electronAffinity":1.1121,"meltingPoint":505.08,"boilingPoint":2875,"thermalConductivity":66.8,"bCoherent":6.225,"xrayEdges":{"K":29200.1,"L1":4464.7,"L2":4156.1,"L3":3928.8}},{"Z":51,"symbol":"Sb","name":"Antimony","mass":121.76,"group":15,"period":5,"category":"metalloid","density":6.697,"electronConfig":"[Kr] 4d10 5s2 5p3","electronegativity":2.05,"atomicRadius":133,"ionizationEnergy":8.6084,"electronAffinity":1.0672,"meltingPoint":903.78,"boilingPoint":1908,"thermalConductivity":24.3,"bCoherent":5.57,"xrayEdges":{"K":30491.2,"L1":4698.3,"L2":4380.4,"L3":4132.2}},{"Z":52,"symbol":"Te","name":"Tellurium","mass":127.6,"group":16,"period":5,"category":"metalloid","density":6.24,"electronConfig":"[Kr] 4d10 5s2 5p4","electronegativity":2.1,"atomicRadius":123,"ionizationEnergy":9.0096,"electronAffinity":1.9708,"meltingPoint":722.66,"boilingPoint":1261,"thermalConductivity":2.35,"bCoherent":5.8,"xrayEdges":{"K":31814,"L1":4939.2,"L2":4612,"L3":4341.4}},{"Z":53,"symbol":"I","name":"Iodine","mass":126.9,"group":17,"period":5,"category":"halogen","density":4.933,"electronConfig":"[Kr] 4d10 5s2 5p5","electronegativity":2.66,"atomicRadius":115,"ionizationEnergy":10.4513,"electronAffinity":3.059,"meltingPoint":386.85,"boilingPoint":457.55,"thermalConductivity":0.449,"bCoherent":5.28,"xrayEdges":{"K":33169.4,"L1":5188.1,"L2":4852.1,"L3":4557.1}},{"Z":54,"symbol":"Xe","name":"Xenon","mass":131.29,"group":18,"period":5,"category":"noble gas","density":0.005887,"electronConfig":"[Kr] 4d10 5s2 5p6","electronegativity":2.6,"atomicRadius":108,"ionizationEnergy":12.1298,"electronAffinity":0,"meltingPoint":161.36,"boilingPoint":165.03,"thermalConductivity":0.00565,"bCoherent":4.92,"xrayEdges":{"K":34561.4,"L1":5452.8,"L2":5103.7,"L3":4782.2}},{"Z":55,"symbol":"Cs","name":"Caesium","mass":132.91,"group":1,"period":6,"category":"alkali metal","density":1.93,"electronConfig":"[Xe] 6s1","electronegativity":0.79,"atomicRadius":298,"ionizationEnergy":3.8939,"electronAffinity":0.4716,"meltingPoint":301.59,"boilingPoint":944,"thermalConductivity":35.9,"bCoherent":5.42,"xrayEdges":{"K":35984.6,"L1":5714.3,"L2":5359.4,"L3":5012}},{"Z":56,"symbol":"Ba","name":"Barium","mass":137.33,"group":2,"period":6,"category":"alkaline earth metal","density":3.51,"electronConfig":"[Xe] 6s2","electronegativity":0.89,"atomicRadius":253,"ionizationEnergy":5.2117,"electronAffinity":0.14462,"meltingPoint":1000,"boilingPoint":2118,"thermalConductivity":18.4,"bCoherent":5.07,"xrayEdges":{"K":37440.6,"L1":5988.6,"L2":5623.6,"L3":5247}},{"Z":57,"symbol":"La","name":"Lanthanum","mass":138.91,"group":0,"period":6,"category":"lanthanide","density":6.145,"electronConfig":"[Xe] 5d1 6s2","electronegativity":1.1,"atomicRadius":195,"ionizationEnergy":5.5769,"electronAffinity":0.47,"meltingPoint":1193,"boilingPoint":3737,"thermalConductivity":13.4,"bCoherent":8.24,"xrayEdges":{"K":38924.6,"L1":6266.3,"L2":5890.6,"L3":5482.7}},{"Z":58,"symbol":"Ce","name":"Cerium","mass":140.12,"group":0,"period":6,"category":"lanthanide","density":6.77,"electronConfig":"[Xe] 4f1 5d1 6s2","electronegativity":1.12,"atomicRadius":185,"ionizationEnergy":5.5387,"electronAffinity":0.5,"meltingPoint":1068,"boilingPoint":3716,"thermalConductivity":11.3,"bCoherent":4.84,"xrayEdges":{"K":40443,"L1":6548.8,"L2":6164.2,"L3":5723.4}},{"Z":59,"symbol":"Pr","name":"Praseodymium","mass":140.91,"group":0,"period":6,"category":"lanthanide","density":6.77,"electronConfig":"[Xe] 4f3 6s2","electronegativity":1.13,"atomicRadius":185,"ionizationEnergy":5.473,"electronAffinity":0.5,"meltingPoint":1208,"boilingPoint":3793,"thermalConductivity":12.5,"bCoherent":4.58,"xrayEdges":{"K":41990.6,"L1":6834.8,"L2":6440.4,"L3":5964.3}},{"Z":60,"symbol":"Nd","name":"Neodymium","mass":144.24,"group":0,"period":6,"category":"lanthanide","density":7.01,"electronConfig":"[Xe] 4f4 6s2","electronegativity":1.14,"atomicRadius":185,"ionizationEnergy":5.525,"electronAffinity":0.5,"meltingPoint":1297,"boilingPoint":3347,"thermalConductivity":16.5,"bCoherent":7.69,"xrayEdges":{"K":43568.9,"L1":7126,"L2":6721.5,"L3":6207.9}},{"Z":61,"symbol":"Pm","name":"Promethium","mass":145,"group":0,"period":6,"category":"lanthanide","density":7.26,"electronConfig":"[Xe] 4f5 6s2","electronegativity":1.13,"atomicRadius":185,"ionizationEnergy":5.582,"electronAffinity":0.5,"meltingPoint":1315,"boilingPoint":3273,"thermalConductivity":17.9,"bCoherent":null,"xrayEdges":{"K":45184,"L1":7428,"L2":7012.8,"L3":6459.3}},{"Z":62,"symbol":"Sm","name":"Samarium","mass":150.36,"group":0,"period":6,"category":"lanthanide","density":7.52,"electronConfig":"[Xe] 4f6 6s2","electronegativity":1.17,"atomicRadius":185,"ionizationEnergy":5.6437,"electronAffinity":0.5,"meltingPoint":1345,"boilingPoint":2067,"thermalConductivity":13.3,"bCoherent":0.8,"xrayEdges":{"K":46834.2,"L1":7736.8,"L2":7311.8,"L3":6716.2}},{"Z":63,"symbol":"Eu","name":"Europium","mass":151.96,"group":0,"period":6,"category":"lanthanide","density":5.244,"electronConfig":"[Xe] 4f7 6s2","electronegativity":1.2,"atomicRadius":185,"ionizationEnergy":5.6704,"electronAffinity":0.5,"meltingPoint":1099,"boilingPoint":1802,"thermalConductivity":13.9,"bCoherent":7.22,"xrayEdges":{"K":48519,"L1":8052,"L2":7617.1,"L3":6976.9}},{"Z":64,"symbol":"Gd","name":"Gadolinium","mass":157.25,"group":0,"period":6,"category":"lanthanide","density":7.9,"electronConfig":"[Xe] 4f7 5d1 6s2","electronegativity":1.2,"atomicRadius":180,"ionizationEnergy":6.1501,"electronAffinity":0.5,"meltingPoint":1585,"boilingPoint":3546,"thermalConductivity":10.6,"bCoherent":9.5,"xrayEdges":{"K":50239.1,"L1":8375.6,"L2":7930.3,"L3":7242.8}},{"Z":65,"symbol":"Tb","name":"Terbium","mass":158.93,"group":0,"period":6,"category":"lanthanide","density":8.23,"electronConfig":"[Xe] 4f9 6s2","electronegativity":1.1,"atomicRadius":175,"ionizationEnergy":5.8638,"electronAffinity":0.5,"meltingPoint":1629,"boilingPoint":3503,"thermalConductivity":11.1,"bCoherent":7.38,"xrayEdges":{"K":51995.7,"L1":8708,"L2":8251.6,"L3":7514}},{"Z":66,"symbol":"Dy","name":"Dysprosium","mass":162.5,"group":0,"period":6,"category":"lanthanide","density":8.55,"electronConfig":"[Xe] 4f10 6s2","electronegativity":1.22,"atomicRadius":175,"ionizationEnergy":5.9389,"electronAffinity":0.5,"meltingPoint":1680,"boilingPoint":2840,"thermalConductivity":10.7,"bCoherent":16.9,"xrayEdges":{"K":53788.5,"L1":9045.8,"L2":8580.6,"L3":7790.1}},{"Z":67,"symbol":"Ho","name":"Holmium","mass":164.93,"group":0,"period":6,"category":"lanthanide","density":8.8,"electronConfig":"[Xe] 4f11 6s2","electronegativity":1.23,"atomicRadius":175,"ionizationEnergy":6.0215,"electronAffinity":0.5,"meltingPoint":1734,"boilingPoint":2993,"thermalConductivity":16.2,"bCoherent":8.01,"xrayEdges":{"K":55617.7,"L1":9394.2,"L2":8917.8,"L3":8071.1}},{"Z":68,"symbol":"Er","name":"Erbium","mass":167.26,"group":0,"period":6,"category":"lanthanide","density":9.07,"electronConfig":"[Xe] 4f12 6s2","electronegativity":1.24,"atomicRadius":175,"ionizationEnergy":6.1077,"electronAffinity":0.5,"meltingPoint":1802,"boilingPoint":3141,"thermalConductivity":14.5,"bCoherent":7.79,"xrayEdges":{"K":57485.5,"L1":9751.3,"L2":9264.3,"L3":8357.9}},{"Z":69,"symbol":"Tm","name":"Thulium","mass":168.93,"group":0,"period":6,"category":"lanthanide","density":9.32,"electronConfig":"[Xe] 4f13 6s2","electronegativity":1.25,"atomicRadius":175,"ionizationEnergy":6.1843,"electronAffinity":0.5,"meltingPoint":1818,"boilingPoint":2223,"thermalConductivity":16.9,"bCoherent":7.07,"xrayEdges":{"K":59389.6,"L1":10115.7,"L2":9616.9,"L3":8648}},{"Z":70,"symbol":"Yb","name":"Ytterbium","mass":173.04,"group":0,"period":6,"category":"lanthanide","density":6.9,"electronConfig":"[Xe] 4f14 6s2","electronegativity":1.1,"atomicRadius":175,"ionizationEnergy":6.2542,"electronAffinity":0.02,"meltingPoint":1097,"boilingPoint":1469,"thermalConductivity":38.5,"bCoherent":12.43,"xrayEdges":{"K":61332.3,"L1":10486.4,"L2":9978.2,"L3":8943.6}},{"Z":71,"symbol":"Lu","name":"Lutetium","mass":174.97,"group":3,"period":6,"category":"lanthanide","density":9.841,"electronConfig":"[Xe] 4f14 5d1 6s2","electronegativity":1.27,"atomicRadius":175,"ionizationEnergy":5.4259,"electronAffinity":0.34,"meltingPoint":1925,"boilingPoint":3675,"thermalConductivity":16.4,"bCoherent":7.21,"xrayEdges":{"K":63313.8,"L1":10870.4,"L2":10348.6,"L3":9244.1}},{"Z":72,"symbol":"Hf","name":"Hafnium","mass":178.49,"group":4,"period":6,"category":"transition metal","density":13.31,"electronConfig":"[Xe] 4f14 5d2 6s2","electronegativity":1.3,"atomicRadius":167,"ionizationEnergy":6.8251,"electronAffinity":0,"meltingPoint":2506,"boilingPoint":4876,"thermalConductivity":23,"bCoherent":7.77,"xrayEdges":{"K":65350.8,"L1":11270.7,"L2":10739.4,"L3":9560.7}},{"Z":73,"symbol":"Ta","name":"Tantalum","mass":180.95,"group":5,"period":6,"category":"transition metal","density":16.69,"electronConfig":"[Xe] 4f14 5d3 6s2","electronegativity":1.5,"atomicRadius":149,"ionizationEnergy":7.5496,"electronAffinity":0.3226,"meltingPoint":3290,"boilingPoint":5731,"thermalConductivity":57.5,"bCoherent":6.91,"xrayEdges":{"K":67416.4,"L1":11681.5,"L2":11136.1,"L3":9881.1}},{"Z":74,"symbol":"W","name":"Tungsten","mass":183.84,"group":6,"period":6,"category":"transition metal","density":19.25,"electronConfig":"[Xe] 4f14 5d4 6s2","electronegativity":2.36,"atomicRadius":141,"ionizationEnergy":7.864,"electronAffinity":0.81626,"meltingPoint":3695,"boilingPoint":6203,"thermalConductivity":173,"bCoherent":4.86,"xrayEdges":{"K":69525,"L1":12099.8,"L2":11544,"L3":10206.8}},{"Z":75,"symbol":"Re","name":"Rhenium","mass":186.21,"group":7,"period":6,"category":"transition metal","density":21.02,"electronConfig":"[Xe] 4f14 5d5 6s2","electronegativity":1.9,"atomicRadius":137,"ionizationEnergy":7.8335,"electronAffinity":0.15,"meltingPoint":3459,"boilingPoint":5869,"thermalConductivity":48,"bCoherent":9.2,"xrayEdges":{"K":71676.4,"L1":12526.7,"L2":11958.7,"L3":10535.3}},{"Z":76,"symbol":"Os","name":"Osmium","mass":190.23,"group":8,"period":6,"category":"transition metal","density":22.59,"electronConfig":"[Xe] 4f14 5d6 6s2","electronegativity":2.2,"atomicRadius":135,"ionizationEnergy":8.4382,"electronAffinity":1.0778,"meltingPoint":3306,"boilingPoint":5285,"thermalConductivity":87.6,"bCoherent":10.7,"xrayEdges":{"K":73870.8,"L1":12968,"L2":12385,"L3":10870.9}},{"Z":77,"symbol":"Ir","name":"Iridium","mass":192.22,"group":9,"period":6,"category":"transition metal","density":22.56,"electronConfig":"[Xe] 4f14 5d7 6s2","electronegativity":2.2,"atomicRadius":136,"ionizationEnergy":8.967,"electronAffinity":1.5638,"meltingPoint":2719,"boilingPoint":4701,"thermalConductivity":147,"bCoherent":10.6,"xrayEdges":{"K":76111,"L1":13418.5,"L2":12824.1,"L3":11215.2}},{"Z":78,"symbol":"Pt","name":"Platinum","mass":195.08,"group":10,"period":6,"category":"transition metal","density":21.45,"electronConfig":"[Xe] 4f14 5d9 6s1","electronegativity":2.28,"atomicRadius":139,"ionizationEnergy":8.9587,"electronAffinity":2.1251,"meltingPoint":2041.4,"boilingPoint":4098,"thermalConductivity":71.6,"bCoherent":9.6,"xrayEdges":{"K":78394.8,"L1":13879.9,"L2":13272.6,"L3":11563.7}},{"Z":79,"symbol":"Au","name":"Gold","mass":196.97,"group":11,"period":6,"category":"transition metal","density":19.32,"electronConfig":"[Xe] 4f14 5d10 6s1","electronegativity":2.54,"atomicRadius":144,"ionizationEnergy":9.2255,"electronAffinity":2.3086,"meltingPoint":1337.33,"boilingPoint":3129,"thermalConductivity":318,"bCoherent":7.63,"xrayEdges":{"K":80724.9,"L1":14352.8,"L2":13733.6,"L3":11918.7}},{"Z":80,"symbol":"Hg","name":"Mercury","mass":200.59,"group":12,"period":6,"category":"transition metal","density":13.534,"electronConfig":"[Xe] 4f14 5d10 6s2","electronegativity":2,"atomicRadius":151,"ionizationEnergy":10.4375,"electronAffinity":0,"meltingPoint":234.32,"boilingPoint":629.88,"thermalConductivity":8.3,"bCoherent":12.692,"xrayEdges":{"K":83102.3,"L1":14839.3,"L2":14208.7,"L3":12283.9}},{"Z":81,"symbol":"Tl","name":"Thallium","mass":204.38,"group":13,"period":6,"category":"post-transition metal","density":11.85,"electronConfig":"[Xe] 4f14 5d10 6s2 6p1","electronegativity":1.62,"atomicRadius":170,"ionizationEnergy":6.1082,"electronAffinity":0.3213,"meltingPoint":577,"boilingPoint":1746,"thermalConductivity":46.1,"bCoherent":8.776,"xrayEdges":{"K":85530.4,"L1":15346.7,"L2":14697.9,"L3":12657.5}},{"Z":82,"symbol":"Pb","name":"Lead","mass":207.2,"group":14,"period":6,"category":"post-transition metal","density":11.34,"electronConfig":"[Xe] 4f14 5d10 6s2 6p2","electronegativity":2.33,"atomicRadius":175,"ionizationEnergy":7.4167,"electronAffinity":0.3644,"meltingPoint":600.61,"boilingPoint":2022,"thermalConductivity":35.3,"bCoherent":9.405,"xrayEdges":{"K":88004.5,"L1":15860.8,"L2":15200,"L3":13035.2}},{"Z":83,"symbol":"Bi","name":"Bismuth","mass":208.98,"group":15,"period":6,"category":"post-transition metal","density":9.807,"electronConfig":"[Xe] 4f14 5d10 6s2 6p3","electronegativity":2.02,"atomicRadius":156,"ionizationEnergy":7.2856,"electronAffinity":0.9463,"meltingPoint":544.55,"boilingPoint":1837,"thermalConductivity":7.97,"bCoherent":8.532,"xrayEdges":{"K":90525.9,"L1":16387.5,"L2":15711.1,"L3":13418.6}},{"Z":84,"symbol":"Po","name":"Polonium","mass":209,"group":16,"period":6,"category":"post-transition metal","density":9.32,"electronConfig":"[Xe] 4f14 5d10 6s2 6p4","electronegativity":2,"atomicRadius":167,"ionizationEnergy":8.414,"electronAffinity":1.9,"meltingPoint":527,"boilingPoint":1235,"thermalConductivity":20,"bCoherent":null,"xrayEdges":{"K":93104.9,"L1":16939.3,"L2":16244.3,"L3":13813.8}},{"Z":85,"symbol":"At","name":"Astatine","mass":210,"group":17,"period":6,"category":"halogen","density":7,"electronConfig":"[Xe] 4f14 5d10 6s2 6p5","electronegativity":2.2,"atomicRadius":150,"ionizationEnergy":9.3,"electronAffinity":2.8,"meltingPoint":575,"boilingPoint":610,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":95729.9,"L1":17493,"L2":16784.7,"L3":14213.5}},{"Z":86,"symbol":"Rn","name":"Radon","mass":222,"group":18,"period":6,"category":"noble gas","density":0.00973,"electronConfig":"[Xe] 4f14 5d10 6s2 6p6","electronegativity":2.2,"atomicRadius":145,"ionizationEnergy":10.7485,"electronAffinity":0,"meltingPoint":202,"boilingPoint":211.5,"thermalConductivity":0.00364,"bCoherent":null,"xrayEdges":{"K":98404,"L1":18049,"L2":17337.1,"L3":14619.4}},{"Z":87,"symbol":"Fr","name":"Francium","mass":223,"group":1,"period":7,"category":"alkali metal","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":101137,"L1":18639,"L2":17906.5,"L3":15031.2}},{"Z":88,"symbol":"Ra","name":"Radium","mass":226,"group":2,"period":7,"category":"alkaline earth metal","density":5,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":103921.9,"L1":19236.7,"L2":18484.3,"L3":15444.4}},{"Z":89,"symbol":"Ac","name":"Actinium","mass":227,"group":0,"period":7,"category":"actinide","density":10.07,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":106755.3,"L1":19840,"L2":19083.2,"L3":15871}},{"Z":90,"symbol":"Th","name":"Thorium","mass":232.04,"group":0,"period":7,"category":"actinide","density":11.72,"electronConfig":"[Rn] 6d2 7s2","electronegativity":1.3,"atomicRadius":null,"ionizationEnergy":6.3067,"electronAffinity":null,"meltingPoint":2115,"boilingPoint":5061,"thermalConductivity":54,"bCoherent":10.31,"xrayEdges":{"K":109650.9,"L1":20472.1,"L2":19693.2,"L3":16300.3}},{"Z":91,"symbol":"Pa","name":"Protactinium","mass":231.04,"group":0,"period":7,"category":"actinide","density":15.37,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":112601.4,"L1":21104.6,"L2":20313.7,"L3":16733.1}},{"Z":92,"symbol":"U","name":"Uranium","mass":238.03,"group":0,"period":7,"category":"actinide","density":19.05,"electronConfig":"[Rn] 5f3 6d1 7s2","electronegativity":1.38,"atomicRadius":null,"ionizationEnergy":6.1941,"electronAffinity":null,"meltingPoint":1405.3,"boilingPoint":4404,"thermalConductivity":27.5,"bCoherent":8.417,"xrayEdges":{"K":115606.1,"L1":21757.4,"L2":20947.6,"L3":17166.3}},{"Z":93,"symbol":"Np","name":"Neptunium","mass":237,"group":0,"period":7,"category":"actinide","density":20.45,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":94,"symbol":"Pu","name":"Plutonium","mass":244,"group":0,"period":7,"category":"actinide","density":19.84,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":95,"symbol":"Am","name":"Americium","mass":243,"group":0,"period":7,"category":"actinide","density":12,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":96,"symbol":"Cm","name":"Curium","mass":247,"group":0,"period":7,"category":"actinide","density":13.51,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":97,"symbol":"Bk","name":"Berkelium","mass":247,"group":0,"period":7,"category":"actinide","density":14.79,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":98,"symbol":"Cf","name":"Californium","mass":251,"group":0,"period":7,"category":"actinide","density":15.1,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":99,"symbol":"Es","name":"Einsteinium","mass":252,"group":0,"period":7,"category":"actinide","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":100,"symbol":"Fm","name":"Fermium","mass":257,"group":0,"period":7,"category":"actinide","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":101,"symbol":"Md","name":"Mendelevium","mass":258,"group":0,"period":7,"category":"actinide","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":102,"symbol":"No","name":"Nobelium","mass":259,"group":0,"period":7,"category":"actinide","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":103,"symbol":"Lr","name":"Lawrencium","mass":262,"group":3,"period":7,"category":"actinide","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":104,"symbol":"Rf","name":"Rutherfordium","mass":267,"group":4,"period":7,"category":"transition metal","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":105,"symbol":"Db","name":"Dubnium","mass":268,"group":5,"period":7,"category":"transition metal","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":106,"symbol":"Sg","name":"Seaborgium","mass":271,"group":6,"period":7,"category":"transition metal","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":107,"symbol":"Bh","name":"Bohrium","mass":274,"group":7,"period":7,"category":"transition metal","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":108,"symbol":"Hs","name":"Hassium","mass":277,"group":8,"period":7,"category":"transition metal","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":109,"symbol":"Mt","name":"Meitnerium","mass":278,"group":9,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":110,"symbol":"Ds","name":"Darmstadtium","mass":281,"group":10,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":111,"symbol":"Rg","name":"Roentgenium","mass":282,"group":11,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":112,"symbol":"Cn","name":"Copernicium","mass":285,"group":12,"period":7,"category":"transition metal","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":113,"symbol":"Nh","name":"Nihonium","mass":286,"group":13,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":114,"symbol":"Fl","name":"Flerovium","mass":289,"group":14,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":115,"symbol":"Mc","name":"Moscovium","mass":290,"group":15,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":116,"symbol":"Lv","name":"Livermorium","mass":293,"group":16,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":117,"symbol":"Ts","name":"Tennessine","mass":294,"group":17,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}},{"Z":118,"symbol":"Og","name":"Oganesson","mass":294,"group":18,"period":7,"category":"unknown","density":null,"electronConfig":"","electronegativity":null,"atomicRadius":null,"ionizationEnergy":null,"electronAffinity":null,"meltingPoint":null,"boilingPoint":null,"thermalConductivity":null,"bCoherent":null,"xrayEdges":{"K":null,"L1":null,"L2":null,"L3":null}}]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Periodic-table data for all 118 elements. Port of calc.elementData.
|
|
2
|
+
|
|
3
|
+
The element table itself lives in ``element_data.json`` (dumped verbatim from
|
|
4
|
+
MATLAB ``calc.elementData()`` for exact data parity); this module just loads it
|
|
5
|
+
and exposes the lookup API. Pure calc layer.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from typing import Any
|
|
13
|
+
|
|
14
|
+
import numpy as np
|
|
15
|
+
from numpy.typing import NDArray
|
|
16
|
+
|
|
17
|
+
__all__ = ["by_symbol", "by_z", "element_data", "get_property"]
|
|
18
|
+
|
|
19
|
+
_DATA_PATH = Path(__file__).parent / "element_data.json"
|
|
20
|
+
_ELEMENTS: list[dict[str, Any]] | None = None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _load() -> list[dict[str, Any]]:
|
|
24
|
+
global _ELEMENTS
|
|
25
|
+
if _ELEMENTS is None:
|
|
26
|
+
_ELEMENTS = json.loads(_DATA_PATH.read_text(encoding="utf-8"))
|
|
27
|
+
return _ELEMENTS
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def element_data() -> list[dict[str, Any]]:
|
|
31
|
+
"""Return the full 118-element table (list of element dicts)."""
|
|
32
|
+
return _load()
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def by_symbol(symbol: str) -> dict[str, Any]:
|
|
36
|
+
"""Look up a single element by symbol (e.g. 'Fe'). Raises if not found."""
|
|
37
|
+
for el in _load():
|
|
38
|
+
if el["symbol"] == symbol:
|
|
39
|
+
return el
|
|
40
|
+
raise ValueError(f"element symbol '{symbol}' not found")
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def by_z(z: int) -> dict[str, Any]:
|
|
44
|
+
"""Look up a single element by atomic number Z (1-118)."""
|
|
45
|
+
if z < 1 or z > 118:
|
|
46
|
+
raise ValueError("Z must be between 1 and 118")
|
|
47
|
+
return _load()[z - 1]
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def get_property(name: str) -> NDArray[np.float64] | list[Any]:
|
|
51
|
+
"""Return a property across all 118 elements.
|
|
52
|
+
|
|
53
|
+
Numeric properties return a float array (MATLAB NaN -> null -> nan);
|
|
54
|
+
non-numeric properties (e.g. 'symbol', 'category') return a list.
|
|
55
|
+
"""
|
|
56
|
+
vals = [el[name] for el in _load()]
|
|
57
|
+
if all(v is None or (isinstance(v, int | float) and not isinstance(v, bool)) for v in vals):
|
|
58
|
+
return np.array(vals, dtype=float)
|
|
59
|
+
return vals
|