Skip to content

Commit f8e6f46

Browse files
committed
Updated physical constants and atomic weights; fixed issues for unittests that this change introduced
1 parent d1379a7 commit f8e6f46

File tree

17 files changed

+306
-298
lines changed

17 files changed

+306
-298
lines changed

rmgpy/constants.py

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,29 @@
3939
The constants defined in this module are listed in the table below:
4040
4141
.. table:: Physical constants defined in the :mod:`rmgpy.constants` module
42+
43+
Values updated November 2025 using exact values (when available) sourced from https://arxiv.org/pdf/2409.03787
4244
4345
======================= =================== =========================================================== ============================================================
4446
Symbol Constant Value Description
4547
======================= =================== =========================================================== ============================================================
46-
:math:`E_\mathrm{h}` :data:`E_h` :math:`4.35974434 \times 10^{-18} \ \mathrm{J}` Hartree energy
47-
:math:`F` :data:`F` :math:`96485.3365 \ \mathrm{C/mol}` Faraday constant
48-
:math:`G` :data:`G` :math:`6.67384 \times 10^{-11} \ \mathrm{m^3/kg \cdot s^2}` Newtonian gravitational constant
49-
:math:`N_\mathrm{A}` :data:`Na` :math:`6.02214179 \times 10^{23} \ \mathrm{mol^{-1}}` Avogadro constant
50-
:math:`R` :data:`R` :math:`8.314472 \ \mathrm{J/mol \cdot K}` gas law constant
51-
:math:`a_0` :data:`a0` :math:`5.2917721092 \times 10^{-11} \ \mathrm{m}` Bohr radius
52-
:math:`c` :data:`c` :math:`299792458 \ \mathrm{m/s}` speed of light in a vacuum
53-
:math:`e` :data:`e` :math:`1.602176565 \times 10^{-19} \ \mathrm{C}` elementary charge
54-
:math:`g` :data:`g` :math:`9.80665 \ \mathrm{m/s^2}` standard acceleration due to gravity
55-
:math:`h` :data:`h` :math:`6.62606896 \times 10^{-34} \ \mathrm{J \cdot s}` Planck constant
56-
:math:`\hbar` :data:`hbar` :math:`1.054571726 \times 10^{-34} \ \mathrm{J \cdot s}` reduced Planck constant
57-
:math:`k_\mathrm{B}` :data:`kB` :math:`1.3806504 \times 10^{-23} \ \mathrm{J/K}` Boltzmann constant
58-
:math:`m_\mathrm{e}` :data:`m_e` :math:`9.10938291 \times 10^{-31} \ \mathrm{kg}` electron rest mass
59-
:math:`m_\mathrm{n}` :data:`m_n` :math:`1.674927351 \times 10^{-27} \ \mathrm{kg}` neutron rest mass
60-
:math:`m_\mathrm{p}` :data:`m_p` :math:`1.672621777 \times 10^{-27} \ \mathrm{kg}` proton rest mass
61-
:math:`m_\mathrm{u}` :data:`amu` :math:`1.660538921 \times 10^{-27} \ \mathrm{kg}` atomic mass unit
48+
:math:`E_\mathrm{h}` :data:`E_h` :math:`4.3597447222060 \times 10^{-18} \ \mathrm{J}` Hartree energy
49+
:math:`F` :data:`F` :math:`96 48533212 \ldots \ \mathrm{C/mol}` Faraday constant (exact)
50+
:math:`G` :data:`G` :math:`6.67430 \times 10^{-11} \ \mathrm{m^3/kg \cdot s^2}` Newtonian gravitational constant
51+
:math:`N_\mathrm{A}` :data:`Na` :math:`6.02214076 \times 10^{23} \ \mathrm{mol^{-1}}` Avogadro constant (exact)
52+
:math:`R` :data:`R` :math:`8.314462618 \ldots \ \mathrm{J/mol \cdot K}` gas law constant (exact)
53+
:math:`a_0` :data:`a0` :math:`5.29177210544 \ldots \times 10^{-11} \ \mathrm{m}` Bohr radius
54+
:math:`c` :data:`c` :math:`299792458 \ \mathrm{m/s}` speed of light in a vacuum (exact)
55+
:math:`e` :data:`e` :math:`1.602176634 \times 10^{-19} \ \mathrm{C}` elementary charge (exact)
56+
:math:`g` :data:`g` :math:`9.80665 \ \mathrm{m/s^2}` standard acceleration due to gravity (exact)
57+
:math:`h` :data:`h` :math:`6.62607015 \times 10^{-34} \ \mathrm{J \cdot s}` Planck constant (exact)
58+
:math:`\hbar` :data:`hbar` :math:`1.054571817 \times 10^{-34} \ \mathrm{J \cdot s}` reduced Planck constant (exact)
59+
:math:`k_\mathrm{B}` :data:`kB` :math:`1.380649 \times 10^{-23} \ \mathrm{J/K}` Boltzmann constant (exact)
60+
:math:`m_\mathrm{e}` :data:`m_e` :math:`9.1093837139 \times 10^{-31} \ \mathrm{kg}` electron rest mass
61+
:math:`m_\mathrm{n}` :data:`m_n` :math:`1.67492750056 \times 10^{-27} \ \mathrm{kg}` neutron rest mass
62+
:math:`m_\mathrm{p}` :data:`m_p` :math:`1.67262192595 \times 10^{-27} \ \mathrm{kg}` proton rest mass
63+
:math:`M_\mathrm{u}` :data:`M_u` :math:`1.0000000010531 \times 10^{-3} \ \mathrm{kg/mol}` molar mass constant
64+
:math:`m_\mathrm{u}` :data:`amu` :math:`1.66053906892 \times 10^{-27} \ \mathrm{kg}` atomic mass unit
6265
:math:`\pi` :data:`pi` :math:`3.14159 \ldots`
6366
======================= =================== =========================================================== ============================================================
6467
@@ -68,53 +71,57 @@
6871

