2.12. Fast unit conversion functions

Nearly all the functions in this module have been speeduped by Numba package, which means they are fast, but the input argument must be of type float.

qha.unit_conversion.j_to_ev(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit joule to electronvolt.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ev_to_j(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit electronvolt to joule.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.gpa_to_megabar(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit gigapascal to megabar.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.megabar_to_gpa(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit megabar to gigapascal.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.b3_to_a3(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit cubic bohr radius to what in cubic angstrom.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.a3_to_b3(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit cubic angstrom to what in cubic bohr radius.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.eh_to_ev(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit hartree to electronvolt.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ev_to_eh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit electronvolt to hartree.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ry_to_ev(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit rydberg to electronvolt.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ev_to_ry(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit electronvolt to rydberg.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.j_to_eh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit joule to hartree.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.eh_to_j(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit hartree to joule.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.eh_to_hz(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit hartree to hertz.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.hz_to_eh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit hertz to hartree.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.eh_to_k(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit hartree to kelvin.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.k_to_eh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit kelvin to hartree.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.eh_to_m_inverse(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit hartree to \(\text{m}^{-1}\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.m_inverse_to_eh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit \(\text{m}^{-1}\) to hartree.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.eh_to_cm_inverse(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit hartree to \(\text{cm}^{-1}\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.cm_inverse_to_eh(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit \(\text{cm}^{-1}\) to hartree.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ev_to_m_inverse(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit electronvolt to \(\text{m}^{-1}\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.m_inverse_to_ev(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit \(\text{m}^{-1}\) to electronvolt.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ev_to_cm_inverse(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit electronvolt to \(\text{cm}^{-1}\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.cm_inverse_to_ev(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit \(\text{cm}^{-1}\) to electronvolt.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ev_to_k(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit electronvolt to kelvin.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.k_to_ev(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit kelvin to electronvolt.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ry_to_j(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit rydberg to joule.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.j_to_ry(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit joule to rydberg.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.gpa_to_ev_a3(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit gigapascal to \(\frac{ \text{electronvolt} }{ \text{angstrom}^3 }\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ev_a3_to_gpa(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit \(\frac{ \text{electronvolt} }{ \text{angstrom}^3 }\) to gigapascal.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.gpa_to_ry_b3(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit gigapascal to \(\frac{ \text{rydberg} }{ \text{bohr radius}^3 }\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ry_b3_to_gpa(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit \(\frac{ \text{rydberg} }{ \text{bohr radius}^3 }\) to gigapascal.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.gpa_to_ha_b3(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit gigapascal to \(\frac{ \text{hartree} }{ \text{bohr radius}^3 }\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ha_b3_to_gpa(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit \(\frac{ \text{hartree} }{ \text{bohr radius}^3 }\) to gigapascal.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ev_b3_to_gpa(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit \(\frac{ \text{electronvolt} }{ \text{bohr radius}^3 }\) to gigapascal.

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.gpa_to_ev_b3(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value in unit gigapascal to \(\frac{ \text{electronvolt} }{ \text{bohr radius}^3 }\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ry_b_to_ev_a(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

The atomic force. Convert the value in unit \(\frac{ \text{rydberg} }{ \text{bohr radius} }\) to \(\frac{ \text{electronvolt} }{ \text{angstrom} }\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ha_b_to_ev_a(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

The atomic force. Convert the value in unit \(\frac{ \text{hartree} }{ \text{bohr radius} }\) to \(\frac{ \text{electronvolt} }{ \text{angstrom} }\).

Parameters

value – The value to be converted.

Returns

The converted value.

qha.unit_conversion.ry_to_kj_mol(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value is in unit Rydberg, the converted value is in unit \(\frac{ \text{k J} }{ \text{mol} }\).

Parameters

value – The value to be converted.

Returns

the converted value.

qha.unit_conversion.ry_to_j_mol(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

Convert the value is in unit Rydberg, the converted value is in unit \(\frac{ \text{k J} }{ \text{mol} }\).

Parameters

value – The value to be converted.

Returns

the converted value.