6972
################################################################################
7073

71-
#: The Hartree energy :math:`E_\mathrm{h}` in :math:`\mathrm{J}`
72-
E_h = 4.35974434e-18
74+
#: :math:`\pi = 3.14159 \ldots`
75+
pi = float(math.pi)
7376

7477
#: The Avogadro constant :math:`N_\mathrm{A}` in :math:`\mathrm{mol^{-1}}`
75-
Na = 6.02214179e23
78+
Na = 6.02214076e23
7679

77-
#: The gas law constant :math:`R` in :math:`\mathrm{J/mol \cdot K}`
78-
R = 8.314472
79-
80-
#: The Bohr radius :math:`a_0` in :math:`\mathrm{m}`
81-
a0 = 5.2917721092e-11
80+
#: The Avogadro constant :math:`N_\mathrm{A}` in :math:`\mathrm{mol^{-1}}`
81+
Mu = 1.0000000010531e-3
8282

83-
#: The atomic mass unit in :math:`\mathrm{kg}`
84-
amu = 1.660538921e-27
83+
#: The Boltzmann constant :math:`k_\mathrm{B}` in :math:`\mathrm{J/K}`
84+
kB = 1.380649e-23
8585

8686
#: The speed of light in a vacuum :math:`c` in :math:`\mathrm{m/s}`
8787
c = 299792458
8888

8989
#: The elementary charge :math:`e` in :math:`\mathrm{C}`
90-
e = 1.602176565e-19
90+
e = 1.602176634e-19
9191

9292
#: The Planck constant :math:`h` in :math:`\mathrm{J \cdot s}`
93-
h = 6.62606896e-34
93+
h = 6.62607015e-34
9494

9595
#: The reduced Planck constant :math:`\hbar` in :math:`\mathrm{J \cdot s}`
96-
hbar = 1.054571726e-34
96+
hbar = h / (2 * pi)
9797

98-
#: The Boltzmann constant :math:`k_\mathrm{B}` in :math:`\mathrm{J/K}`
99-
kB = 1.3806504e-23
98+
#: The gas law constant :math:`R` in :math:`\mathrm{J/mol \cdot K}`
99+
R = kB * Na
100+
101+
#: Vacuum permittivity
102+
epsilon_0 = 8.8541878188e-12
103+
104+
#: The Bohr radius :math:`a_0` in :math:`\mathrm{m}`
105+
a0 = 5.29177210544e-11
106+
107+
#: The Hartree energy :math:`E_\mathrm{h}` in :math:`\mathrm{J}`
108+
E_h = e**2 / (4 * pi * epsilon_0 * a0)
109+
110+
#: Faradays Constant F in C/mol
111+
F = Na * e
112+
113+
#: The atomic mass unit in :math:`\mathrm{kg}`
114+
amu = Mu / Na
100115

101116
#: The mass of an electron :math:`m_\mathrm{e}` in :math:`\mathrm{kg}`
102-
m_e = 9.10938291e-31
117+
m_e = 9.1093837139e-31
103118

104119
#: The mass of a neutron :math:`m_\mathrm{n}` in :math:`\mathrm{kg}`
105-
m_n = 1.674927351e-27
120+
m_n = 1.67492750056e-27
106121

107122
#: The mass of a proton :math:`m_\mathrm{p}` in :math:`\mathrm{kg}`
108-
m_p = 1.672621777e-27
109-
110-
#: :math:`\pi = 3.14159 \ldots`
111-
pi = float(math.pi)
123+
m_p = 1.67262192595e-27
112124

113-
#: Faradays Constant F in C/mol
114-
F = 96485.3321233100184
115-
116-
#: Vacuum permittivity
117-
epsilon_0 = 8.8541878128
118125

119126
################################################################################
120127

0 commit comments

Comments
 (0)